pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1850476 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
Date Sat, 05 Jan 2019 12:08:54 GMT
Author: tilman
Date: Sat Jan  5 12:08:54 2019
New Revision: 1850476

URL: http://svn.apache.org/viewvc?rev=1850476&view=rev
Log:
PDFBOX-4071: use getCOSDictionary() convenience method

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java?rev=1850476&r1=1850475&r2=1850476&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java Sat
Jan  5 12:08:54 2019
@@ -1211,10 +1211,10 @@ public class PDFMergerUtility
             COSDictionary parentTreeEntry, Map<COSDictionary, COSDictionary> objMapping)
             throws IOException
     {
-        COSBase page = parentTreeEntry.getDictionaryObject(COSName.PG);
-        if (page instanceof COSDictionary && objMapping.containsKey(page))
+        COSDictionary pageDict = parentTreeEntry.getCOSDictionary(COSName.PG);
+        if (objMapping.containsKey(pageDict))
         {
-            parentTreeEntry.setItem(COSName.PG, objMapping.get(page));
+            parentTreeEntry.setItem(COSName.PG, objMapping.get(pageDict));
         }
         COSBase obj = parentTreeEntry.getDictionaryObject(COSName.OBJ);
         if (obj instanceof COSDictionary)



Mime
View raw message