public class Overlay
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
Overlay.Position |
Possible location of the overlayed pages: foreground or background.
|
Constructor | Description |
---|---|
Overlay() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Close all input pdfs which were used for the overlay.
|
java.lang.String |
getDefaultOverlayFile() |
Returns the default overlay file.
|
java.lang.String |
getInputFile() |
Returns the input file.
|
PDDocument |
overlay(java.util.Map<java.lang.Integer,java.lang.String> specificPageOverlayFile) |
This will add overlays to a documents.
|
void |
setAllPagesOverlayFile(java.lang.String allPagesOverlayFile) |
Sets the all pages overlay file.
|
void |
setAllPagesOverlayPDF(PDDocument allPagesOverlayPDF) |
Sets the all pages overlay PDF.
|
void |
setDefaultOverlayFile(java.lang.String defaultOverlayFile) |
Sets the default overlay file.
|
void |
setDefaultOverlayPDF(PDDocument defaultOverlayPDF) |
Sets the default overlay PDF.
|
void |
setEvenPageOverlayFile(java.lang.String evenPageOverlayFile) |
Sets the even page overlay file.
|
void |
setEvenPageOverlayPDF(PDDocument evenPageOverlayPDF) |
Sets the even page overlay PDF.
|
void |
setFirstPageOverlayFile(java.lang.String firstPageOverlayFile) |
Sets the first page overlay file.
|
void |
setFirstPageOverlayPDF(PDDocument firstPageOverlayPDF) |
Sets the first page overlay PDF.
|
void |
setInputFile(java.lang.String inputFile) |
Sets the file to be overlayed.
|
void |
setInputPDF(PDDocument inputPDF) |
Sets the PDF to be overlayed.
|
void |
setLastPageOverlayFile(java.lang.String lastPageOverlayFile) |
Sets the last page overlay file.
|
void |
setLastPageOverlayPDF(PDDocument lastPageOverlayPDF) |
Sets the last page overlay PDF.
|
void |
setOddPageOverlayFile(java.lang.String oddPageOverlayFile) |
Sets the odd page overlay file.
|
void |
setOddPageOverlayPDF(PDDocument oddPageOverlayPDF) |
Sets the odd page overlay PDF.
|
void |
setOverlayPosition(Overlay.Position overlayPosition) |
Sets the overlay position.
|
public PDDocument overlay(java.util.Map<java.lang.Integer,java.lang.String> specificPageOverlayFile) throws java.io.IOException
specificPageOverlayFile
- map of overlay files for specific pagesjava.io.IOException
- if something went wrongpublic void close() throws java.io.IOException
java.io.IOException
- if something went wrongpublic void setOverlayPosition(Overlay.Position overlayPosition)
overlayPosition
- the overlay positionpublic void setInputFile(java.lang.String inputFile)
inputFile
- the file to be overlayedpublic void setInputPDF(PDDocument inputPDF)
inputPDF
- the PDF to be overlayedpublic java.lang.String getInputFile()
public void setDefaultOverlayFile(java.lang.String defaultOverlayFile)
defaultOverlayFile
- the default overlay filepublic void setDefaultOverlayPDF(PDDocument defaultOverlayPDF)
defaultOverlayPDF
- the default overlay PDFpublic java.lang.String getDefaultOverlayFile()
public void setFirstPageOverlayFile(java.lang.String firstPageOverlayFile)
firstPageOverlayFile
- the first page overlay filepublic void setFirstPageOverlayPDF(PDDocument firstPageOverlayPDF)
firstPageOverlayPDF
- the first page overlay PDFpublic void setLastPageOverlayFile(java.lang.String lastPageOverlayFile)
lastPageOverlayFile
- the last page overlay filepublic void setLastPageOverlayPDF(PDDocument lastPageOverlayPDF)
lastPageOverlayPDF
- the last page overlay PDFpublic void setAllPagesOverlayFile(java.lang.String allPagesOverlayFile)
allPagesOverlayFile
- the all pages overlay filepublic void setAllPagesOverlayPDF(PDDocument allPagesOverlayPDF)
allPagesOverlayPDF
- the all pages overlay PDF. This should not be a PDDocument that you
created on the fly, it should be saved first, if it contains any fonts that are subset.public void setOddPageOverlayFile(java.lang.String oddPageOverlayFile)
oddPageOverlayFile
- the odd page overlay filepublic void setOddPageOverlayPDF(PDDocument oddPageOverlayPDF)
oddPageOverlayPDF
- the odd page overlay PDFpublic void setEvenPageOverlayFile(java.lang.String evenPageOverlayFile)
evenPageOverlayFile
- the even page overlay filepublic void setEvenPageOverlayPDF(PDDocument evenPageOverlayPDF)
evenPageOverlayPDF
- the even page overlay PDFCopyright © 2002–2018. All rights reserved.