| Modifier and Type | Class and Description |
|---|---|
| private static class | Overlay.
Stores the overlay page information. |
| public static enum | Overlay.
Possible location of the overlaid pages: foreground or background. |
| Modifier and Type | Field and Description |
|---|---|
| private PDDocument | |
| private String | |
| private PDDocument | |
| private String | |
| private Overlay. | |
| private PDDocument | |
| private String | |
| private Overlay. | |
| private PDDocument | |
| private String | |
| private Overlay. | |
| private String | |
| private PDDocument | |
| private PDDocument | |
| private String | |
| private Overlay. | |
| private int | |
| private PDDocument | |
| private String | |
| private Overlay. | |
| private final Set | |
| private Overlay. | |
| private Map | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected AffineTransform | Returns: The affine transform to be used.The page that will get the overlay. page, PDRectangle The overlay media box. overlayMediaBox)Calculate the transform to be used when positioning the overlay. |
| public void | close()
Implements java. Close all input documents which were used for the overlay and opened by this class. |
| private COSStream | |
| private List | |
| private Overlay. | |
| private COSStream | |
| private COSName | |
| private COSStream | |
| private String | |
| public String | |
| public String | |
| private Overlay. | |
| private Overlay. | |
| private Map | |
| private PDDocument | |
| private void | |
| public PDDocument | Returns: The modified input PDF document, which has to be saved and closed by the caller. If the input document was passed bysetInputPDF(PDDocument)
then it is that object that is returned.Optional map of overlay files of which the first page will be
used for specific pages of the input document. The page numbers are 1-based. The map must be
empty (but not null) if no specific mappings are used. specificPageOverlayMap)This will add overlays to a document. |
| public PDDocument | Returns: The modified input PDF document, which has to be saved and closed by the caller. If the input document was passed bysetInputPDF(PDDocument)
then it is that object that is returned.Optional map of overlay documents for specific pages. The
page numbers are 1-based. The map must be empty (but not null) if no specific mappings are
used. specificPageOverlayDocumentMap)This will add overlays documents to a document. |
| private void | |
| private void | |
| public void | setAllPagesOverlayFile(String
the all pages overlay file allPagesOverlayFile)Sets the all pages overlay file. |
| public void | setAllPagesOverlayPDF(PDDocument
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. allPagesOverlayPDF)Sets the all pages overlay PDF. |
| public void | setDefaultOverlayFile(String
the default overlay file defaultOverlayFile)Sets the default overlay file. |
| public void | setDefaultOverlayPDF(PDDocument
the default overlay PDF defaultOverlayPDF)Sets the default overlay PDF. |
| public void | setEvenPageOverlayFile(String
the even page overlay file evenPageOverlayFile)Sets the even page overlay file. |
| public void | setEvenPageOverlayPDF(PDDocument
the even page overlay PDF evenPageOverlayPDF)Sets the even page overlay PDF. |
| public void | setFirstPageOverlayFile(String
the first page overlay file firstPageOverlayFile)Sets the first page overlay file. |
| public void | setFirstPageOverlayPDF(PDDocument
the first page overlay PDF firstPageOverlayPDF)Sets the first page overlay PDF. |
| public void | setInputFile(String
the file to be overlaid. The inputFile)PDDocument object gathered from
opening this file will be returned by
overlay(Map<Integer, String>).Sets the file to be overlaid. |
| public void | setInputPDF(PDDocument
the PDF to be overlaid. This will be the object that is returned by
inputPDF)overlay(Map<Integer, String>).Sets the PDF to be overlaid. |
| public void | setLastPageOverlayFile(String
the last page overlay file lastPageOverlayFile)Sets the last page overlay file. |
| public void | setLastPageOverlayPDF(PDDocument
the last page overlay PDF lastPageOverlayPDF)Sets the last page overlay PDF. |
| public void | setOddPageOverlayFile(String
the odd page overlay file oddPageOverlayFile)Sets the odd page overlay file. |
| public void | setOddPageOverlayPDF(PDDocument
the odd page overlay PDF oddPageOverlayPDF)Sets the odd page overlay PDF. |
| public void |
| allPagesOverlay | back to summary |
|---|---|
| private PDDocument allPagesOverlay | |
| allPagesOverlayFilename | back to summary |
|---|---|
| private String allPagesOverlayFilename | |
| defaultOverlay | back to summary |
|---|---|
| private PDDocument defaultOverlay | |
| defaultOverlayFilename | back to summary |
|---|---|
| private String defaultOverlayFilename | |
| defaultOverlayPage | back to summary |
|---|---|
| private Overlay. | |
| evenPageOverlay | back to summary |
|---|---|
| private PDDocument evenPageOverlay | |
| evenPageOverlayFilename | back to summary |
|---|---|
| private String evenPageOverlayFilename | |
| evenPageOverlayPage | back to summary |
|---|---|
| private Overlay. | |
| firstPageOverlay | back to summary |
|---|---|
| private PDDocument firstPageOverlay | |
| firstPageOverlayFilename | back to summary |
|---|---|
| private String firstPageOverlayFilename | |
| firstPageOverlayPage | back to summary |
|---|---|
| private Overlay. | |
| inputFileName | back to summary |
|---|---|
| private String inputFileName | |
| inputPDFDocument | back to summary |
|---|---|
| private PDDocument inputPDFDocument | |
| lastPageOverlay | back to summary |
|---|---|
| private PDDocument lastPageOverlay | |
| lastPageOverlayFilename | back to summary |
|---|---|
| private String lastPageOverlayFilename | |
| lastPageOverlayPage | back to summary |
|---|---|
| private Overlay. | |
| numberOfOverlayPages | back to summary |
|---|---|
| private int numberOfOverlayPages | |
| oddPageOverlay | back to summary |
|---|---|
| private PDDocument oddPageOverlay | |
| oddPageOverlayFilename | back to summary |
|---|---|
| private String oddPageOverlayFilename | |
| oddPageOverlayPage | back to summary |
|---|---|
| private Overlay. | |
| openDocumentsSet | back to summary |
|---|---|
| private final Set<PDDocument> openDocumentsSet | |
| position | back to summary |
|---|---|
| private Overlay. | |
| specificPageOverlayLayoutPageMap | back to summary |
|---|---|
| private Map<Integer, Overlay. | |
| useAllOverlayPages | back to summary |
|---|---|
| private boolean useAllOverlayPages | |
| Overlay | back to summary |
|---|---|
| public Overlay() | |
| addOriginalContent | back to summary |
|---|---|
| private void addOriginalContent(COSBase contents, COSArray contentArray) throws IOException | |
| calculateAffineTransform | back to summary |
|---|---|
| protected AffineTransform calculateAffineTransform(PDPage page, PDRectangle overlayMediaBox) Calculate the transform to be used when positioning the overlay. The default implementation centers on the destination. Override this method to do your own, e.g. move to a corner, or rotate.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Close all input documents which were used for the overlay and opened by this class.
| |
| createCombinedContentStream | back to summary |
|---|---|
| private COSStream createCombinedContentStream(COSBase contents) throws IOException | |
| createContentStreamList | back to summary |
|---|---|
| private List | |
| createLayoutPage | back to summary |
|---|---|
| private Overlay. Create a LayoutPage object from given PDPage object. | |
| createOverlayStream | back to summary |
|---|---|
| private COSStream createOverlayStream(PDPage page, Overlay. | |
| createOverlayXObject | back to summary |
|---|---|
| private COSName createOverlayXObject(PDPage page, Overlay. | |
| createStream | back to summary |
|---|---|
| private COSStream createStream(String content) throws IOException | |
| float2String | back to summary |
|---|---|
| private String float2String(float floatValue) | |
| getDefaultOverlayFile | back to summary |
|---|---|
| public String getDefaultOverlayFile() Returns the default overlay file.
| |
| getInputFile | back to summary |
|---|---|
| public String getInputFile() Returns the input file.
| |
| getLayoutPage | back to summary |
|---|---|
| private Overlay. Create a LayoutPage object from the first page of the given document. | |
| getLayoutPage | back to summary |
|---|---|
| private Overlay. | |
| getLayoutPages | back to summary |
|---|---|
| private Map | |
| loadPDF | back to summary |
|---|---|
| private PDDocument loadPDF(String pdfName) throws IOException | |
| loadPDFs | back to summary |
|---|---|
| private void loadPDFs() throws IOException | |
| overlay | back to summary |
|---|---|
| public PDDocument overlay(Map<Integer, String> specificPageOverlayMap) throws IOException This will add overlays to a document.
| |
| overlayDocuments | back to summary |
|---|---|
| public PDDocument overlayDocuments(Map<Integer, PDDocument> specificPageOverlayDocumentMap) throws IOException This will add overlays documents to a document. If you created the overlay documents with subsetted fonts, you need to save them first so that the subsetting gets done.
| |
| overlayPage | back to summary |
|---|---|
| private void overlayPage(PDPage page, Overlay. | |
| processPages | back to summary |
|---|---|
| private void processPages(PDDocument document) throws IOException | |
| setAllPagesOverlayFile | back to summary |
|---|---|
| public void setAllPagesOverlayFile(String allPagesOverlayFile) Sets the all pages overlay file.
| |
| setAllPagesOverlayPDF | back to summary |
|---|---|
| public void setAllPagesOverlayPDF(PDDocument allPagesOverlayPDF) Sets the all pages overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setDefaultOverlayFile | back to summary |
|---|---|
| public void setDefaultOverlayFile(String defaultOverlayFile) Sets the default overlay file.
| |
| setDefaultOverlayPDF | back to summary |
|---|---|
| public void setDefaultOverlayPDF(PDDocument defaultOverlayPDF) Sets the default overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setEvenPageOverlayFile | back to summary |
|---|---|
| public void setEvenPageOverlayFile(String evenPageOverlayFile) Sets the even page overlay file.
| |
| setEvenPageOverlayPDF | back to summary |
|---|---|
| public void setEvenPageOverlayPDF(PDDocument evenPageOverlayPDF) Sets the even page overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setFirstPageOverlayFile | back to summary |
|---|---|
| public void setFirstPageOverlayFile(String firstPageOverlayFile) Sets the first page overlay file.
| |
| setFirstPageOverlayPDF | back to summary |
|---|---|
| public void setFirstPageOverlayPDF(PDDocument firstPageOverlayPDF) Sets the first page overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setInputFile | back to summary |
|---|---|
| public void setInputFile(String inputFile) Sets the file to be overlaid.
| |
| setInputPDF | back to summary |
|---|---|
| public void setInputPDF(PDDocument inputPDF) Sets the PDF to be overlaid.
| |
| setLastPageOverlayFile | back to summary |
|---|---|
| public void setLastPageOverlayFile(String lastPageOverlayFile) Sets the last page overlay file.
| |
| setLastPageOverlayPDF | back to summary |
|---|---|
| public void setLastPageOverlayPDF(PDDocument lastPageOverlayPDF) Sets the last page overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setOddPageOverlayFile | back to summary |
|---|---|
| public void setOddPageOverlayFile(String oddPageOverlayFile) Sets the odd page overlay file.
| |
| setOddPageOverlayPDF | back to summary |
|---|---|
| public void setOddPageOverlayPDF(PDDocument oddPageOverlayPDF) Sets the odd page overlay PDF. If you created the overlay document with subsetted fonts, you need to save it first so that the subsetting gets done.
| |
| setOverlayPosition | back to summary |
|---|---|
| public void setOverlayPosition(Overlay. Sets the overlay position. | |
| Modifier and Type | Field and Description |
|---|---|
| private final COSStream | |
| private final PDRectangle | |
| private final COSDictionary | |
| private final short |
| Access | Constructor and Description |
|---|---|
| private |
| overlayContentStream | back to summary |
|---|---|
| private final COSStream overlayContentStream | |
| overlayMediaBox | back to summary |
|---|---|
| private final PDRectangle overlayMediaBox | |
| overlayResources | back to summary |
|---|---|
| private final COSDictionary overlayResources | |
| overlayRotation | back to summary |
|---|---|
| private final short overlayRotation | |
| LayoutPage | back to summary |
|---|---|
| private LayoutPage(PDRectangle mediaBox, COSStream contentStream, COSDictionary resources, short rotation) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Overlay. | |
| public static final Overlay. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Overlay. | |
| public static Overlay. |
| BACKGROUND | back to summary |
|---|---|
| public static final Overlay. | |
| FOREGROUND | back to summary |
|---|---|
| public static final Overlay. | |
| Position | back to summary |
|---|---|
| private Position() | |
| valueOf | back to summary |
|---|---|
| public static Overlay. | |
| values | back to summary |
|---|---|
| public static Overlay. | |