| java.lang.Object com.lowagie.text.pdf.PdfCopyFields
PdfCopyFields | public class PdfCopyFields implements PdfViewerPreferences,PdfEncryptionSettings(Code) | | 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.
author: Paulo Soares (psoares@consiste.pt) |
Method Summary | |
public void | addDocument(PdfReader reader) Concatenates a PDF document. | public void | addDocument(PdfReader reader, List pagesToKeep) Concatenates a PDF document selecting the pages to keep. | public void | addDocument(PdfReader reader, String ranges) Concatenates a PDF document selecting the pages to keep. | public void | addJavaScript(String js) | 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. | public void | setEncryption(byte userPassword, byte ownerPassword, int permissions, boolean strength128Bits) Sets the encryption options for this document. | public void | setEncryption(boolean strength, String userPassword, String ownerPassword, int permissions) Sets the encryption options for this document. | public void | setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) | public void | setEncryption(Certificate[] certs, int[] permissions, int encryptionType) | public void | setFullCompression() Sets the document's compression to the new 1.5 mode with object streams and xref
streams. | public void | setOutlines(List outlines) Sets the bookmarks. | public void | setViewerPreferences(int preferences) |
addDocument | public void addDocument(PdfReader reader, List pagesToKeep) throws DocumentException(Code) | | 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.
Parameters: reader - the PDF document Parameters: pagesToKeep - the pages to keep throws: DocumentException - on error |
addDocument | public void addDocument(PdfReader reader, String ranges) throws DocumentException(Code) | | 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.
Parameters: reader - the PDF document Parameters: ranges - the comma separated ranges as described in SequenceList throws: DocumentException - on error |
addJavaScript | public void addJavaScript(String js)(Code) | | Adds JavaScript to the global document
Parameters: js - the JavaScript |
close | public void close()(Code) | | Closes the output document.
|
getWriter | public PdfWriter getWriter()(Code) | | Gets the underlying PdfWriter.
the underlying PdfWriter |
isFullCompression | public boolean isFullCompression()(Code) | | Gets the 1.5 compression status.
true if the 1.5 compression is on |
open | public void open()(Code) | | Opens the document. This is usually not needed as addDocument() will do it
automatically.
|
setEncryption | public void setEncryption(byte userPassword, byte ownerPassword, int permissions, boolean strength128Bits) throws DocumentException(Code) | | 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.
Parameters: userPassword - the user password. Can be null or empty Parameters: ownerPassword - the owner password. Can be null or empty Parameters: permissions - the user permissions Parameters: strength128Bits - true for 128 bit key length, false for 40 bit key length throws: DocumentException - if the document is already open |
setEncryption | public void setEncryption(boolean strength, String userPassword, String ownerPassword, int permissions) throws DocumentException(Code) | | 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.
Parameters: strength - true for 128 bit key length. false for 40 bit key length Parameters: userPassword - the user password. Can be null or empty Parameters: ownerPassword - the owner password. Can be null or empty Parameters: permissions - the user permissions throws: DocumentException - if the document is already open |
setFullCompression | public void setFullCompression()(Code) | | 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.
|
setOutlines | public void setOutlines(List outlines)(Code) | | Sets the bookmarks. The list structure is defined in
SimpleBookmark# .
Parameters: outlines - the bookmarks or null to remove any |
|
|