[ 
https://issues.apache.org/jira/browse/PDFBOX-1174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160766#comment-13160766
 ] 

Timo Boehme commented on PDFBOX-1174:
-------------------------------------

Only for illustration here is a snippet from a PDF with garbage (remains from 
old objects; therefore problematic to find next correct start; I've deactivated 
looking for 'stream' in PDFParser#skipToNextObj since it stopped on each 
'endstream'):

      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>
<?xpacket end="r"?>
endstream
endobj
<</Filter/FlateDecode/First 13/Length 108/N 2/Type/ObjStm>>stream
...K....qz'..w...
3P.
p..K....0Q".ՋN;..A&.....
...#).9m.ƿL,/.>.....@..|..B..
ո..
..V...5.=.J.......g{.Oq.
endstream
endobj
<0C60053F04D4C65448AD9638BA1EB781591C15E992BA7C448D75>   >stream
{.#H    
.....p...c.T.....b.F}g˫.Z.3)1.n..&.:...A.>..@..G...jʻMW@....g.8ew.)..!]..
..
.T.^o....u^
....\....^..
endstream
endobj
/Filter/FlateDecode/First 13/Length 108/N 2/Type/ObjStm>>stream
5..3..~.M^j     
.;sX9..i(...y.......m.!SL.R.'.W.:H!;G..c...(O.W^./...@m..z.Γ{..i.8.XK..ư............eK.Q....a.
endstream
endobj
Filter/FlateDecode/First 13/Length 108/N 2/Type/ObjStm>>stream
A...ck...ޘ....;.Ÿa.. GwN...w.NCӛ..+.n~......Y., X.Q.@-. 
.E..S**.....*6#..d]...#.ȷ..&+;0...С.m...*....
endstream
endobj
lter/FlateDecode/First 13/Length 108/N 2/Type/ObjStm>>stream
..iN......xj?{0<&m....W.#...Z].d!....!...b..>.o.N..Gq28.K.W.k......y    f...9 
..u{....i..xV ..I....(=6M..W.
endstream
endobj

The first endstream/endobj is regular end of an object. The PDF was produced by 
verypdf.com.
                
> i have problem in  BaseParser.readInt
> -------------------------------------
>
>                 Key: PDFBOX-1174
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1174
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing, PDModel
>    Affects Versions: 1.6.0
>            Reporter: ahmad makram
>
> i can't load PDF to PDDocument.load( )
> it give me this exception
> java.io.IOException: Error: Expected an integer type, actual='Fatal'
>       at org.apache.pdfbox.pdfparser.BaseParser.readInt(BaseParser.java:1384)
>       at org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:517)
>       at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1069)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1036)
>       at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1007)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to