pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1667148 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java
Date Mon, 16 Mar 2015 22:41:26 GMT
Author: msahyoun
Date: Mon Mar 16 22:41:26 2015
New Revision: 1667148

URL: http://svn.apache.org/r1667148
Log:
PDFBOX-2003 correct setting initial AcroForm when merging

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=1667148&r1=1667147&r2=1667148&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 Mon
Mar 16 22:41:26 2015
@@ -266,10 +266,12 @@ public class PDFMergerUtility
         {
             PDAcroForm destAcroForm = destCatalog.getAcroForm();
             PDAcroForm srcAcroForm = srcCatalog.getAcroForm();
-            if (destAcroForm == null)
+            
+            if (destAcroForm == null && srcAcroForm != null)
             {
-                cloner.cloneForNewDocument(srcAcroForm);
-                destCatalog.setAcroForm(srcAcroForm);
+                destCatalog.getCOSObject().setItem(COSName.ACRO_FORM,
+                        cloner.cloneForNewDocument(srcAcroForm.getDictionary()));       
+                
             }
             else
             {



Mime
View raw message