twain,

twain wrote
> But if I simply try to open this pdf with adobe reader, it immediately
> complains about not valid signature byte range.
> 3pagen_general_packing_instructions_-_firmato.pdf
> <http://itext-general.2136553.n4.nabble.com/file/n4658040/3pagen_general_packing_instructions_-_firmato.pdf>
>   

Adobe Reader complains about invalid signatures (or about a signature it
cannot validate, depending on the version of the Reader) because the PDF
itself is broken. Look at its end:

xref
0 1
0000000000 65535 f
1 1
0000190959 00000 n
4 1
0000151889 00000 n
36 9
0000152092 00000 n
0000152268 00000 n
0000189345 00000 n
0000189221 00000 n
0000188161 00000 n
0000168492 00000 n
0000188432 00000 n
0000188618 00000 n
0000189004 00000 n
trailer
<< /Prev 151046/Size 45 /Root 1 0 R /Info 2 0 R
/ID [(Ô8"[õÃÏÌòstartxref
191061
%%EOF

The trailer dictionary is cut of right inside its ID value.

iText seems to ignore this fact and continues verifying the signature as is.
This seems to work out.

Adobe Reader seems to try to make sense out of this mess, repairing it
internally, and so eventually fails when trying to verify the signature.

I manually inspected the signature byte range informations; they are
correctly describing the PDF with the sole exception of the value of the
signature dictionary /Content value, i.e. the signature container, thus
exactly as required.

So any software ignoring that this PDF is broken can positively verify the
signature.

Any software being aware of the issues of the PDF may fail to verify the
signature.

It is very hard for some software product to know whether some other
software product is influenced by some incorrectness of some input data.
Broken input may result in anything.

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/PdfReader-tp4658040p4658041.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
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

Reply via email to