com.crionics.jpdf
Class MergerModule

java.lang.Object
  extended by PdfModule
      extended by com.crionics.jpdf.AbstractModule
          extended by com.crionics.jpdf.MergerModule

public final class MergerModule
extends AbstractModule

The module contains all the methods reauired for document merging/splitting


Field Summary
 
Fields inherited from class com.crionics.jpdf.AbstractModule
MOD_CREATOR, MOD_DESCRIPTION, MOD_ENCRYPTION, MOD_MERGER, MOD_PRINTER, MOD_SECURITY, MOD_SIGNER, MOD_TEMPLATE
 
Method Summary
 void append(java.io.File fileToAppend)
          Append the current document with the specified file.
 void append(java.io.File[] fileToAppend)
          Append the current document with the specified files.
 void append(java.io.File[] fileToAppend, java.io.File fileDestination)
          Append the current document with the specified files and save the result in a new file.
 void append(java.io.File[] fileToAppend, java.io.File fileDestination, int idxPageOfInsertion)
          Append the current document with the specified files at the specified page position and save the result in a new file.
 void append(java.io.File[] fileToAppend, int idxPageOfInsertion)
          Append the current document with the specified files at the specified page position.
 void append(java.io.File fileToAppend, java.io.File fileDestination)
          Append the current document with the specified file and save the result in a new file.
 void append(java.io.File fileToAppend, java.io.File fileDestination, int idxPageOfInsertion)
          Append the current document with the specified file at the specified page position and save the result in a new file.
 void append(java.io.File fileToAppend, int idxPageOfInsertion)
          Append the current document with the specified file at the specified page position.
 void append(PdfDocument docToAppend)
          Append the current document with the specified document.
 void append(PdfDocument[] docToAppend)
          Append the current document with the specified documents.
 void append(PdfDocument[] docToAppend, java.io.File destination)
          Append the current document with the specified documents and save the result in a new file.
 void append(PdfDocument[] docToAppend, java.io.File destination, int idxPageOfInsertion)
          Append the current document with the specified documents at the specified page position and save the result in a new file.
 void append(PdfDocument[] docToAppend, int idxPageOfInsertion)
          Append the current document with the specified documents at the specified page position.
 void append(PdfDocument docToAppend, java.io.File destination)
          Append the current document with the specified document and save the result in a new file.
 void append(PdfDocument docToAppend, java.io.File destination, int idxPageOfInsertion)
          Append the current document with the specified document at the specified page position and save the result in a new file.
 void append(PdfDocument docToAppend, int idxPageOfInsertion)
          Append the current document with the specified document at the specified page position.
 void append(java.lang.String fileToAppend)
          Append the current document with the specified file.
 void append(java.lang.String fileToAppend, int idxPageOfInsertion)
          Append the current document with the specified file at the specified page position.
 void appendPage(PdfDocument docToAppend, int[] indexPageToAppend, int[] indexPageDestination)
          Add a the specified pages of a document at the specified positions in the current position.
 void appendPage(PdfDocument docToAppend, int indexPageToAppend, int indexPageDestination)
          Add a the specified page of a document at the specified position in the current position.
 void splitPages(java.io.File destination, int[] indexPages)
          Create a new document composed of the specified pages from the current document.
 void splitPages(java.io.File destination, java.util.List indexPages)
          Deprecated. Use the method splitPages(File, int[])
 PdfDocument splitPages(int[] indexPages)
          Creates a new document in Memory composed of the selected pages from the current document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

append

public void append(java.io.File fileToAppend)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - The file to append to the current document.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File fileToAppend,
                   java.io.File fileDestination)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file and save the result in a new file. Note: the current document is not modified.

Parameters:
fileToAppend - The file to append to the current document.
fileDestination - The file where the merged document will be saved.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File fileToAppend,
                   java.io.File fileDestination,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file at the specified page position and save the result in a new file. Note: the current document is not modified.

Parameters:
fileToAppend - The file to append to the current document.
fileDestination - The file where the merged document will be saved.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File fileToAppend,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file at the specified page position. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - The file to append to the current document.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File[] fileToAppend)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified files. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - An array of file to append to the current document.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File[] fileToAppend,
                   java.io.File fileDestination)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified files and save the result in a new file. Note: the current document is not modified.

Parameters:
fileToAppend - An Array of files to append to the current document.
fileDestination - The file where the merged document will be saved.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File[] fileToAppend,
                   java.io.File fileDestination,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified files at the specified page position and save the result in a new file. Note: the current document is not modified.

Parameters:
fileToAppend - An Array of files to append to the current document.
fileDestination - The file where the merged document will be saved.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.io.File[] fileToAppend,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified files at the specified page position. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - An array of file to append to the current document.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument docToAppend)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified document. Note: The current document (file) will be modified. To avoid modifying the current document, use the methods with the extra fileDestination parameter.

Parameters:
docToAppend - The document to append to the current document.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument docToAppend,
                   java.io.File destination)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified document and save the result in a new file. Note: the current document is not modified.

Parameters:
docToAppend - The document to append to the current document.
destination - The file where the merged document will be saved.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument docToAppend,
                   java.io.File destination,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified document at the specified page position and save the result in a new file. Note: the current document is not modified.

Parameters:
docToAppend - The document to append to the current document.
destination - The file where the merged document will be saved.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument docToAppend,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified document at the specified page position. Note: The current document (file) will be modified. To avoid modifying the current document, use the methods with the extra fileDestination parameter.

Parameters:
docToAppend - The document to append to the current document.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument[] docToAppend)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified documents. Note: The current document (file) will be modified. To avoid modifying the current document, use the methods with the extra fileDestination parameter.

Parameters:
docToAppend - The document to append to the current document.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument[] docToAppend,
                   java.io.File destination)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified documents and save the result in a new file. Note: the current document is not modified.

Parameters:
docToAppend - The documents to append to the current document.
destination - The file where the merged document will be saved.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument[] docToAppend,
                   java.io.File destination,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified documents at the specified page position and save the result in a new file. Note: the current document is not modified.

Parameters:
docToAppend - The documents to append to the current document.
destination - The file where the merged document will be saved.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(PdfDocument[] docToAppend,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified documents at the specified page position. Note: The current document (file) will be modified. To avoid modifying the current document, use the methods with the extra fileDestination parameter.

Parameters:
docToAppend - The documents to append to the current document.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.lang.String fileToAppend)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - The file to append to the current document.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

append

public void append(java.lang.String fileToAppend,
                   int idxPageOfInsertion)
            throws java.io.IOException,
                   PdfException
Append the current document with the specified file at the specified page position. Note: The current document (file) will be modified. To not modify the current document, use the methods with the fileDestination parameters.

Parameters:
fileToAppend - The file to append to the current document.
idxPageOfInsertion - The index of the page where the appended document will be inserted.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

appendPage

public void appendPage(PdfDocument docToAppend,
                       int indexPageToAppend,
                       int indexPageDestination)
                throws java.io.IOException,
                       PdfException
Add a the specified page of a document at the specified position in the current position.

Parameters:
docToAppend - The document where the the page is copied from.
indexPageToAppend - The index of the page to be copied. Value start at 1.
indexPageDestination - The position of the page in the new document. Value start at 1.
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

appendPage

public void appendPage(PdfDocument docToAppend,
                       int[] indexPageToAppend,
                       int[] indexPageDestination)
                throws java.io.IOException,
                       PdfException
Add a the specified pages of a document at the specified positions in the current position.

Parameters:
docToAppend - The document where the the page is copied from.
indexPageToAppend - An array containing the index of the page to be copied (Value start at 1).
indexPageDestination - An array containing the position of the page in the new document (Value start at 1)..
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

splitPages

public void splitPages(java.io.File destination,
                       int[] indexPages)
                throws java.io.IOException,
                       PdfException
Create a new document composed of the specified pages from the current document.

Parameters:
destination - The new created file
indexPages - An array containing the index of the pages to extract from the current document. Range [1 to PdfDocument.getPageCount()].
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

splitPages

public void splitPages(java.io.File destination,
                       java.util.List indexPages)
                throws java.io.IOException,
                       PdfException
Deprecated. Use the method splitPages(File, int[])

Create a new document composed of the selected pages from the current document.

Parameters:
destination - The new created file
indexPages - The index of the pages in the current document. can be a list with Strings or Integers. Range [1 to PdfDocument.getPageCount()].
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.

splitPages

public PdfDocument splitPages(int[] indexPages)
                       throws java.io.IOException,
                              PdfException
Creates a new document in Memory composed of the selected pages from the current document.

Parameters:
indexPages - An array containing the index of the pages to extract from the current document. Range [1 to PdfDocument.getPageCount()]
Returns:
The unsaved Document Created
Throws:
java.io.IOException - Raised if a problem occured while reading the file.
PdfException - Raised if a problem occured while parsing the file.


Copyright © 1999-2007 Crionics. All Rights Reserved.