pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1809756 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
Date Tue, 26 Sep 2017 15:35:53 GMT
Author: tilman
Date: Tue Sep 26 15:35:52 2017
New Revision: 1809756

URL: http://svn.apache.org/viewvc?rev=1809756&view=rev
Log:
PDFBOX-3940: /Info dictionary can't have a /Parent item, and /ModDate is not mandatory

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java?rev=1809756&r1=1809755&r2=1809756&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/COSParser.java Tue
Sep 26 15:35:52 2017
@@ -1804,8 +1804,9 @@ public class COSParser extends BaseParse
                         trailer.setItem(COSName.ROOT, document.getObjectFromPool(entry.getKey()));
                     }
                     // info dictionary
-                    else if (dictionary.containsKey(COSName.MOD_DATE) && 
-                            (dictionary.containsKey(COSName.TITLE)
+                    else if (!dictionary.containsKey(COSName.PARENT) && 
+                              (dictionary.containsKey(COSName.MOD_DATE)
+                            || dictionary.containsKey(COSName.TITLE)
                             || dictionary.containsKey(COSName.AUTHOR)
                             || dictionary.containsKey(COSName.SUBJECT)
                             || dictionary.containsKey(COSName.KEYWORDS)



Mime
View raw message