pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1814946 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
Date Sat, 11 Nov 2017 12:34:23 GMT
Author: tilman
Date: Sat Nov 11 12:34:23 2017
New Revision: 1814946

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java?rev=1814946&r1=1814945&r2=1814946&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/LayerUtility.java Sat Nov
11 12:34:23 2017
@@ -125,6 +125,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
@@ -142,6 +146,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
@@ -217,6 +225,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



Mime
View raw message