Leonard Rosenthol <lrosenth <at> adobe.com> writes:

> 
> Can you send an actual example of a PDF like that?

No, I cannot share because this PDF belongs to a customer, but this part
should be of interest to you:

15 0 obj
<<
/Title(\376\377\000S\000u\000g\000a\000r\000C\000R\000M)
/Author(\376\377\000S\000u\000g\000a\000r\000C\000R\000M)
/Subject(\376\377\000S\000u\000g\000a\000r\000C\000R\000M)
/Keywords(\376\377\000S\000u\000g\000a\000r\000C\000R\000M)
/Creator(\376\377\000S\000u\000g\000a\000r\000C\000R\000M)
/Producer(\376\377\000T\000C\000P\000D\000F\000
\0004\000.\0006\000.\0000\0001\0003\000
\000\(\000h\000t\000t\000p\000:
\000/\000/\000w\000w\000w\000.\000t\000c\000p\000d\000f\000.
\000o\000r\000g\000\))
/CreationDate(D:20130826091703)
/ModDate(D:20130826091703)
>>
endobj

> 
> It's clearly invalid and I'd love to know who made it!

There are some other semi-valid things about this PDF, but there is no point
in throwing exceptions for every minor detail.

> 
> Thanks,
> Leonard
> 
> On 8/27/13 8:16 AM, "Ivan B. Gregor" <ivanbgregor <at> gmail.com> wrote:
> 
> >
> >Hi,
> >
> >Some PDFs contain strange values in trailer/ID, for example:
> >
> >trailer
> ><</Size 17/Info 15 0 R/Root 16 0 R/ID[<><>]>>
> >
> >startxref
> >78443
> >%%EOF
> >
> >PdfStamperImpl has ArrayIndexOutOfBounds in the case above. Patch below
> >fixes the issue:
> >
> >diff -ru originals/com/itextpdf/text/pdf/PdfEncryption.java
> >itextpdf-5.4.2-sources/com/itextpdf/text/pdf/PdfEncryption.java
> >--- originals/com/itextpdf/text/pdf/PdfEncryption.java       2013-05-31
> >12:30:32.000000000 +0300
> >+++ itextpdf-5.4.2-sources/com/itextpdf/text/pdf/PdfEncryption.java
> >2013-08-27 13:41:14.000000000 +0300
> > <at>  <at>  -554,11 +554,11  <at>  <at> 
> >     public static PdfObject createInfoId(byte id[]) {
> >             ByteBuffer buf = new ByteBuffer(90);
> >             buf.append('[').append('<');
> >-            for (int k = 0; k < 16; ++k)
> >+            for (int k = 0; k < id.length; ++k)
> >                     buf.appendHex(id[k]);
> >             buf.append('>').append('<');
> >             id = createDocumentId();
> >-            for (int k = 0; k < 16; ++k)
> >+            for (int k = 0; k < id.length; ++k)
> >                     buf.appendHex(id[k]);
> >             buf.append('>').append(']');
> >             return new PdfLiteral(buf.toByteArray());
> >
> >-- 
> >Ivan
> >
> >
> >
> >--------------------------------------------------------------------------
> >----
> >Introducing Performance Central, a new site from SourceForge and
> >AppDynamics. Performance Central is your source for news, insights,
> >analysis and resources for efficient Application Performance Management.
> >Visit us today!
> >http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktr
> >k
> >_______________________________________________
> >iText-questions mailing list
> >iText-questions <at> 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
> 
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and 
> AppDynamics. Performance Central is your source for news, insights, 
> analysis and resources for efficient Application Performance Management. 
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> iText-questions mailing list
> iText-questions <at> 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
> 
> 





------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
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