pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1668690 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Mon, 23 Mar 2015 17:51:51 GMT
Author: lehmi
Date: Mon Mar 23 17:51:51 2015
New Revision: 1668690

URL: http://svn.apache.org/r1668690
Log:
PDFBOX-2679: don't replace the xref table entries with the brute force results but merge them.
Fixed the offset calculation

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1668690&r1=1668689&r2=1668690&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Mon Mar 23
17:51:51 2015
@@ -1172,7 +1172,6 @@ public class COSParser extends BaseParse
                 if (bfSearchCOSObjectKeyOffsets != null && !bfSearchCOSObjectKeyOffsets.isEmpty())
                 {
                     LOG.debug("Replaced read xref table with the results of a brute force
search");
-                    xrefOffset.clear();
                     xrefOffset.putAll(bfSearchCOSObjectKeyOffsets);
                 }
             }
@@ -1288,7 +1287,7 @@ public class COSParser extends BaseParse
                                 }
                                 if (objectID != null)
                                 {
-                                    bfSearchCOSObjectKeyOffsets.put(new COSObjectKey(objectID,
genID), tempOffset);
+                                    bfSearchCOSObjectKeyOffsets.put(new COSObjectKey(objectID,
genID), tempOffset+1);
                                 }
                             }
                         }



Mime
View raw message