pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1667848 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form: PDAcroForm.java PDFieldTreeNode.java
Date Thu, 19 Mar 2015 18:57:33 GMT
Author: msahyoun
Date: Thu Mar 19 18:57:33 2015
New Revision: 1667848

URL: http://svn.apache.org/r1667848
Log:
PDFBOX-2333 allow inheritable attributes at the form level

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java?rev=1667848&r1=1667847&r2=1667848&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java
Thu Mar 19 18:57:33 2015
@@ -323,9 +323,10 @@ public final class PDAcroForm implements
      * 
      * @return the DA element of the dictionary object
      */
-    public COSString getDefaultAppearance()
+    public String getDefaultAppearance()
     {
-        return (COSString) getDictionary().getItem(COSName.DA);
+        COSString defaultAppearance = (COSString) getDictionary().getItem(COSName.DA);
+        return defaultAppearance.getString();
     }
 
     /**

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java?rev=1667848&r1=1667847&r2=1667848&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDFieldTreeNode.java
Thu Mar 19 18:57:33 2015
@@ -128,7 +128,10 @@ public abstract class PDFieldTreeNode im
         {
             return attributesNode.getDictionary().getDictionaryObject(key);
         }
-        return null;
+        else
+        {
+            return getAcroForm().getDictionary().getDictionaryObject(key);
+        }
     }    
     
     /**



Mime
View raw message