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 2018/08/25 11:28:25 UTC
svn commit: r1839027 -
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
Author: tilman
Date: Sat Aug 25 11:28:24 2018
New Revision: 1839027
URL: http://svn.apache.org/viewvc?rev=1839027&view=rev
Log:
PDFBOX-4294: clarify javadoc
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java?rev=1839027&r1=1839026&r2=1839027&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/multipdf/Overlay.java Sat Aug 25 11:28:24 2018
@@ -87,22 +87,22 @@ public class Overlay
private String evenPageOverlayFilename = null;
private PDDocument evenPageOverlay = null;
-
private int numberOfOverlayPages = 0;
private boolean useAllOverlayPages = false;
/**
- * This will add overlays to a documents.
- *
- * @param specificPageOverlayFile map of overlay files for specific pages.
- * The page numbers are 1-based.
+ * This will add overlays to a document.
+ *
+ * @param specificPageOverlayFile map of overlay files for specific pages. The page numbers are
+ * 1-based.
+ *
+ * @return The modified input PDF document, which has to be saved and closed by the caller. If
+ * the input document was passed by {@link #setInputPDF(PDDocument) setInputPDF(PDDocument)}
+ * then it is that object that is returned.
*
- * @return the resulting pdf, which has to be saved and closed be the caller
- *
* @throws IOException if something went wrong
*/
- public PDDocument overlay(Map<Integer, String> specificPageOverlayFile)
- throws IOException
+ public PDDocument overlay(Map<Integer, String> specificPageOverlayFile) throws IOException
{
Map<String, PDDocument> loadedDocuments = new HashMap<>();
Map<PDDocument, LayoutPage> layouts = new HashMap<>();
@@ -523,8 +523,10 @@ public class Overlay
/**
* Sets the file to be overlayed.
- *
- * @param inputFile the file to be overlayed
+ *
+ * @param inputFile the file to be overlayed. The {@link PDDocument} object gathered from
+ * opening this file will be returned by
+ * {@link #overlay(java.util.Map) overlay(Map<Integer, String>)}.
*/
public void setInputFile(String inputFile)
{
@@ -533,8 +535,9 @@ public class Overlay
/**
* Sets the PDF to be overlayed.
- *
- * @param inputPDF the PDF to be overlayed
+ *
+ * @param inputPDF the PDF to be overlayed. This will be the object that is returned by
+ * {@link #overlay(java.util.Map) overlay(Map<Integer, String>)}.
*/
public void setInputPDF(PDDocument inputPDF)
{