Where to save iText-5.0.1.jar to make compiler happy

Q

I want to save "iText-5.0.1.jar" file in a a folder so that it can be imported by import statement in my Java source file

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;

After I run my java program I get error as below: CreatingANewPagePDF.java:4: package java.com.lowagie.text does not exist import java.com.lowagie.text.Document; Please help...

✍: Kiran

A

Your code uses com.lowagie.text.* packages, which actually provided in an older version of iText like iText-2.1.6.jar, not in iText-5.0.1.jar.

You can download and put "iText-2.1.6.jar" in the same folder as your Java source file and add "-classpath iText-5.0.1.jar" option to your javac and java command line.

 

⇒ How to display unicode in PDF using itext5.0.1.jar in java

⇐ Copy PDF Document with iText

⇑ Using iText Library in Java Programs

⇑⇑ iText for PDF Generation

2010-12-17, 10882👍, 0💬