|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagecom.itextpdf.kernel.pdfas colored differences. Deletions are shownlike 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.
Sets the certificate encryption options for the document.Class EncryptionProperties, EncryptionProperties setStandardEncryption(byte[], byte[], int, int)An array of one or more public
certificatescertificates must be provided together with an array of the samesizesize 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 beAllowPrintingEncryptionConstants.ALLOW_PRINTING,AllowModifyContentsEncryptionConstants.ALLOW_MODIFY_CONTENTS,AllowCopyEncryptionConstants.ALLOW_COPY,AllowModifyAnnotationsEncryptionConstants.ALLOW_MODIFY_ANNOTATIONS,AllowFillInEncryptionConstants.ALLOW_FILL_IN,AllowScreenReadersEncryptionConstants.ALLOW_SCREENREADERS,AllowAssemblyandAllowDegradedPrintingEncryptionConstants.ALLOW_ASSEMBLY and EncryptionConstants.ALLOW_DEGRADED_PRINTING. The permissions can be combined by ORingthemthem @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 incleartextcleartext.SeeEncryptionConstants.EMBEDDED_FILES_ONLY can be ORed as well.@paramcertsthepubliccertificatestoPlease beused foraware that theencryptionpassed@paramencryption types may override permissions:theuserpermissionsforeachofthecertificates@paramencryptionAlgorithmthetypeofencryption.ItcanbeoneofEncryptionConstants.STANDARD_ENCRYPTION_40,STANDARDimplicitly sets EncryptionConstants.DO_ENCRYPTIONNOT_128,ENCRYPT_METADATA andENCRYPTIONEncryptionConstants.EMBEDDED_AES128FILES_ONLYoras false; EncryptionConstants.STANDARD_ENCRYPTION_AES256128 implicitly sets EncryptionConstants.EMBEDDED_FILES_ONLY as false; @return this EncryptionProperties
Sets the encryption options for the document.The@param userPasswordandtheownerPasswordcanthe user password. Can be null orhaveof zero length.,Inwhichthisis equal tocaseomitting theownerPassworduserispassword @paramreplacedownerPasswordbythe 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_ASSEMBLYandALLOW_DEGRADED_PRINTING.ThepermissionscanbecombinedbyORingthem.SeeEncryptionConstants.ALLOW_ASSEMBLY.@paramanduserPasswordtheuserpassword.Canbenullorempty@paramownerPasswordtheownerpasswordEncryptionConstants.ALLOW_DEGRADED_PRINTING.Canbenullorempty@parampermissionstheuserThe permissions can be combined by ORingpermissionsthem @param encryptionAlgorithm the type of encryption. It can be oneofof EncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES128oror EncryptionConstants.ENCRYPTION_AES256AES256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can beoredOEed 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
Creates the certificate encryption.Class PdfEncryption, constructor PdfEncryption(byte[], byte[], int, int, byte[], PdfVersion)An array of one or more public
certificatescertificates must be provided togetherwithwith 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_ASSEMBLYandand EncryptionConstants.ALLOW_DEGRADED_PRINTING.ThepermissionscanbecombinedbyORingthem.@paramcertsthepubliccertificatestoThe permissions can beused for the encryptioncombined by ORing them @parampermissionsencryptionType the type oftheencryption.user permissions for each ofIt can be one ofthecertificates@paramencryptionTypethetypeofencryption.ItcanbeoneofEncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can beORedORed 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
Creates the encryption.The@param userPasswordandtheownerPasswordthecanuser password. Can be null orhaveof zero length., which is equal toInthiscaseomitting theownerPassword isuser passwordreplaced@parambyownerPassword 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_ASSEMBLYandand EncryptionConstants.ALLOW_DEGRADED_PRINTING.ThepermissionscanbecombinedbyORingthem.@paramuserPasswordtheuserpassword.CanThe permissions can benullcombinedorby ORingemptythem @paramownerPasswordencryptionType theownertypepasswordof encryption.CanIt can benull orone ofempty@parampermissionstheuserpermissions@paramencryptionTypethetypeofencryption.ItcanbeoneofEncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA canbebe ORed to output the metadata incleartextcleartext. 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
Sets the 'modified' flag to the indirect object, the flag denotes that the object was modified since the document opening.It is recommended to setThisthis flagisaftermeaningful only ifchanging any PDFtheobject.PdfDocumentFor example flag is
openedused in the appendmodemode (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.
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.
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. @seeClass PdfReader, long getLastXref()EncryptionConstantsEncryptionConstants @throws PdfException, if the method has been invoked before the PDF document was read.
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.Class PdfReader, byte[] getOriginalFileId()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.
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.Class PdfReader, long getPermissions()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.
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.Class PdfReader, boolean hasHybridXref()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.
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.
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 thisClass WriterProperties, WriterProperties addXmpMetadata(){@codeWriterProperties}instance
If true, default XMPMetadata based on PdfDocumentInfo will be added. For PDF 2.0 documents, metadata will be added in any case. @return thisClass WriterProperties, WriterProperties setCompressionLevel(int){@codeWriterProperties}instance
Defines the level of compression for the document. See CompressionConstants @param compressionLevel CompressionConstants value. @return thisClass WriterProperties, WriterProperties setFullCompressionMode(boolean){@codeWriterProperties}instance
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 thisClass WriterProperties, WriterProperties setInitialDocumentId(PdfString){@codeWriterProperties}instance
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 thisClass WriterProperties, WriterProperties setModifiedDocumentId(PdfString){@codeWriterProperties}instance
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 thisClass WriterProperties, WriterProperties setPdfVersion(PdfVersion){@codeWriterProperties}instance
Defines pdf version for the created document. Default value is PDF_1_7. @param version version for the document. @return thisClass WriterProperties, WriterProperties setPublicKeyEncryption(Certificate[], int[], int){@codeWriterProperties}instance
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.Class WriterProperties, WriterProperties setStandardEncryption(byte[], byte[], int, int)@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_ASSEMBLYandand EncryptionConstants.ALLOW_DEGRADED_PRINTING.ThepermissionscanbecombinedbyORingthem.@paramcertsthepubliccertificatestoThe permissions can beused for the encryptioncombined by ORing them @parampermissionsencryptionAlgorithm the type of encryption. It can be onetheofuserpermissionsforeachofthecertificates@paramencryptionAlgorithmthetypeofencryption.ItcanbeoneofEncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can beORedORed to output the metadata incleartextcleartext. 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{@codeWriterProperties}instance
Sets the encryption options for the document.Class WriterProperties, WriterProperties useDebugMode()The@param userPasswordandtheownerPasswordcanthe user password. Can be null orhaveof zero length.,Inwhichthisis equal tocaseomitting theownerPassword isuser passwordreplaced@parambyownerPassword 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_ASSEMBLYandand EncryptionConstants.ALLOW_DEGRADED_PRINTING.ThepermissionscanbecombinedbyORingthem.@paramuserPasswordtheuserpassword.Canbenullorempty@paramownerPasswordThe permissions can be combined by ORing them @param encryptionAlgorithm theownertypepasswordof encryption.CanIt can benull orone ofempty@parampermissionstheuserpermissions@paramencryptionAlgorithmthetypeofencryption.ItcanbeoneofEncryptionConstants.STANDARD_ENCRYPTION_40, EncryptionConstants.STANDARD_ENCRYPTION_128, EncryptionConstants.ENCRYPTION_AES_128 or EncryptionConstants.ENCRYPTION_AES_256. Optionally EncryptionConstants.DO_NOT_ENCRYPT_METADATA can beORedORed to output the metadata incleartextcleartext. 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{@codeWriterProperties}instance
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 thisClass WriterProperties, WriterProperties useSmartMode(){@codeWriterProperties}instance
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{@codeWriterProperties}instance