PJX

com.etymon.pjx.util
Class PdfAppender

java.lang.Object
  extended bycom.etymon.pjx.util.PdfAppender

public class PdfAppender
extends java.lang.Object

Appends multiple PDF documents together, forming a new PDF document.


Constructor Summary
PdfAppender(java.util.List managers, PdfWriter writer)
          The class is initialized to read a list of PDF documents (PdfManager objects) in order and to write the resultant document to a specified PdfWriter.
PdfAppender(PdfManager[] managers, PdfWriter writer)
          Deprecated. Use PdfAppender(List, PdfWriter).
 
Method Summary
 void append()
          Performs the append operation.
static void main(java.lang.String[] args)
          Appends multiple PDF documents together using this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfAppender

public PdfAppender(PdfManager[] managers,
                   PdfWriter writer)
Deprecated. Use PdfAppender(List, PdfWriter).

The class is initialized to read a list of PDF documents (PdfManager objects) in order and to write the resultant document to a specified PdfWriter. The PdfWriter should be newly created (i.e. it should not have been previously used for anything); and after append() has been called, the PdfWriter should be closed and discarded, and this PdfAppender should be discarded.

Parameters:
managers - the documents to read.
writer - the document to write to.

PdfAppender

public PdfAppender(java.util.List managers,
                   PdfWriter writer)
            throws PdfFormatException
The class is initialized to read a list of PDF documents (PdfManager objects) in order and to write the resultant document to a specified PdfWriter. The PdfWriter should be newly created (i.e. it should not have been previously used for anything); and after append() has been called, the PdfWriter should be closed and discarded, and this PdfAppender should be discarded.

Parameters:
managers - the documents to read. This must be a list of PdfManager objects.
writer - the document to write to.
Throws:
PdfFormatException
Method Detail

append

public void append()
            throws java.io.IOException,
                   PdfFormatException
Performs the append operation. This method can be called only once per instance of this class.

Throws:
java.io.IOException
PdfFormatException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        PdfFormatException
Appends multiple PDF documents together using this class. The documents are specified with a list of file names; the last indicating the output file and the others indicating the input files. The input files are appended in the order they are specified within the list.

Parameters:
args - the list of file names. Note that the last file in this list (args[args.length - 1]) is overwritten with the resultant PDF document.
Throws:
java.io.IOException
PdfFormatException

Copyright © 1998-2004 Etymon Systems, Inc.

The PDF data structures, operators, and specification are
Copyright © 1985-2004 Adobe Systems Incorporated.