Generated by
JDiff

com.itextpdf.kernel.pdf Documentation Differences

This file contains all the changes in documentation in the package com.itextpdf.kernel.pdf as colored differences. Deletions are shown like this , and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.

Class EncryptionProperties, EncryptionProperties setPublicKeyEncryption(Certificate[], int[], int)

Sets the certificate encryption options for the document.

An array of one or more public certificates certificates must be provided together with an array of the same size size for the permissions for each certificate. @param certs the public certificates to be used for the encryption @param permissions the user permissions for each of the certificates The open permissions for the document can be AllowPrinting EncryptionConstants.ALLOW_PRINTING, AllowModifyContents EncryptionConstants.ALLOW_MODIFY_CONTENTS, AllowCopy EncryptionConstants.ALLOW_COPY, AllowModifyAnnotations EncryptionConstants.ALLOW_MODIFY_ANNOTATIONS, AllowFillIn EncryptionConstants.ALLOW_FILL_IN, AllowScreenReaders EncryptionConstants.ALLOW_SCREENREADERS, AllowAssembly and AllowDegradedPrinting EncryptionConstants.ALLOW_ASSEMBLY and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them them @param encryptionAlgorithm the type of encryption. It can be one of EncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES128 or EncryptionConstants.ENCRYPTION_AES256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed to output the metadata in cleartext cleartext. See EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. @param certs the public certificates to Please be used for aware that the encryption passed @param encryption types may override permissions: the user permissions for each of the certificates @param encryptionAlgorithm the type of encryption. It can be one of EncryptionConstants.STANDARD_ENCRYPTION_40 , STANDARD implicitly sets EncryptionConstants.DO_ ENCRYPTION NOT_ 128, ENCRYPT_METADATA and ENCRYPTION EncryptionConstants.EMBEDDED_ AES128 FILES_ONLY or as false; EncryptionConstants.STANDARD_ENCRYPTION_ AES256 128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @return this EncryptionProperties

Class EncryptionProperties, EncryptionProperties setStandardEncryption(byte[], byte[], int, int)

Sets the encryption options for the document. The @param userPassword and the ownerPassword can the user password. Can be null or have of zero length . , In which this is equal to case omitting the ownerPassword user is password @param replaced ownerPassword by the owner password. If it's null or empty, iText will generate a random string to be used as the owner password @param permissions the user permissions. 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, ALLOW_ASSEMBLY and ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them. See EncryptionConstants.ALLOW_ASSEMBLY . @param and userPassword the user password. Can be null or empty @param ownerPassword the owner password EncryptionConstants.ALLOW_DEGRADED_PRINTING. Can be null or empty @param permissions the user The permissions can be combined by ORing permissions them @param encryptionAlgorithm the type of encryption. It can be one of of EncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES128 or or EncryptionConstants.ENCRYPTION_ AES256 AES256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ored OEed to output the metadata in cleartext. EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. Please be aware that the passed encryption types may override permissions: EncryptionConstants.STANDARD_ENCRYPTION_40 implicitly sets EncryptionConstants.DO_NOT_ENCRYPT_METADATA and EncryptionConstants.EMBEDDED_FILES_ONLY as false; EncryptionConstants.STANDARD_ENCRYPTION_128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @return this EncryptionProperties

Class PdfEncryption, constructor PdfEncryption(Certificate[], int[], int, PdfVersion)

Creates the certificate encryption.

An array of one or more public certificates certificates must be provided together with with an array of the same size for the permissions for each certificate. @param certs the public certificates to be used for the encryption @param permissions the user permissions for each of the certificates 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 and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them. @param certs the public certificates to The permissions can be used for the encryption combined by ORing them @param permissions encryptionType the type of the encryption. user permissions for each of It can be one of the certificates @param encryptionType 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_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed ORed to output the metadata in cleartext. EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. Please be aware that the passed encryption types may override permissions: EncryptionConstants.STANDARD_ENCRYPTION_40 implicitly sets EncryptionConstants.DO_NOT_ENCRYPT_METADATA and EncryptionConstants.EMBEDDED_FILES_ONLY as false; EncryptionConstants.STANDARD_ENCRYPTION_128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @param version the PdfVersion of the target document for encryption

Class PdfEncryption, constructor PdfEncryption(byte[], byte[], int, int, byte[], PdfVersion)

Creates the encryption. The @param userPassword and the ownerPassword the can user password. Can be null or have of zero length . , which is equal to In this case omitting the ownerPassword is user password replaced @param by ownerPassword the owner password. If it's null or empty, iText will generate a random string . to be used as the owner password @param permissions the user permissions 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 and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them. @param userPassword the user password. Can The permissions can be null combined or by ORing empty them @param ownerPassword encryptionType the owner type password of encryption. Can It can be null or one of empty @param permissions the user permissions @param encryptionType 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_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be be ORed to output the metadata in cleartext cleartext. EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. Please be aware that the passed encryption types may override permissions: EncryptionConstants.STANDARD_ENCRYPTION_40 implicitly sets EncryptionConstants.DO_NOT_ENCRYPT_METADATA and EncryptionConstants.EMBEDDED_FILES_ONLY as false; EncryptionConstants.STANDARD_ENCRYPTION_128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @param documentId document id which will be used for encryption @param version the PdfVersion of the target document for encryption

Class PdfObject, PdfObject setModified()

Sets the 'modified' flag to the indirect object, the flag denotes that the object was modified since the document opening. It is recommended to set This this flag is after meaningful only if changing any PDF the object. PdfDocument

For example flag is opened used in the append mode mode (see StampingProperties.useAppendMode()). In append mode the whole document is preserved as is, and only changes to the document are appended to the end of the document file. Because of this, only modified objects need to be flushed and are allowed to be flushed (i.e. to be written). @return this PdfObject instance.


Class PdfPage, int getNextMcid()

Calculates and returns the next available for this page's content stream MCID reference. @return calculated MCID reference. @throws PdfException in case of not tagged document.

Class PdfReader, byte[] computeUserPassword()

Computes user password if standard encryption handler is used with Standard40, Standard128 or AES128 encryption algorithm. @return user password, or null if not a standard encryption handler was used or if ownerPasswordUsed wasn't use to open the document. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, int getCryptoMode()

Gets encryption algorithm and access permissions. @see EncryptionConstants EncryptionConstants @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, long getLastXref()

Gets position of the last Cross-Reference table. @return -1 if Cross-Reference table has rebuilt, otherwise position of the last Cross-Reference table. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, byte[] getModifiedFileId()

Gets modified file ID, the second element in PdfName.ID key of trailer. If the size of ID array does not equal 2, an empty array will be returned.

The returned value reflects the value that was written in opened document. If document is modified, the ultimate document id can be retrieved from PdfDocument.getModifiedDocumentId(). @return byte array represents modified file ID. @see PdfDocument#getModifiedDocumentId() @throws PdfException, if the method has been invoked before the PDF document was read.

Class PdfReader, byte[] getOriginalFileId()

Gets original file ID, the first element in PdfName.ID key of trailer. If the size of ID array does not equal 2, an empty array will be returned.

The returned value reflects the value that was written in opened document. If document is modified, the ultimate document id can be retrieved from PdfDocument.getOriginalDocumentId(). @return byte array represents original file ID. @see PdfDocument#getOriginalDocumentId() @throws PdfException, if the method has been invoked before the PDF document was read.

Class PdfReader, long getPermissions()

Gets the encryption permissions. It can be used directly in WriterProperties.setStandardEncryption(byte[], byte[], int, int). See ISO 32000-1, Table 22 for more details. @return the encryption permissions, an unsigned 32-bit quantity. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, boolean hasFixedXref()

If any exception generated while reading PdfObject, PdfReader will try to fix offsets of all objects.

This method's returned value might change over time, because PdfObjects reading can be postponed even up to document closing. @return true, if PdfReader fixed offsets of PdfObjects. @throws PdfException, if the method has been invoked before the PDF document was read.

Class PdfReader, boolean hasHybridXref()

Some documents contain hybrid XRef, for more information see "7.5.8.4 Compatibility with Applications That Do Not Support Compressed Reference Streams" in PDF 32000-1:2008 spec. @return true, if the document has hybrid Cross-Reference section. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, boolean hasRebuiltXref()

If any exception generated while reading XRef section, PdfReader will try to rebuild it. @return true, if PdfReader rebuilt Cross-Reference section. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, boolean hasXrefStm()

Indicates whether the document has Cross-Reference Streams. @return true, if the document has Cross-Reference Streams. @throws PdfException, if the method has been invoked before the PDF document was read.
Class PdfReader, boolean isOpenedWithFullPermission()

Checks if the document was opened with the owner password so that the end application can decide what level of access restrictions to apply. If the document is not encrypted it will return {@code true}. @return {@code true} if the document was opened with the owner password or if it's not encrypted, {@code false} if the document was opened with the user password. @throws PdfException, if the method has been invoked before the PDF document was read.

Class WriterProperties, WriterProperties addUAXmpMetadata()

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. @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties addXmpMetadata()

If true, default XMPMetadata based on PdfDocumentInfo will be added. For PDF 2.0 documents, metadata will be added in any case. @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setCompressionLevel(int)

Defines the level of compression for the document. See CompressionConstants @param compressionLevel CompressionConstants value. @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setFullCompressionMode(boolean)

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. @param fullCompressionMode true - to enable full compression mode, false to disable it @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setInitialDocumentId(PdfString)

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. @param initialDocumentId the new initial document id @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setModifiedDocumentId(PdfString)

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. @param modifiedDocumentId the new modified document id @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setPdfVersion(PdfVersion)

Defines pdf version for the created document. Default value is PDF_1_7. @param version version for the document. @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setPublicKeyEncryption(Certificate[], int[], int)

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. @param certs the public certificates to be used for the encryption @param permissions the user permissions for each of the certificates 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 and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them. @param certs the public certificates to The permissions can be used for the encryption combined by ORing them @param permissions encryptionAlgorithm the type of encryption. It can be one the of user permissions for each of the certificates @param 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_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed ORed to output the metadata in cleartext cleartext. EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. Please be aware that the passed encryption types may override permissions: EncryptionConstants.STANDARD_ENCRYPTION_40 implicitly sets EncryptionConstants.DO_NOT_ENCRYPT_METADATA and EncryptionConstants.EMBEDDED_FILES_ONLY as false; EncryptionConstants.STANDARD_ENCRYPTION_128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties setStandardEncryption(byte[], byte[], int, int)

Sets the encryption options for the document. The @param userPassword and the ownerPassword can the user password. Can be null or have of zero length . , In which this is equal to case omitting the ownerPassword is user password replaced @param by ownerPassword the owner password. If it's null or empty, iText will generate a random string . to be used as the owner password @param permissions the user permissions 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 and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORing them. @param userPassword the user password. Can be null or empty @param ownerPassword The permissions can be combined by ORing them @param encryptionAlgorithm the owner type password of encryption. Can It can be null or one of empty @param permissions the user permissions @param 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_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can be ORed ORed to output the metadata in cleartext cleartext. EncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well. Please be aware that the passed encryption types may override permissions: EncryptionConstants.STANDARD_ENCRYPTION_40 implicitly sets EncryptionConstants.DO_NOT_ENCRYPT_METADATA and EncryptionConstants.EMBEDDED_FILES_ONLY as false; EncryptionConstants.STANDARD_ENCRYPTION_128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties useDebugMode()

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. @return this {@code WriterProperties } instance
Class WriterProperties, WriterProperties useSmartMode()

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. @return this {@code WriterProperties } instance