pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1844506 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
Date Sun, 21 Oct 2018 17:23:31 GMT
Author: tilman
Date: Sun Oct 21 17:23:31 2018
New Revision: 1844506

URL: http://svn.apache.org/viewvc?rev=1844506&view=rev
Log:
PDFBOX-4357: /Pages must be a dictionary

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java?rev=1844506&r1=1844505&r2=1844506&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFParser.java Sun
Oct 21 17:23:31 2018
@@ -193,9 +193,9 @@ public class PDFParser extends COSParser
         }
         // check pages dictionaries
         checkPages(root);
-        if (root.getDictionaryObject(COSName.PAGES) == null)
+        if (!(root.getDictionaryObject(COSName.PAGES) instanceof COSDictionary))
         {
-            throw new IOException("Page tree root is null");
+            throw new IOException("Page tree root must be a dictionary");
         }
         document.setDecrypted();
         initialParseDone = true;



Mime
View raw message