pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1674986 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
Date Mon, 20 Apr 2015 21:16:28 GMT
Author: tilman
Date: Mon Apr 20 21:16:28 2015
New Revision: 1674986

URL: http://svn.apache.org/r1674986
Log:
PDFBOX-2767: allow object reference

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1674986&r1=1674985&r2=1674986&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Mon Apr 20
21:16:28 2015
@@ -317,15 +317,15 @@ public class PDDocument implements Close
                 if (base instanceof COSDictionary)
                 {
                     COSDictionary cosBaseDict = (COSDictionary) base;
-                    COSBase ft = ((COSDictionary) base).getItem(COSName.FT);
-                    COSBase type = ((COSDictionary) base).getItem(COSName.TYPE);
-                    COSBase apDict = ((COSDictionary) base).getItem(COSName.AP);
+                    COSBase ft = cosBaseDict.getDictionaryObject(COSName.FT);
+                    COSBase type = cosBaseDict.getDictionaryObject(COSName.TYPE);
+                    COSBase apDict = cosBaseDict.getDictionaryObject(COSName.AP);
 
                     // Search for signature annotation
                     if (annotNotFound && COSName.ANNOT.equals(type))
                     {
                         // 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;
@@ -341,7 +341,7 @@ public class PDDocument implements Close
                         signatureField.getWidget().setAppearance(ap);
 
                         // read and set AcroForm DefaultResource
-                        COSDictionary dr = (COSDictionary) cosBaseDict.getItem(COSName.DR);
+                        COSDictionary dr = (COSDictionary) cosBaseDict.getDictionaryObject(COSName.DR);
                         if (dr != null)
                         {
                             dr.setDirect(true);



Mime
View raw message