On 8/03/2013 6:26, adriano wrote: > Let's consider a very concrete example: I understand from the PDF specs > (although it's not clearly stated) that a normal PDF document may only > contain one (1) Catalog.
Read on in the PDF specs. A document can contain more than one Catalog object if it contains more than one revision. For instance: it was updated and the modification date has changed. In this case, you'll find two %%EOF lines and two Catalog objects. Throwing away one of these Catalog objects can be problematic, for instance if previous revisions are signed. > Well, how do I check that the DPF does not actually > contains two Catalogs? Of course this will hardly ever happen if the PDF was > created using any honest PDF generating software, but what if the PDF was > intentionally tampered with in order to cause problems to the consuming > application? Strange question. I thought it would be about duplicate content streams, such as the bytes of the same logo that are present 100 times in the same PDF. Copying the PDF with PdfSmartCopy would solve this problem. ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php