I have been using IText from a few days, it allowed me to produce nice
pdf tested with Evince 0.5.2. But, when I tested them using Adobe
Acrobat Reader 8 I got the following error:
"Error during page elaboration. A problem occured during reading this
document (109)" and I cannot see the document correctly.
In my code I use Flying Saucer to create a pdf document from HTML (works
fine in any reader)
then I use following code to manipulate the Flying Saucer output
(following code actually doesn't change anyting, just copies the
document into another, but it is enough to produce the problem):
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Document doc = new Document();
PdfWriter copy = PdfWriter.getInstance(doc, baos);
doc.open();
PdfReader reader = new PdfReader(PDF_FromFlyingSaucer_Baos.toByteArray());
PdfContentByte cb = copy.getDirectContent(); for (int p = 1; p <=
reader.getNumberOfPages(); p++) {
doc.newPage();
PdfImportedPage page = copy.getImportedPage(reader, p);
cb.addTemplate(page, 0, 0);
copy.close();
doc.close();
baos.close();
Where am I wrong? note that into the PDF_FromFlyingSaucer_Baos there is
text and graphics (HTML tables converted by Flying Saucer).
Thank you very much for help
--cesare
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar