You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/04/20 23:13:24 UTC

svn commit: r1674985 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java

Author: tilman
Date: Mon Apr 20 21:13:24 2015
New Revision: 1674985

URL: http://svn.apache.org/r1674985
Log:
PDFBOX-2767: allow object reference for /AP and /DR

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1674985&r1=1674984&r2=1674985&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Mon Apr 20 21:13:24 2015
@@ -463,9 +463,9 @@ public class PDDocument implements Pagea
                 COSBase base = cosObject.getObject();
                 if (base != null && base instanceof COSDictionary)
                 {
-                    COSBase ft = ((COSDictionary)base).getItem(COSName.FT);
-                    COSBase type = ((COSDictionary)base).getItem(COSName.TYPE);
-                    COSBase apDict = ((COSDictionary)base).getItem(COSName.AP);
+                    COSBase ft = ((COSDictionary)base).getDictionaryObject(COSName.FT);
+                    COSBase type = ((COSDictionary)base).getDictionaryObject(COSName.TYPE);
+                    COSBase apDict = ((COSDictionary)base).getDictionaryObject(COSName.AP);
             
                     // Search for signature annotation
                     if (annotNotFound && COSName.ANNOT.equals(type))
@@ -473,7 +473,7 @@ public class PDDocument implements Pagea
                         COSDictionary cosBaseDict = (COSDictionary)base;
               
                         // Read and set the Rectangle for visual signature
-                        COSArray rectAry = (COSArray)cosBaseDict.getItem(COSName.RECT);
+                        COSArray rectAry = (COSArray)cosBaseDict.getDictionaryObject(COSName.RECT);
                         PDRectangle rect = new PDRectangle(rectAry);
                         signatureField.getWidget().setRectangle(rect);
                         annotNotFound = false;
@@ -491,7 +491,7 @@ public class PDDocument implements Pagea
                         signatureField.getWidget().setAppearance(ap);
               
                         // read and set AcroForm DefaultResource
-                        COSBase dr = cosBaseDict.getItem(COSName.DR);
+                        COSBase dr = cosBaseDict.getDictionaryObject(COSName.DR);
                         if (dr != null)
                         {
                             dr.setDirect(true);