pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1617339 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Date Mon, 11 Aug 2014 18:10:50 GMT
Author: lehmi
Date: Mon Aug 11 18:10:50 2014
New Revision: 1617339

URL: http://svn.apache.org/r1617339
Log:
PDFBOX-2250: parse an optional cross-reference stream to get object numbers for compressed
objects as well

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java?rev=1617339&r1=1617338&r2=1617339&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/NonSequentialPDFParser.java
Mon Aug 11 18:10:50 2014
@@ -363,6 +363,14 @@ public class NonSequentialPDFParser exte
                             + pdfSource.getOffset());
                 }
                 COSDictionary trailer = xrefTrailerResolver.getCurrentTrailer();
+                // check for a XRef stream, it may contain some object ids of compressed
objects 
+                if(trailer.containsKey(COSName.XREF_STM))
+                {
+                    int streamOffset = trailer.getInt(COSName.XREF_STM);
+                    setPdfSource(streamOffset);
+                    skipSpaces();
+                    parseXrefObjStream(prev); 
+                }
                 prev = trailer.getInt(COSName.PREV);
                 if (isLenient && prev > -1)
                 {



Mime
View raw message