pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1851835 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf: PDFCloneUtility.java PDFMergerUtility.java
Date Tue, 22 Jan 2019 16:49:07 GMT
Author: tilman
Date: Tue Jan 22 16:49:07 2019
New Revision: 1851835

URL: http://svn.apache.org/viewvc?rev=1851835&view=rev
Log:
PDFBOX-3973: cloneMerge OCGs; dereference COSArray too when cloneMerging

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java?rev=1851835&r1=1851834&r2=1851835&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFCloneUtility.java Tue
Jan 22 16:49:07 2019
@@ -184,7 +184,7 @@ class PDFCloneUtility
               {
                   cloneMerge(((COSObject) base).getObject(),((COSObject) target).getObject()
);
               }
-              else if(target instanceof COSDictionary)
+              else if (target instanceof COSDictionary || target instanceof COSArray)
               {
                   cloneMerge(((COSObject) base).getObject(), target);
               }

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=1851835&r1=1851834&r2=1851835&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 Tue
Jan 22 16:49:07 2019
@@ -688,6 +688,10 @@ public class PDFMergerUtility
         {
             destCatalog.getCOSObject().setItem(COSName.OCPROPERTIES, cloner.cloneForNewDocument(srcOCP));
         }
+        else if (destOCP != null && srcOCP != null)
+        {
+            cloner.cloneMerge(srcOCP, destOCP);
+        }
 
         mergeOutputIntents(cloner, srcCatalog, destCatalog);
 



Mime
View raw message