Bruno,
1T3XT info wrote: > Having a generation number 65,535 seems to be valid, > but... why would we need an object number with such > a generation number in a newly created PDF? > >> BTW, is there a special reason for all these free objects to appear in >> the >> cross-reference table as in-use objects pointing to the invalid offset 0? > > That's what I hoped to find out reading the code; > but PdfCopy has been there for a very long time, > and I don't remember if this choice was "by design" > or if it's "a bug that isn't really a bug". Actually a generation number of 65535 would make PdfWriter.PdfBody.PdfCrossReference.toPdf(OutputStream) write the entry as a free object of maximum generation. Maybe this method should process anything having a generation greater than 65535 the same as having a generation of 65535. The generation 65536 entries are generated in PdfWriter.PdfBody.getIndirectReferenceNumber(); these implicitely generated cross reference genrally are replaced when the indirect object having that number actually is written to the file. In case that object isn't written to file, though, the pseudo entry doesn't seem to be removed in all cases. The reason to keep such entries in the cross reference table might be to prevent it from being too fragmented. Regards, Michael. -- View this message in context: http://www.nabble.com/PdfCopy-and-xref-problems-tp23636758p23668026.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.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 Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
