pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1723925 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java
Date Sun, 10 Jan 2016 13:43:36 GMT
Author: tilman
Date: Sun Jan 10 13:43:36 2016
New Revision: 1723925

URL: http://svn.apache.org/viewvc?rev=1723925&view=rev
Log:
PDFBOX-962: avoid NPE; setNeedAppearances

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java?rev=1723925&r1=1723924&r2=1723925&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/ImportFDF.java Sun Jan 10 13:43:36
2016
@@ -52,8 +52,15 @@ public class ImportFDF
     {
         PDDocumentCatalog docCatalog = pdfDocument.getDocumentCatalog();
         PDAcroForm acroForm = docCatalog.getAcroForm();
+        if (acroForm == null)
+        {
+            return;
+        }
         acroForm.setCacheFields( true );
         acroForm.importFDF( fdfDocument );
+        
+        //TODO this can be removed when we create appearance streams
+        acroForm.setNeedAppearances(true);
     }
 
     /**



Mime
View raw message