DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger
Class MergeDocument

java.lang.Object
  |
  +--com.cete.dynamicpdf.Document
        |
        +--com.cete.dynamicpdf.merger.MergeDocument

public class MergeDocument
extends Document

This is the primary class used to merge or append entire PDF documents or certain pages from existing documents. The merge document can be output to any object derived from the java.io.* class that supports writing and can easily be integrated with SERVLETS/JSP to stream the document to Internet Information Server's HTTP output stream.

View Example


Constructor Summary
MergeDocument()
          Initializes a new instance of the MergeDocument class.
MergeDocument(PdfDocument pdfDocument)
          Initializes a new instance of the MergeDocument class.
MergeDocument(PdfDocument pdfDocument, int startPage, int pageCount)
          Initializes a new instance of the MergeDocument class.
MergeDocument(PdfDocument pdfDocument, int startPage, int pageCount, MergeOptions options)
          Initializes a new instance of the MergeDocument class.
MergeDocument(PdfDocument pdfDocument, MergeOptions options)
          Initializes a new instance of the MergeDocument class.
MergeDocument(java.lang.String filePath)
          Initializes a new instance of the MergeDocument class.
MergeDocument(java.lang.String filePath, int startPage, int pageCount)
          Initializes a new instance of the MergeDocument class.
MergeDocument(java.lang.String filePath, int startPage, int pageCount, MergeOptions options)
          Initializes a new instance of the MergeDocument class.
MergeDocument(java.lang.String filePath, MergeOptions options)
          Initializes a new instance of the MergeDocument class.
 
Method Summary
 ImportedPage[] append(PdfDocument pdfDocument)
          Appends a PDF document to the current document.
 ImportedPage[] append(PdfDocument pdfDocument, int startPage, int pageCount)
          Appends a PDF document to the current document.
 ImportedPage[] append(PdfDocument pdfDocument, int startPage, int pageCount, MergeOptions options)
          Appends a PDF document to the current document.
 ImportedPage[] append(PdfDocument pdfDocument, MergeOptions options)
          Appends a PDF document to the current document.
 ImportedPage[] append(java.lang.String filePath)
          Appends a PDF document to the current document.
 ImportedPage[] append(java.lang.String filePath, int startPage, int pageCount)
          Appends a PDF document to the current document.
 ImportedPage[] append(java.lang.String filePath, int startPage, int pageCount, MergeOptions options)
          Appends a PDF document to the current document.
 ImportedPage[] append(java.lang.String filePath, MergeOptions options)
          Appends a PDF document to the current document.
static MergeDocument merge(PdfDocument firstDocument, MergeOptions firstDocumentOptions, PdfDocument secondDocument, MergeOptions secondDocumentOptions)
          Merges two PDF documents together.
static MergeDocument merge(PdfDocument firstDocument, PdfDocument secondDocument)
          Merges two PDF documents together.
static MergeDocument merge(java.lang.String firstDocumentFilePath, MergeOptions firstDocumentOptions, java.lang.String secondDocumentFilePath, MergeOptions secondDocumentOptions)
          Merges two PDF documents together.
static MergeDocument merge(java.lang.String firstDocumentFilePath, java.lang.String secondDocumentFilePath)
          Merges two PDF documents together.
 
Methods inherited from class com.cete.dynamicpdf.Document
addLicense, append, draw, draw, draw, drawToWeb, drawToWeb, drawToWeb, drawToWeb, drawToWebPage, drawToWebPage, drawToWebPage, drawToWebPage, getAuthor, getCompressionLevel, getCreator, getForm, getInitialPage, getInitialPageMode, getInitialPageZoom, getKeywords, getOutlines, getPages, getPdfVersion, getSections, getSecurity, getSubject, getTemplate, getTitle, getViewerPreferences, requireLicense, requireLicense, setAuthor, setCompressionLevel, setCreator, setForm, setInitialPage, setInitialPageMode, setInitialPageZoom, setKeywords, setPdfVersion, setProducer, setProducer, setSecurity, setSubject, setTemplate, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeDocument

public MergeDocument()
Initializes a new instance of the MergeDocument class.


MergeDocument

public MergeDocument(java.lang.String filePath)
Initializes a new instance of the MergeDocument class.

Parameters:
filePath - The physical file path of the PDF to import.

MergeDocument

public MergeDocument(PdfDocument pdfDocument)
Initializes a new instance of the MergeDocument class.

Parameters:
pdfDocument - The PdfDocument to import.
See Also:
PdfDocument

MergeDocument

public MergeDocument(java.lang.String filePath,
                     MergeOptions options)
Initializes a new instance of the MergeDocument class.

Parameters:
filePath - The physical file path of the PDF to import.
options - A MergeOptions object specifying the merge options.
See Also:
MergeOptions

MergeDocument

public MergeDocument(PdfDocument pdfDocument,
                     MergeOptions options)
Initializes a new instance of the MergeDocument class.

Parameters:
pdfDocument - The PdfDocument to import.
options - A MergeOptions object specifying the merge options.
See Also:
PdfDocument, MergeOptions

MergeDocument

public MergeDocument(java.lang.String filePath,
                     int startPage,
                     int pageCount)
Initializes a new instance of the MergeDocument class.

Parameters:
filePath - The physical file path of the PDF to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.

MergeDocument

public MergeDocument(PdfDocument pdfDocument,
                     int startPage,
                     int pageCount)
Initializes a new instance of the MergeDocument class.

Parameters:
pdfDocument - The PdfDocument to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.
See Also:
PdfDocument

MergeDocument

public MergeDocument(java.lang.String filePath,
                     int startPage,
                     int pageCount,
                     MergeOptions options)
Initializes a new instance of the MergeDocument class.

Parameters:
filePath - The physical file path of the PDF to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.
options - A MergeOptions object specifying the merge options.
See Also:
MergeOptions

MergeDocument

public MergeDocument(PdfDocument pdfDocument,
                     int startPage,
                     int pageCount,
                     MergeOptions options)
Initializes a new instance of the MergeDocument class.

Parameters:
pdfDocument - The PdfDocument to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.
options - A MergeOptions object specifying the merge options.
See Also:
PdfDocument, MergeOptions
Method Detail

append

public ImportedPage[] append(java.lang.String filePath)
Appends a PDF document to the current document.

Parameters:
filePath - The physical file path of the PDF to import.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
ImportedPage

append

public ImportedPage[] append(PdfDocument pdfDocument)
Appends a PDF document to the current document.

Parameters:
pdfDocument - The PdfDocument to import.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
PdfDocument, ImportedPage

append

public ImportedPage[] append(java.lang.String filePath,
                             MergeOptions options)
Appends a PDF document to the current document.

Parameters:
filePath - The physical file path of the PDF to import.
options - A MergeOptions object specifying the merge options.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
MergeOptions, ImportedPage

append

public ImportedPage[] append(PdfDocument pdfDocument,
                             MergeOptions options)
Appends a PDF document to the current document.

Parameters:
pdfDocument - The PdfDocument to import.
options - A MergeOptions object specifying the merge options.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
PdfDocument, MergeOptions, ImportedPage

append

public ImportedPage[] append(java.lang.String filePath,
                             int startPage,
                             int pageCount)
Appends a PDF document to the current document.

Parameters:
filePath - The physical file path of the PDF to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
ImportedPage

append

public ImportedPage[] append(PdfDocument pdfDocument,
                             int startPage,
                             int pageCount)
Appends a PDF document to the current document.

Parameters:
pdfDocument - The PdfDocument to import.
startPage - The page to start appending from.
pageCount - The number of pages to append.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
PdfDocument, ImportedPage

append

public ImportedPage[] append(java.lang.String filePath,
                             int startPage,
                             int pageCount,
                             MergeOptions options)
Appends a PDF document to the current document.

Parameters:
filePath - The physical file path of the PDF to import.
startPage - The page to start importing from.
pageCount - The number of pages to import.
options - A MergeOptions object specifying the merge options.
Returns:
An array of com.cete.dynamicpdf.Pages that were appended to the document.
See Also:
MergeOptions, ImportedPage

append

public ImportedPage[] append(PdfDocument pdfDocument,
                             int startPage,
                             int pageCount,
                             MergeOptions options)
Appends a PDF document to the current document.

Parameters:
pdfDocument - The PdfDocument to import.
startPage - The page to start appending from.
pageCount - The number of pages to append.
options - Specifies the merge options.
Returns:
An array of com.cete.dynamicpdf.merger.ImportedPages that were appended to the document.
See Also:
PdfDocument, MergeOptions, ImportedPage

merge

public static MergeDocument merge(java.lang.String firstDocumentFilePath,
                                  java.lang.String secondDocumentFilePath)
Merges two PDF documents together.

Parameters:
firstDocumentFilePath - The physical file path to the first PDF document.
secondDocumentFilePath - The physical file path to the second PDF document.
Returns:
A MergeDocument containing the pages from both PDF documents.

merge

public static MergeDocument merge(PdfDocument firstDocument,
                                  PdfDocument secondDocument)
Merges two PDF documents together.

Parameters:
firstDocument - A PdfDocument class representing the first PDF document.
secondDocument - A PdfDocument class representing the second PDF document.
Returns:
A MergeDocument containing the pages from both PDF documents.
See Also:
PdfDocument

merge

public static MergeDocument merge(java.lang.String firstDocumentFilePath,
                                  MergeOptions firstDocumentOptions,
                                  java.lang.String secondDocumentFilePath,
                                  MergeOptions secondDocumentOptions)
Merges two PDF documents together.

Parameters:
firstDocumentFilePath - The physical file path to the first PDF document.
firstDocumentOptions - A MergeOptions object specifying the merge options for the first PDF document.
secondDocumentFilePath - The physical file path to the second PDF document.
secondDocumentOptions - A MergeOptions object specifying the merge options for the second PDF document.
Returns:
A MergeDocument containing the pages from both PDF documents.
See Also:
MergeOptions

merge

public static MergeDocument merge(PdfDocument firstDocument,
                                  MergeOptions firstDocumentOptions,
                                  PdfDocument secondDocument,
                                  MergeOptions secondDocumentOptions)
Merges two PDF documents together.

Parameters:
firstDocument - A PdfDocument class representing the first PDF document.
firstDocumentOptions - A MergeOptions object specifying the merge options for the first PDF document.
secondDocument - A PdfDocument class representing the second PDF document.
secondDocumentOptions - A MergeOptions object specifying the merge options for the second PDF document.
Returns:
A MergeDocument containing the pages from both PDF documents.
See Also:
PdfDocument, MergeOptions

DynamicPDF by ceTe Software

API Reference for DynamicPDF™ for Java generated on December 20, 2005
© Copyright 2005, ceTe Software