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 2017/11/11 12:34:19 UTC

svn commit: r1814945 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java

Author: tilman
Date: Sat Nov 11 12:34:19 2017
New Revision: 1814945

URL: http://svn.apache.org/viewvc?rev=1814945&view=rev
Log:
PDFBOX-4002: improve javadoc with reference to wrapInSaveRestore()

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java?rev=1814945&r1=1814944&r2=1814945&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java Sat Nov 11 12:34:19 2017
@@ -123,6 +123,10 @@ public class LayerUtility
     /**
      * Imports a page from some PDF file as a Form XObject so it can be placed on another page
      * in the target document.
+     * <p>
+     * You may want to call {@link #wrapInSaveRestore(PDPage) wrapInSaveRestore(PDPage)} before invoking the Form XObject to
+     * make sure that the graphics state is reset.
+     * 
      * @param sourceDoc the source PDF document that contains the page to be copied
      * @param pageNumber the page number of the page to be copied
      * @return a Form XObject containing the original page's content
@@ -140,6 +144,10 @@ public class LayerUtility
     /**
      * Imports a page from some PDF file as a Form XObject so it can be placed on another page
      * in the target document.
+     * <p>
+     * You may want to call {@link #wrapInSaveRestore(PDPage) wrapInSaveRestore(PDPage)} before invoking the Form XObject to
+     * make sure that the graphics state is reset.
+     * 
      * @param sourceDoc the source PDF document that contains the page to be copied
      * @param page the page in the source PDF document to be copied
      * @return a Form XObject containing the original page's content
@@ -215,6 +223,10 @@ public class LayerUtility
      * The form is enveloped in a marked content section to indicate that it's part of an
      * optional content group (OCG), here used as a layer. This optional group is returned and
      * can be enabled and disabled through methods on {@link PDOptionalContentProperties}.
+     * <p>
+     * You may want to call {@link #wrapInSaveRestore(PDPage) wrapInSaveRestore(PDPage)} before calling this method to make
+     * sure that the graphics state is reset.
+     *
      * @param targetPage the target page
      * @param form the form to place
      * @param transform the transformation matrix that controls the placement