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 PdfCatalog, PdfNumTree getPageLabelsTree(boolean)

This method returns the NumberTree of Page Labels @param createIfNotExists defines whether the NumberTree of Page Labels should be created if it didn't exist before @return returns PdfNumTree
Class PdfCatalog, boolean isOCPropertiesMayHaveChanged()

True indicates that getOCProperties() was called, may have been modified, and thus its dictionary needs to be reconstructed. @return boolean indicating if the dictionary needs to be reconstructed
Class PdfCatalog, PdfCatalog setCollection(PdfCollection)

Sets collection dictionary that a conforming reader shall use to enhance the presentation of file attachments stored in the PDF document. @param collection dictionary @return PdfCatalog instance with applied collection dictionary
Class PdfCatalog, void setLang(PdfString)

An entry specifying the natural language, and optionally locale. Use this to specify the Language attribute on a Tagged Pdf element. For the content usage dictionary, use PdfName. Language Language @param lang language to be set
Class PdfCatalog, PdfCatalog setPageLayout(PdfName)

This method sets a page layout of the document @param pageLayout page layout of the document @return PdfCatalog instance with applied page layout
Class PdfCatalog, PdfCatalog setViewerPreferences(PdfViewerPreferences)

This method sets the document viewer preferences, specifying the way the document shall be displayed on the screen @param preferences document's viewer preferences @return PdfCatalog instance with applied viewer preferences

Class PdfDocument, PdfFont addFont(PdfFont)

Adds a PdfFont instance to this document so that this font is flushed automatically on document close. As a side effect, the underlying font dictionary is made indirect if it wasn't the case yet @param font a PdfFont instance to add @return the same PdfFont instance.
Class PdfDocument, PdfFont getFont(PdfDictionary)

Create a new instance of PdfFont or load already created one. @param dictionary PdfDictionary that presents PdfFont. @return instance of PdfFont

Note, PdfFont which created with PdfFontFactory.createFont(PdfDictionary) won't be cached until it will be added to com.itextpdf.kernel.pdf.canvas.PdfCanvas or PdfResources.

Class PdfDocument, PdfOutline getOutlines(boolean)

This method returns a complete outline tree of the whole document. @param updateOutlines if the flag is {@code true}, the method read reads the whole document and creates outline tree. If the flag is {@code false}, the method gets cached outline tree tree (if it was cached via calling getOutlines method before). @return fully initialize PdfOutline object.
Class PdfDocument, byte[] getXmpMetadata()

Gets XMPMetadata. @return the XMPMetadata
Class PdfDocument, List listIndirectReferences()

Gets static copy of cross reference table. @return a static copy of cross reference table
Class PdfDocument, XMPMeta updateDefaultXmpMetadata()

Update XMP metadata values from PdfDocumentInfo. @return the XMPMetadata

Class PdfPage, PdfFormXObject copyAsFormXObject(PdfDocument)

Copies page as FormXObject to the specified document. @param toDocument a document to copy to. @return copied PdfFormXObject object. @throws IOException if an I/O error occurs.
Class PdfPage, PdfArray getAssociatedFiles(boolean)

Returns files associated with PDF page. @param create iText defines will create whether AF array arrays will be created if it doesn't exist exist and create value is true @return associated files array .
Class PdfPage, List getOutlines(boolean)

This method gets outlines of a current page @param updateOutlines if the flag is {@code true}, the method reads the whole document and creates outline tree. If the flag is {@code false}, the method gets cached outline tree (if it was cached via calling getOutlines method before). @return return all outlines of a current page
Class PdfPage, PdfPage setIgnorePageRotationForContent(boolean)

If true - defines that in case the page has a rotation, then new content will be automatically rotated in the opposite direction. On the rotated page this would look like if new content ignores page rotation. Default value - {@code false}. @param ignorePageRotationForContent - true to ignore rotation of the new content on the rotated page. @return this PdfPage instance.

Class PdfReader, constructor PdfReader(IRandomAccessSource, ReaderProperties)

Constructs a new PdfReader. @param byteSource source of bytes for the reader @param properties properties of the created reader reader @throws IOException if an I/O error occurs
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. @return {@code int} value corresponding to a certain type of encryption. @see 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 isEncrypted()

Checks if the PdfDocument read with this PdfReader is encrypted. @return {@code true} is the document is encrypted, otherwise {@code false}. @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 PdfReader, void readPdf()

Parses the entire PDF PDF @throws IOException if an I/O error occurs.
Class PdfReader, InputStream readStream(PdfStream, boolean)

Reads, decrypt decrypts and optionally decode decodes stream bytes into ByteArrayInputStream. User is responsible for closing returned stream. @param stream a PdfStream stream instance to be read @param decode true if to get decoded stream, false if to leave it originally encoded. @return InputStream or {@code null} if reading was failed. @throws IOException on error.
Class PdfReader, byte[] readStreamBytes(PdfStream, boolean)

Reads, decrypt and optionally decode stream bytes. Note, this method doesn't store actual bytes in any internal structures. @param stream a PdfStream stream instance to be read and optionally decoded. @param decode true if to get decoded stream bytes, false if to leave it originally encoded. @return byte[] array. @throws IOException on error.
Class PdfReader, byte[] readStreamBytesRaw(PdfStream)

Reads and decrypt stream bytes. Note, this method doesn't store actual bytes in any internal structures. @param stream a PdfStream stream instance to be read @return byte[] array. @throws IOException on error.
Class PdfReader, PdfReader setUnethicalReading(boolean)

The iText is not responsible if you decide to change the value of this parameter. @param unethicalReading true to enable unethicalReading, false to disable it. By default unethicalReading is disabled. @return this PdfReader instance.

Class PdfResources, PdfName addFont(PdfDocument, PdfFont)

Adds font to resources and register registers PdfFont in the document for further flushing. @param pdfDocument a PdfDocument instance to which the font is added for further flushing @param font a PdfFont instance to be added @return added font resource name.
Class PdfResources, void setModified(boolean)

Sets the 'modified' flag to this PdfResources indirect object. The flag denotes that the object was modified since the document opening. @param isModified {@code true} if this PdfResources indirect object has been modified, otherwise {@code false}. @see PdfObject#setModified() @deprecated Please use .setModified().

Class PdfString, constructor PdfString(byte[], boolean)

Only PdfReader can use this method! @param content byte content the PdfString will be created from @param hexWriting boolean indicating if hex writing will be used
Class PdfString, boolean encrypt(PdfEncryption)

Encrypt content of {@code value} and set as content. {@code generateContent()} won't be called. @param encrypt @see PdfEncryption PdfEncryption instance @return true if value was encrypted, otherwise false.
Class PdfString, String toUnicodeString()

Returns the Unicode {@code String} value of this {@code PdfString}-object. @return Unicode string value created by current PdfString object

Class PdfViewerPreferences, PdfViewerPreferences setCenterWindow(boolean)

This method sets CenterWindow flag to true or false false @param centerWindow CenterWindow flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setDirection(PdfViewerPreferencesConstants)

This method sets predominant reading order of text. @param direction reading order type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setDisplayDocTitle(boolean)

This method sets DisplayDocTitle flag to true or false false @param displayDocTitle DisplayDocTitle flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setDuplex(PdfViewerPreferencesConstants)

This method sets the paper handling option that shall be used when printing the file from the print dialog. The following values are valid: Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge. @param duplex paper handling option's type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setFitWindow(boolean)

This method sets FitWindow flag to true or false false @param fitWindow FitWindow flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setHideMenubar(boolean)

This method sets HideMenuBar flag to true or false false @param hideMenubar HideMenuBar flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setHideToolbar(boolean)

This method sets HideToolBar flag to true or false false @param hideToolbar HideToolBar flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setHideWindowUI(boolean)

This method sets HideWindowUI flag to true or false false @param hideWindowUI HideWindowUI flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setNonFullScreenPageMode(PdfViewerPreferencesConstants)

This method sets NonFullScreenPageMode property. Allowed values are UseNone, UseOutlines, useThumbs, UseOC. This entry is meaningful only if the value of the PageMode entry in the Catalog dictionary is FullScreen FullScreen @param nonFullScreenPageMode NonFullScreenPageMode property type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setNumCopies(int)

This method sets the number of copies that shall be printed when the print dialog is opened for this file. @param numCopies the number of copies to print when the print dialog is opened @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setPickTrayByPDFSize(boolean)

This method sets PickTrayByPDFSize flag to true or false. @param pickTrayByPdfSize PickTrayByPDFSize flag's boolean value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setPrintArea(PdfViewerPreferencesConstants)

This method sets the name of the page boundary representing the area of a page that shall be rendered when printing the document. Deprecated in PDF 2.0. @param pageBoundary page boundary type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setPrintClip(PdfViewerPreferencesConstants)

This method sets the name of the page boundary to which the contents of a page shall be clipped when printing the document. Deprecated in PDF 2.0. @param pageBoundary page boundary type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setPrintPageRange(int[])

This method sets the page numbers used to initialize the print dialog box when the file is printed. @param printPageRange the array of page numbers @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setPrintScaling(PdfViewerPreferencesConstants)

This method sets the page scaling option that shall be selected when a print dialog is displayed for this document. Valid values are None and AppDefault. @param printScaling page scaling option's type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setViewArea(PdfViewerPreferencesConstants)

This method sets the name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen. Deprecated in PDF 2.0. @param pageBoundary page boundary type value @return current instance of PdfViewerPreferences
Class PdfViewerPreferences, PdfViewerPreferences setViewClip(PdfViewerPreferencesConstants)

This method sets the name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen. Deprecated in PDF 2.0. @param pageBoundary page boundary type value @return current instance of PdfViewerPreferences

Class PdfWriter, constructor PdfWriter(File)

Create a PdfWriter writing to the passed File and with default writer properties. @param file File to write to. @throws FileNotFoundException if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
Class PdfWriter, constructor PdfWriter(String)

Create a PdfWriter writing to the passed filename and with default writer properties. @param filename filename of the resulting pdf. @throws FileNotFoundException if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
Class PdfWriter, constructor PdfWriter(String, WriterProperties)

Create a PdfWriter writing to the passed filename and using the passed writer properties. @param filename filename of the resulting pdf. @param properties writerproperties to use. @throws FileNotFoundException if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
Class PdfWriter, void close()

Close the writer and underlying streams. @throws java.io.IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed previously.
Class PdfWriter, void flushModifiedWaitingObjects(Set)

Flushes all modified objects which have not been flushed yet. Used in case incremental updates. @param forbiddenToFlush a Set of references that are forbidden to be flushed flushed automatically.
Class PdfWriter, void flushWaitingObjects(Set)

Flushes all objects which have not been flushed yet. @param forbiddenToFlush a Set of references that are forbidden to be flushed flushed automatically.
Class PdfWriter, PdfWriter setCompressionLevel(int)

Sets default compression level for @see PdfStream. For more details @see com.itextpdf.io.source.DeflaterOutputStream. @param compressionLevel compression level. @return this PdfWriter instance
Class PdfWriter, PdfWriter setSmartMode(boolean)

Sets the 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. @param smartMode True for enabling smart mode. @return this PdfWriter instance
Class PdfWriter, void write(byte[])

Write a byte array to the underlying stream @param b byte array to write @throws java.io.IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
Class PdfWriter, void write(byte[], int, int)

Write a slice of the passed byte array to the underlying stream @param b byte array to slice and write. @param off starting index of the slice. @param len length of the slice. @throws java.io.IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
Class PdfWriter, void write(int)

Write an integer to the underlying stream @param b integer to write @throws java.io.IOException if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
Class PdfWriter, void writeToBody(PdfObject)

Writes object to body of PDF document. @param pdfObj object to write. @throws IOException obsolete. {@code throws} declaration would be removed in 7.2

Class ReaderProperties, ReaderProperties setMemoryLimitsAwareHandler(MemoryLimitsAwareHandler)

Sets the memory handler which will be used to handle decompressed pdf PDF streams. @param memoryLimitsAwareHandler the memory handler which will be used to handle decompressed pdf PDF streams @return this ReaderProperties instance .
Class ReaderProperties, ReaderProperties setPassword(byte[])

Defines the password which will be used if the document is encrypted with standard encryption. This could be either user or owner password. @param password the password to use in order to open the document. document @return this ReaderProperties instance
Class ReaderProperties, ReaderProperties setPublicKeySecurityParams(Certificate, IExternalDecryptionProcess)

Defines the certificate which will be used if the document is encrypted with public key key encryption (see Pdf 1.7 specification, 7.6.4. Public-Key Security Handlers) @param certificate the recipient Certificate, serves as recipient identifier @param externalDecryptionProcess the external decryption process to be used @return this ReaderProperties instance
Class ReaderProperties, ReaderProperties setPublicKeySecurityParams(Certificate, Key, String, IExternalDecryptionProcess)

Defines the certificate which will be used if the document is encrypted with public key key encryption (see Pdf 1.7 specification, 7.6.4. Public-Key Security Handlers) @param certificate the recipient Certificate, serves as recipient identifier @param certificateKey the recipient private Key to the certificate @param certificateKeyProvider the certificate key provider id for java.security.Security.getProvider(String) @param externalDecryptionProcess the external decryption process to be used @return this ReaderProperties instance