In This Topic
Using DynamicPDF Merger for Java is very straight forward. The object model is intuitive and can be learned quickly. Many tasks can be performed with only a few lines of code and complex operations can be performed easily.
DynamicPDF Merger for Java uses DynamicPDF Generator for Java for output of the PDF document. The Merger for Java classes primarily handle the import of the PDF documents while relying on Generator for Java for the output. Merger for Java provides three main objects that are used for importing PDF documents.
- MergeDocument
- Inherits from the Document class and is used for Merging PDF documents together. It also has functionality for appending a PDF document or selecting pages from a PDF document.
- ImportedPage
- Inherits from the Page class and is used to retrieve and add a single page to a document. Page elements can then be added to the page and will appear on top of the original page. This is useful for using a existing page from a PDF document as a template.
- ImportedPageArea
- Inherits from the PageElement class and is used for placing data from an imported PDF document onto a page. This data can be scaled, rotated, and clipped. It can also be used to place multiple imported pages onto a single page.
- ImportedPageData
- Inherits from the PageElement class and is used for placing data from an imported PDF document onto a page. This data can be scaled, rotated, and clipped. It can also be used to place multiple imported pages onto a single page. This page element defaults to the center of the page and can be offset.
- A PdfDocument and PdfPage class are also included. The PdfDocument class represents a PDF document for import. It can be instantiated using the file path to a file or from a FileInputStream, ByteArrayInputStream and byte array object. Once instantiated, it contains a collection of PdfPage objects and can be used to determine the number of pages in an imported document. It is accepted in the constructor of the MergeDocument class. The PdfPage class represents a page from a PDF document for import. It can be retrieved from a PdfDocument object and can be used to determine the size of an imported page. It is accepted in the constructor of the ImportedPageArea, ImportedPage and ImportedPageData classes.
PDF Form Filling
Merger for Java also contains classes for modifying, filling, flattening and reading Acro Form Field data. See the Working With Acro Forms topic for details.
See Also