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 2016/01/26 21:22:11 UTC

svn commit: r1726879 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.java

Author: tilman
Date: Tue Jan 26 20:22:11 2016
New Revision: 1726879

URL: http://svn.apache.org/viewvc?rev=1726879&view=rev
Log:
PDFBOX-2852: replace deprecated calls

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroForm.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=1726879&r1=1726878&r2=1726879&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 Tue Jan 26 20:22:11 2016
@@ -192,6 +192,7 @@ public final class PDAcroForm implements
      * <p>Flattening a form field will take the current appearance and make that part
      * of the pages content stream. All form fields and annotations associated are removed.</p>
      * 
+     * @param fields
      * @param refreshAppearances if set to true the appearances for the form field widgets will be updated
      * @throws IOException 
      */
@@ -237,7 +238,7 @@ public final class PDAcroForm implements
                         contentStream = new PDPageContentStream(document, page, true, true);
                     }
                     
-                    PDFormXObject fieldObject = new PDFormXObject(widget.getNormalAppearanceStream().getCOSStream());
+                    PDFormXObject fieldObject = new PDFormXObject(widget.getNormalAppearanceStream().getCOSObject());
                     
                     Matrix translationMatrix = Matrix.getTranslateInstance(widget.getRectangle().getLowerLeftX(), widget.getRectangle().getLowerLeftY());
                     contentStream.saveGraphicsState();
@@ -293,6 +294,7 @@ public final class PDAcroForm implements
      * Refreshes the appearance streams and appearance dictionaries for 
      * the widget annotations of the specified fields.
      * 
+     * @param fields
      * @throws IOException
      */
     public void refreshAppearances(List<PDField> fields) throws IOException