Hello,

I'm using iText java classes to generate PDF files on
the fly from a servlet. I downloaded the iText source
files from your site, compiled  it  successfully  and
compiled  also my  objects to  implement lab1 of your
tutorial to create a simple pdf file with Hello World
text content... The  PDF  is  generated  but  is  not 
readable because of the following error when i try to
open the document :

"The file cannot be opened because it has no pages"

Here is the code I enclosed into my servlet :

Document document = new Document(pageSize); 
PdfWriter.getInstance(document, new
FileOutputStream("testfile.pdf"));
document.open();
document.add(new Paragraph("Hello World"));
document.close();

Please any advise or hint of what could be the problem
would be  very helpful. I really need this to work and

Regards and thank you in advance,

B. Machkour

ps: JSP is integrated in a Broadvision framework

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
Yahoo! Mail : http://fr.mail.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to