Carsten Hammer wrote: > Hi, > I recently got some pdf files that contain before and after the pdf > bytestream a few lines PJL "rubbish". Though I would say this is not > valid according to the pdf reference it seems to work in most cases. > Acrobat 8 does not seem to care. Some of these files get problems after > itext does some manipulations on them (on some printers, ghostscript > says xref rebuild). Are you aware of limitations of itext to work with > such "broken" pdf? Is it right that I call them "broken" or did just not > read the pdf reference right and this is valid? > Best regards, > Carsten
It's not OK for a PDF file NOT to start with %PDF. My guess is that when tools say that the xref is rebuilt, the byte offsets of each PDF object had to be changed to take the extra bytes into account (the Cross Reference table tells the viewer where to find every object in the PDF file). "Some" rubbish is allowed at the end of the PDF file, but not too much. From the top of my head, I'd say you may not have more than 1028 bytes of rubbish, BUT you should check that number AND different viewers will have a different tolerance. I'd need some test PDFs to find out what happens when iText manipulates them. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
