Help generating pdf file in Creator
Hi, im trying to generate a pdf file using the jar file:
itext-1.4.4.jar from the site
http://www.lowagie.com/iText/
I've created a library adding this java file, and just to see if works i pasted this code in a button on blank page:
Document doc = new Document();
ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();
PdfWriter docWriter = null;
docWriter = PdfWriter.getInstance(doc, baosPDF);
doc.add(new Paragraph(
"This document was created by a class named: "
+ this.getClass().getName()));
doc.add(new Paragraph(
"This document was created on "
+ new java.util.Date()));
doc.close();
docWriter.close();
return baosPDF;
When i use fix imports, creator paste this
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.PdfWriter;
import javax.swing.text.Document;
import java.io.ByteArrayOutputStream;
but in the page says it needs com.lowagie.text and com.lowagie.text.pdf if i put this imports manually, creator suggest me every time i put a dot that means i have correctly created the library but when i left the cursor for a while, shows a error ;
cannot find simbol
class: text
location: package Iowagie.text
but if open the package in proyect window>libraries and open the library the class is there. By the way if i use fix imports creator delete the com.lowagie.text and com.lowagie.text.pdf imports,
any suggestion or idea? if not, anyone can tell me his own xperience working with pdf and creator?
TNKS in advance!

