HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfCopyFields Class Reference
Inheritance diagram for iTextSharp.text.pdf.PdfCopyFields:
iTextSharp.text.pdf.interfaces.IPdfViewerPreferences iTextSharp.text.pdf.interfaces.IPdfEncryptionSettings

Public Member Functions

 PdfCopyFields (Stream os)
 
 PdfCopyFields (Stream os, char pdfVersion)
 
void AddDocument (PdfReader reader)
 
void AddDocument (PdfReader reader, ArrayList pagesToKeep)
 
void AddDocument (PdfReader reader, String ranges)
 
void SetEncryption (byte[] userPassword, byte[] ownerPassword, int permissions, bool strength128Bits)
 
void SetEncryption (bool strength, String userPassword, String ownerPassword, int permissions)
 
void Close ()
 
void Open ()
 
void AddJavaScript (String js)
 
void SetFullCompression ()
 
void SetEncryption (byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType)
 
void AddViewerPreference (PdfName key, PdfObject value)
 
void SetEncryption (X509Certificate[] certs, int[] permissions, int encryptionType)
 

Properties

ArrayList Outlines [set]
 
PdfWriter Writer [get]
 
bool FullCompression [get]
 
int ViewerPreferences [set]
 
- Properties inherited from iTextSharp.text.pdf.interfaces.IPdfViewerPreferences
int ViewerPreferences [set]
 

Detailed Description

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 (psoar.nosp@m.es@c.nosp@m.onsis.nosp@m.te.p.nosp@m.t)

Constructor & Destructor Documentation

◆ PdfCopyFields() [1/2]

iTextSharp.text.pdf.PdfCopyFields.PdfCopyFields ( Stream  os)

Creates a new instance.

Parameters
osthe output stream
Exceptions
DocumentExceptionon error
IOExceptionon error

◆ PdfCopyFields() [2/2]

iTextSharp.text.pdf.PdfCopyFields.PdfCopyFields ( Stream  os,
char  pdfVersion 
)

Creates a new instance.

Parameters
osthe output stream
pdfVersionthe pdf version the output will have
Exceptions
DocumentExceptionon error
IOExceptionon error

Member Function Documentation

◆ AddDocument() [1/3]

void iTextSharp.text.pdf.PdfCopyFields.AddDocument ( PdfReader  reader)

Concatenates a PDF document.

Parameters
readerthe PDF document
Exceptions
DocumentExceptionon error

◆ AddDocument() [2/3]

void iTextSharp.text.pdf.PdfCopyFields.AddDocument ( PdfReader  reader,
ArrayList  pagesToKeep 
)

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
readerthe PDF document
pagesToKeepthe pages to keep
Exceptions
DocumentExceptionon error

◆ AddDocument() [3/3]

void iTextSharp.text.pdf.PdfCopyFields.AddDocument ( PdfReader  reader,
String  ranges 
)

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
readerthe PDF document
rangesthe comma separated ranges as described in SequenceList
Exceptions
DocumentExceptionon error

◆ AddJavaScript()

void iTextSharp.text.pdf.PdfCopyFields.AddJavaScript ( String  js)

Adds JavaScript to the global document

Parameters
jsthe JavaScript

◆ AddViewerPreference()

void iTextSharp.text.pdf.PdfCopyFields.AddViewerPreference ( PdfName  key,
PdfObject  value 
)
See also
com.lowagie.text.pdf.interfaces.PdfViewerPreferences::addViewerPreference(com.lowagie.text.pdf.PdfName, com.lowagie.text.pdf.PdfObject)

Implements iTextSharp.text.pdf.interfaces.IPdfViewerPreferences.

◆ Close()

void iTextSharp.text.pdf.PdfCopyFields.Close ( )

Closes the output document.

◆ Open()

void iTextSharp.text.pdf.PdfCopyFields.Open ( )

Opens the document. This is usually not needed as AddDocument() will do it automatically.

◆ SetEncryption() [1/4]

void iTextSharp.text.pdf.PdfCopyFields.SetEncryption ( bool  strength,
String  userPassword,
String  ownerPassword,
int  permissions 
)

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
strengthtrue for 128 bit key length. false for 40 bit key length
userPasswordthe user password. Can be null or empty
ownerPasswordthe owner password. Can be null or empty
permissionsthe user permissions
Exceptions
DocumentExceptionif the document is already open

◆ SetEncryption() [2/4]

void iTextSharp.text.pdf.PdfCopyFields.SetEncryption ( byte[]  userPassword,
byte[]  ownerPassword,
int  permissions,
bool  strength128Bits 
)

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
userPasswordthe user password. Can be null or empty
ownerPasswordthe owner password. Can be null or empty
permissionsthe user permissions
strength128Bitstrue for 128 bit key length, false for 40 bit key length
Exceptions
DocumentExceptionif the document is already open

◆ SetEncryption() [3/4]

void iTextSharp.text.pdf.PdfCopyFields.SetEncryption ( byte[]  userPassword,
byte[]  ownerPassword,
int  permissions,
int  encryptionType 
)
See also
com.lowagie.text.pdf.interfaces.PdfEncryptionSettings::setEncryption(byte[], byte[], int, int)

Implements iTextSharp.text.pdf.interfaces.IPdfEncryptionSettings.

◆ SetEncryption() [4/4]

void iTextSharp.text.pdf.PdfCopyFields.SetEncryption ( X509Certificate[]  certs,
int[]  permissions,
int  encryptionType 
)
See also
com.lowagie.text.pdf.interfaces.PdfEncryptionSettings::setEncryption(java.security.cert.Certificate[], int[], int)

Implements iTextSharp.text.pdf.interfaces.IPdfEncryptionSettings.

◆ SetFullCompression()

void iTextSharp.text.pdf.PdfCopyFields.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.

Property Documentation

◆ FullCompression

bool iTextSharp.text.pdf.PdfCopyFields.FullCompression
get

Gets the 1.5 compression status.

Returns
true if the 1.5 compression is on

◆ Outlines

ArrayList iTextSharp.text.pdf.PdfCopyFields.Outlines
set

Sets the bookmarks. The list structure is defined in SimpleBookmark.

Parameters
outlinesthe bookmarks or null to remove any

◆ ViewerPreferences

int iTextSharp.text.pdf.PdfCopyFields.ViewerPreferences
set
See also
com.lowagie.text.pdf.interfaces.PdfViewerPreferences::setViewerPreferences(int)

◆ Writer

PdfWriter iTextSharp.text.pdf.PdfCopyFields.Writer
get

Gets the underlying PdfWriter.

Returns
the underlying PdfWriter

The documentation for this class was generated from the following file: