iText 7 7.1.8 API
|
Public Member Functions |
|
virtual iText.Kernel.Pdf.WriterProperties | SetPdfVersion (PdfVersion version) |
Defines pdf version for the created document. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | UseSmartMode () |
Enables smart mode. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | AddXmpMetadata () |
If true, default XMPMetadata based on PdfDocumentInfo will be added. For PDF 2.0 documents, metadata will be added in any case. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetCompressionLevel (int compressionLevel) |
Defines the level of compression for the document. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetFullCompressionMode (bool fullCompressionMode) |
Defines if full compression mode is enabled. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetStandardEncryption (byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionAlgorithm) |
Sets the encryption options for the document. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetPublicKeyEncryption (X509Certificate[] certs, int[] permissions, int encryptionAlgorithm) |
Sets the certificate encryption options for the document. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetInitialDocumentId (PdfString initialDocumentId) |
The /ID entry of a document contains an array with two entries. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | SetModifiedDocumentId (PdfString modifiedDocumentId) |
The /ID entry of a document contains an array with two entries. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | UseDebugMode () |
This activates debug mode with pdfDebug tool. More... |
|
virtual iText.Kernel.Pdf.WriterProperties | AddUAXmpMetadata () |
This method marks the document as PDF/UA and sets related flags is XMPMetaData. More... |
|
|
inlinevirtual |
This method marks the document as PDF/UA and sets related flags is XMPMetaData.
This method marks the document as PDF/UA and sets related flags is XMPMetaData. This method calls AddXmpMetadata() implicitly. NOTE: iText does not validate PDF/UA, which means we don't check if created PDF meets all PDF/UA requirements. Don't use this method if you are not familiar with PDF/UA specification in order to avoid creation of non-conformant PDF/UA file.
WriterProperties
instance
|
inlinevirtual |
If true, default XMPMetadata based on PdfDocumentInfo will be added. For PDF 2.0 documents, metadata will be added in any case.
WriterProperties
instance
|
inlinevirtual |
Defines the level of compression for the document.
Defines the level of compression for the document. See CompressionConstants
compressionLevel |
CompressionConstants value.
WriterProperties
instance
|
inlinevirtual |
Defines if full compression mode is enabled.
Defines if full compression mode is enabled. If enabled, not only the content of the pdf document will be compressed, but also the pdf document inner structure.
fullCompressionMode | true - to enable full compression mode, false to disable it |
WriterProperties
instance
|
inlinevirtual |
The /ID entry of a document contains an array with two entries.
The /ID entry of a document contains an array with two entries. The first one (initial id) represents the initial document id. It's a permanent identifier based on the contents of the file at the time it was originally created and does not change when the file is incrementally updated. To help ensure the uniqueness of file identifiers, it is recommend to be computed by means of a message digest algorithm such as MD5. iText will by default keep the existing initial id. But if you'd like you can set this id yourself using this setter.
initialDocumentId | the new initial document id |
WriterProperties
instance
|
inlinevirtual |
The /ID entry of a document contains an array with two entries.
The /ID entry of a document contains an array with two entries. The second one (modified id) should be the same entry, unless the document has been modified. iText will by default generate a modified id. But if you'd like you can set this id yourself using this setter.
modifiedDocumentId | the new modified document id |
WriterProperties
instance
|
inlinevirtual |
Defines pdf version for the created document.
Defines pdf version for the created document. Default value is PDF_1_7.
version | version for the document. |
WriterProperties
instance
|
inlinevirtual |
Sets the certificate encryption options for the document.
Sets the certificate encryption options for the document. An array of one or more public certificates must be provided together with an array of the same size for the permissions for each certificate. The open permissions for the document can be EncryptionConstants.ALLOW_PRINTING , EncryptionConstants.ALLOW_MODIFY_CONTENTS , EncryptionConstants.ALLOW_COPY , EncryptionConstants.ALLOW_MODIFY_ANNOTATIONS , EncryptionConstants.ALLOW_FILL_IN , EncryptionConstants.ALLOW_SCREENREADERS , EncryptionConstants.ALLOW_ASSEMBLY and EncryptionConstants.ALLOW_DEGRADED_PRINTINGThe permissions can be combined by ORing them.
certs | the public certificates to be used for the encryption |
permissions | the user permissions for each of the certificates |
encryptionAlgorithm | the type of encryption. It can be one of EncryptionConstants.STANDARD_ENCRYPTION_40 , EncryptionConstants.STANDARD_ENCRYPTION_128 , EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed to output the metadata in cleartext |
WriterProperties
instance
|
inlinevirtual |
Sets the encryption options for the document.
Sets the encryption options for the 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 EncryptionConstants.ALLOW_PRINTING , EncryptionConstants.ALLOW_MODIFY_CONTENTS , EncryptionConstants.ALLOW_COPY , EncryptionConstants.ALLOW_MODIFY_ANNOTATIONS , EncryptionConstants.ALLOW_FILL_IN , EncryptionConstants.ALLOW_SCREENREADERS , EncryptionConstants.ALLOW_ASSEMBLY and EncryptionConstants.ALLOW_DEGRADED_PRINTINGThe permissions can be combined by ORing them.
userPassword | the user password. Can be null or empty |
ownerPassword | the owner password. Can be null or empty |
permissions | the user permissions |
encryptionAlgorithm | the type of encryption. It can be one of EncryptionConstants.STANDARD_ENCRYPTION_40 , EncryptionConstants.STANDARD_ENCRYPTION_128 , EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed to output the metadata in cleartext |
WriterProperties
instance
|
inlinevirtual |
This activates debug mode with pdfDebug tool.
This activates debug mode with pdfDebug tool. It causes additional overhead of duplicating document bytes into memory, so use it careful. NEVER use it in production or in any other cases except pdfDebug.
WriterProperties
instance
|
inlinevirtual |
Enables smart mode.
Enables smart mode.
In smart mode when resources (such as fonts, images,...) are encountered, a reference to these resources is saved in a cache, so that they can be reused. This requires more memory, but reduces the file size of the resulting PDF document.
WriterProperties
instance