Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfCopyFields [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.PdfCopyFields

All Implemented Interfaces:
    PdfViewerPreferences, PdfEncryptionSettings

Concatenates PDF documents including form fields. The rules for the form field concatenation are the same as in Acrobat. All the documents are kept in memory unlike PdfCopy.
Constructor:
 public PdfCopyFields(OutputStream os) throws DocumentException 
    Creates a new instance.
    Parameters:
    os - the output stream
    Throws:
    DocumentException - on error
 public PdfCopyFields(OutputStream os,
    char pdfVersion) throws DocumentException 
    Creates a new instance.
    Parameters:
    os - the output stream
    pdfVersion - the pdf version the output will have
    Throws:
    DocumentException - on error
Method from com.lowagie.text.pdf.PdfCopyFields Summary:
addDocument,   addDocument,   addDocument,   addJavaScript,   addViewerPreference,   close,   getWriter,   isFullCompression,   open,   setEncryption,   setEncryption,   setEncryption,   setEncryption,   setFullCompression,   setOutlines,   setViewerPreferences
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfCopyFields Detail:
 public  void addDocument(PdfReader reader) throws DocumentException 
    Concatenates a PDF document.
 public  void addDocument(PdfReader reader,
    List pagesToKeep) throws DocumentException 
    Concatenates a PDF document selecting the pages to keep. The pages are described as a List of Integer. The page ordering can be changed but no page repetitions are allowed.
 public  void addDocument(PdfReader reader,
    String ranges) throws DocumentException 
    Concatenates a PDF document selecting the pages to keep. The pages are described as ranges. The page ordering can be changed but no page repetitions are allowed.
 public  void addJavaScript(String js) 
    Adds JavaScript to the global document
 public  void addViewerPreference(PdfName key,
    PdfObject value) 
 public  void close() 
    Closes the output document.
 public PdfWriter getWriter() 
    Gets the underlying PdfWriter.
 public boolean isFullCompression() 
    Gets the 1.5 compression status.
 public  void open() 
    Opens the document. This is usually not needed as addDocument() will do it automatically.
 public  void setEncryption(Certificate[] certs,
    int[] permissions,
    int encryptionType) throws DocumentException 
 public  void setEncryption(byte[] userPassword,
    byte[] ownerPassword,
    int permissions,
    boolean strength128Bits) throws DocumentException 
    Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
 public  void setEncryption(boolean strength,
    String userPassword,
    String ownerPassword,
    int permissions) throws DocumentException 
    Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
 public  void setEncryption(byte[] userPassword,
    byte[] ownerPassword,
    int permissions,
    int encryptionType) throws DocumentException 
 public  void setFullCompression() 
    Sets the document's compression to the new 1.5 mode with object streams and xref streams. It can be set at any time but once set it can't be unset.

    If set before opening the document it will also set the pdf version to 1.5.

 public  void setOutlines(List outlines) 
    Sets the bookmarks. The list structure is defined in SimpleBookmark#.
 public  void setViewerPreferences(int preferences)