iText 8.0.5 API
|
Main enter point to work with PDF document. More...
Public Member Functions |
|
PdfDocument (PdfReader reader) | |
Open PDF document in reading mode. More... |
|
PdfDocument (PdfReader reader, DocumentProperties properties) | |
Open PDF document in reading mode. More... |
|
PdfDocument (PdfWriter writer) | |
Open PDF document in writing mode. More... |
|
PdfDocument (PdfWriter writer, DocumentProperties properties) | |
Open PDF document in writing mode. More... |
|
PdfDocument (PdfReader reader, PdfWriter writer) | |
Opens PDF document in the stamping mode. More... |
|
PdfDocument (PdfReader reader, PdfWriter writer, StampingProperties properties) | |
Open PDF document in stamping mode. More... |
|
virtual void | SetXmpMetadata (XMPMeta xmpMeta, SerializeOptions serializeOptions) |
Sets the XMP Metadata. More... |
|
virtual void | SetXmpMetadata (XMPMeta xmpMeta) |
Sets the XMP Metadata. More... |
|
virtual byte[] | GetXmpMetadata () |
Gets XMPMetadata. More... |
|
virtual byte[] | GetXmpMetadata (bool createNew) |
Gets XMPMetadata or create a new one. More... |
|
virtual PdfObject | GetPdfObject (int objNum) |
Gets PdfObject by object number. More... |
|
virtual int | GetNumberOfPdfObjects () |
Get number of indirect objects in the document. More... |
|
virtual PdfPage | GetPage (int pageNum) |
Gets the page by page number. More... |
|
virtual PdfPage | GetPage (PdfDictionary pageDictionary) |
Gets the PdfPage instance by PdfDictionary. More... |
|
virtual PdfPage | GetFirstPage () |
Get the first page of the document. More... |
|
virtual PdfPage | GetLastPage () |
Gets the last page of the document. More... |
|
virtual MemoryLimitsAwareHandler | GetMemoryLimitsAwareHandler () |
Gets current memory limits handler More... |
|
virtual void | MarkStreamAsEmbeddedFile (PdfStream stream) |
Marks PdfStream object as embedded file stream. More... |
|
virtual PdfPage | AddNewPage () |
Creates and adds new page to the end of document. More... |
|
virtual PdfPage | AddNewPage (PageSize pageSize) |
Creates and adds new page with the specified page size. More... |
|
virtual PdfPage | AddNewPage (int index) |
Creates and inserts new page to the document. More... |
|
virtual PdfPage | AddNewPage (int index, PageSize pageSize) |
Creates and inserts new page to the document. More... |
|
virtual PdfPage | AddPage (PdfPage page) |
Adds page to the end of document. More... |
|
virtual PdfPage | AddPage (int index, PdfPage page) |
Inserts page to the document. More... |
|
virtual int | GetNumberOfPages () |
Gets number of pages of the document. More... |
|
virtual int | GetPageNumber (PdfPage page) |
Gets page number by page. More... |
|
virtual int | GetPageNumber (PdfDictionary pageDictionary) |
Gets page number by PdfDictionary. More... |
|
virtual bool | MovePage (PdfPage page, int insertBefore) |
Moves page to new place in same document with all it tag structure More... |
|
virtual void | MovePage (int pageNumber, int insertBefore) |
Moves page to new place in same document with all it tag structure More... |
|
virtual bool | RemovePage (PdfPage page) |
Removes the first occurrence of the specified page from this document, if it is present. More... |
|
virtual void | RemovePage (int pageNum) |
Removes page from the document by page number. More... |
|
virtual DIContainer | GetDiContainer () |
Gets the container containing all available dependencies. More... |
|
virtual PdfDocumentInfo | GetDocumentInfo () |
Gets document information dictionary. More... |
|
virtual PdfString | GetOriginalDocumentId () |
Gets original document id More... |
|
virtual PdfString | GetModifiedDocumentId () |
Gets modified document id More... |
|
virtual PageSize | GetDefaultPageSize () |
Gets default page size. More... |
|
virtual void | SetDefaultPageSize (PageSize pageSize) |
Sets default page size. More... |
|
virtual void | AddEventHandler (String type, iText.Kernel.Events.IEventHandler handler) |
virtual void | DispatchEvent (Event @event) |
Dispatches an event. More... |
|
virtual void | DispatchEvent (Event @event, bool delayed) |
Dispatches a delayed event. More... |
|
virtual bool | HasEventHandler (String type) |
Checks if event dispatcher as an event handler assigned for a certain event type. More... |
|
virtual void | RemoveEventHandler (String type, iText.Kernel.Events.IEventHandler handler) |
virtual void | RemoveAllHandlers () |
Remove all event handlers. More... |
|
virtual PdfWriter | GetWriter () |
Gets PdfWriter associated with the document. More... |
|
virtual PdfReader | GetReader () |
Gets PdfReader associated with the document. More... |
|
virtual bool | IsAppendMode () |
Returns true if the document is opened in append mode, and false otherwise. More... |
|
virtual PdfIndirectReference | CreateNextIndirectReference () |
Creates next available indirect reference. More... |
|
virtual PdfVersion | GetPdfVersion () |
Gets PDF version. More... |
|
virtual PdfCatalog | GetCatalog () |
Gets PDF catalog. More... |
|
virtual void | Close () |
Close PDF document. More... |
|
virtual bool | IsClosed () |
Gets close status of the document. More... |
|
virtual bool | IsTagged () |
Gets tagged status of the document. More... |
|
virtual iText.Kernel.Pdf.PdfDocument | SetTagged () |
Specifies that document shall contain tag structure. More... |
|
virtual PdfStructTreeRoot | GetStructTreeRoot () |
Gets iText.Kernel.Pdf.Tagging.PdfStructTreeRoot of tagged document. More... |
|
virtual int | GetNextStructParentIndex () |
Gets next parent index of tagged document. More... |
|
virtual TagStructureContext | GetTagStructureContext () |
Gets document TagStructureContext . More... |
|
virtual IList< PdfPage > | CopyPagesTo (int pageFrom, int pageTo, iText.Kernel.Pdf.PdfDocument toDocument, int insertBeforePage) |
Copies a range of pages from current document to toDocument . More... |
|
virtual IConformanceLevel | GetConformanceLevel () |
Get the IConformanceLevel More... |
|
virtual IList< PdfPage > | CopyPagesTo (int pageFrom, int pageTo, iText.Kernel.Pdf.PdfDocument toDocument, int insertBeforePage, IPdfPageExtraCopier copier) |
Copies a range of pages from current document to toDocument . More... |
|
virtual IList< PdfPage > | CopyPagesTo (int pageFrom, int pageTo, iText.Kernel.Pdf.PdfDocument toDocument) |
Copies a range of pages from current document to toDocument appending copied pages to the end. More... |
|
virtual IList< PdfPage > | CopyPagesTo (int pageFrom, int pageTo, iText.Kernel.Pdf.PdfDocument toDocument, IPdfPageExtraCopier copier) |
Copies a range of pages from current document to toDocument appending copied pages to the end. More... |
|
virtual IList< PdfPage > | CopyPagesTo (IList< int > pagesToCopy, iText.Kernel.Pdf.PdfDocument toDocument, int insertBeforePage) |
Copies a range of pages from current document to toDocument . More... |
|
virtual IList< PdfPage > | CopyPagesTo (IList< int > pagesToCopy, iText.Kernel.Pdf.PdfDocument toDocument, int insertBeforePage, IPdfPageExtraCopier copier) |
Copies a range of pages from current document to toDocument . More... |
|
virtual IList< PdfPage > | CopyPagesTo (IList< int > pagesToCopy, iText.Kernel.Pdf.PdfDocument toDocument) |
Copies a range of pages from current document to toDocument appending copied pages to the end. More... |
|
virtual IList< PdfPage > | CopyPagesTo (IList< int > pagesToCopy, iText.Kernel.Pdf.PdfDocument toDocument, IPdfPageExtraCopier copier) |
Copies a range of pages from current document to toDocument appending copied pages to the end. More... |
|
virtual void | FlushCopiedObjects (iText.Kernel.Pdf.PdfDocument sourceDoc) |
Flush all copied objects and remove them from copied cache. More... |
|
virtual bool | IsCloseReader () |
Checks, whether Close() method will close associated PdfReader. More... |
|
virtual void | SetCloseReader (bool closeReader) |
Sets, whether Close() method shall close associated PdfReader. More... |
|
virtual bool | IsCloseWriter () |
Checks, whether Close() method will close associated PdfWriter. More... |
|
virtual void | SetCloseWriter (bool closeWriter) |
Sets, whether Close() method shall close associated PdfWriter. More... |
|
virtual bool | IsFlushUnusedObjects () |
Checks, whether Close() will flush unused objects, e.g. unreachable from PDF Catalog. More... |
|
virtual void | SetFlushUnusedObjects (bool flushUnusedObjects) |
Sets, whether Close() shall flush unused objects, e.g. unreachable from PDF Catalog. More... |
|
virtual PdfOutline | GetOutlines (bool updateOutlines) |
This method returns a complete outline tree of the whole document. More... |
|
virtual void | InitializeOutlines () |
This method initializes an outline tree of the document and sets outline mode to true. More... |
|
virtual void | AddNamedDestination (String key, PdfObject value) |
This methods adds new name in the Dests NameTree. More... |
|
virtual void | AddNamedDestination (PdfString key, PdfObject value) |
This methods adds new name in the Dests NameTree. More... |
|
virtual IList< PdfIndirectReference > | ListIndirectReferences () |
Gets static copy of cross reference table. More... |
|
virtual PdfDictionary | GetTrailer () |
Gets document trailer. More... |
|
virtual void | AddOutputIntent (PdfOutputIntent outputIntent) |
Adds PdfOutputIntent that shall specify the colour characteristics of output devices on which the document might be rendered. More... |
|
virtual void | CheckIsoConformance (Object obj, IsoKey key) |
Checks whether PDF document conforms a specific standard. More... |
|
virtual void | CheckIsoConformance (Object obj, IsoKey key, PdfResources resources, PdfStream contentStream) |
Checks whether PDF document conforms a specific standard. More... |
|
virtual void | CheckIsoConformance (Object obj, IsoKey key, PdfResources resources, PdfStream contentStream, Object extra) |
Checks whether PDF document conforms a specific standard. More... |
|
virtual void | CheckShowTextIsoConformance (CanvasGraphicsState gState, PdfResources resources) |
Checks whether PDF document conforms a specific standard. More... |
|
virtual void | AddFileAttachment (String key, PdfFileSpec fs) |
Adds file attachment at document level. More... |
|
virtual void | AddAssociatedFile (String description, PdfFileSpec fs) |
Adds file associated with PDF document as a whole and identifies the relationship between them. More... |
|
virtual PdfArray | GetAssociatedFiles () |
Returns files associated with PDF document. More... |
|
virtual PdfEncryptedPayloadDocument | GetEncryptedPayloadDocument () |
Gets the encrypted payload of this document, or returns null if this document isn't an unencrypted wrapper document. More... |
|
virtual void | SetEncryptedPayload (PdfFileSpec fs) |
Sets an encrypted payload, making this document an unencrypted wrapper document. More... |
|
virtual String[] | GetPageLabels () |
This method retrieves the page labels from a document as an array of String objects. More... |
|
virtual bool | HasOutlines () |
Indicates if the document has any outlines More... |
|
virtual void | SetUserProperties (bool userProperties) |
Sets the flag indicating the presence of structure elements that contain user properties attributes. More... |
|
virtual PdfFont | GetFont (PdfDictionary dictionary) |
Create a new instance of iText.Kernel.Font.PdfFont or load already created one. More... |
|
virtual PdfFont | GetDefaultFont () |
Gets default font for the document: Helvetica, WinAnsi. More... |
|
virtual PdfFont | AddFont (PdfFont font) |
Adds a iText.Kernel.Font.PdfFont instance to this document so that this font is flushed automatically on document close. More... |
|
virtual bool | RegisterProduct (ProductData productData) |
Registers a product for debugging purposes. More... |
|
virtual FingerPrint | GetFingerPrint () |
Returns the object containing the registered products. More... |
|
virtual PdfFont | FindFont (String fontProgram, String encoding) |
Find iText.Kernel.Font.PdfFont from loaded fonts with corresponding fontProgram and encoding or CMAP. More... |
|
virtual long | GetDocumentId () |
Obtains numeric document id. More... |
|
virtual SequenceId | GetDocumentIdWrapper () |
Obtains document id as a iText.Commons.Actions.Sequence.SequenceId. More... |
|
virtual SerializeOptions | GetSerializeOptions () |
Gets a persistent XMP metadata serialization options. More... |
|
virtual void | SetSerializeOptions (SerializeOptions serializeOptions) |
Sets a persistent XMP metadata serialization options. More... |
|
Public Member Functions inherited from iText.Kernel.Events.IEventDispatcher | |
void | AddEventHandler (String type, iText.Kernel.Events.IEventHandler handler) |
Adds new event handler. More... |
|
void | RemoveEventHandler (String type, iText.Kernel.Events.IEventHandler handler) |
Removes event handler. More... |
|
Package Functions |
|
virtual void | SetXmpMetadata (byte[] xmpMetadata) |
Use this method to set the XMP Metadata. More... |
|
virtual void | InitTagStructureContext () |
Initialize iText.Kernel.Pdf.Tagutils.TagStructureContext. More... |
|
virtual void | StoreDestinationToReaddress (PdfDestination destination, Action< PdfDestination > onPageAvailable, Action< PdfDestination > onPageNotAvailable) |
Save destinations in a temporary storage for further copying. More... |
|
virtual void | CheckIsoConformance () |
Checks whether PDF document conforms to a specific standard. More... |
|
virtual void | MarkObjectAsMustBeFlushed (PdfObject pdfObject) |
Mark an object with PdfObject.MUST_BE_FLUSHED. More... |
|
virtual void | FlushObject (PdfObject pdfObject, bool canBeInObjStm) |
Flush an object. More... |
|
virtual void | Open (PdfVersion newPdfVersion) |
Initializes document. More... |
|
virtual void | AddCustomMetadataExtensions (XMPMeta xmpMeta) |
Adds custom XMP metadata extension. More... |
|
virtual void | FlushInfoDictionary (bool appendMode) |
Flush info dictionary if needed. More... |
|
virtual void | UpdateXmpMetadata () |
Updates XMP metadata. More... |
|
virtual XMPMeta | UpdateDefaultXmpMetadata () |
Update XMP metadata values from PdfDocumentInfo. More... |
|
virtual ICollection< PdfFont > | GetDocumentFonts () |
List all newly added or loaded fonts More... |
|
virtual void | FlushFonts () |
Flushes all newly added or loaded fonts. More... |
|
virtual void | CheckAndAddPage (int index, PdfPage page) |
Checks page before adding and add. More... |
|
virtual void | CheckAndAddPage (PdfPage page) |
Checks page before adding. More... |
|
virtual void | CheckClosingStatus () |
checks whether a method is invoked at the closed document More... |
|
virtual IPdfPageFactory | GetPageFactory () |
Returns the factory for creating page instances. More... |
|
virtual void | TryInitTagStructure (PdfDictionary str) |
Initializes the new instance of document's structure tree root iText.Kernel.Pdf.Tagging.PdfStructTreeRoot. More... |
|
Package Attributes |
|
readonly StampingProperties | properties |
EventDispatcher | eventDispatcher = new EventDispatcher() |
PdfWriter | writer = null |
PdfWriter associated with the document. More... |
|
PdfReader | reader = null |
PdfReader associated with the document. More... |
|
byte[] | xmpMetadata = null |
XMP Metadata for the document. More... |
|
PdfCatalog | catalog = null |
Document catalog. More... |
|
PdfDictionary | trailer = null |
Document trailed. More... |
|
PdfDocumentInfo | info = null |
Document info. More... |
|
PdfVersion | pdfVersion = PdfVersion.PDF_1_7 |
Document version. More... |
|
FingerPrint | fingerPrint |
SerializeOptions | serializeOptions = new SerializeOptions() |
PdfStructTreeRoot | structTreeRoot |
int | structParentIndex = -1 |
bool | closeReader = true |
bool | closeWriter = true |
bool | isClosing = false |
bool | closed = false |
bool | flushUnusedObjects = false |
flag determines whether to write unused objects to result document More... |
|
TagStructureContext | tagStructureContext |
Main enter point to work with PDF document.
|
inline |
Open PDF document in reading mode.
reader | PDF reader. |
|
inline |
Open PDF document in reading mode.
reader | PDF reader. |
properties | document properties |
|
inline |
Open PDF document in writing mode.
Open PDF document in writing mode. Document has no pages when initialized.
writer | PDF writer |
|
inline |
Open PDF document in writing mode.
Open PDF document in writing mode. Document has no pages when initialized.
writer | PDF writer |
properties | document properties |
Opens PDF document in the stamping mode.
Opens PDF document in the stamping mode.
reader | PDF reader. |
writer | PDF writer. |
|
inline |
Open PDF document in stamping mode.
reader | PDF reader. |
writer | PDF writer. |
properties | properties of the stamping process |
|
inlinevirtual |
Adds file associated with PDF document as a whole and identifies the relationship between them.
Adds file associated with PDF document as a whole and identifies the relationship between them.
Associated files may be used in Pdf/A-3 and Pdf 2.0 documents. The method is very similar to AddFileAttachment(System.String, iText.Kernel.Pdf.Filespec.PdfFileSpec). However, besides adding file description to Names tree, it adds file to array value of the AF key in the document catalog.
For associated files their associated file specification dictionaries shall include the AFRelationship key
description | the file description |
fs | file specification dictionary of associated file |
|
inlinepackagevirtual |
Adds custom XMP metadata extension.
Adds custom XMP metadata extension. Useful for PDF/UA, ZUGFeRD, etc.
xmpMeta |
iText.Kernel.XMP.XMPMeta to add custom metadata to.
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
|
inlinevirtual |
Adds file attachment at document level.
key | name of the destination. |
fs |
Adds a iText.Kernel.Font.PdfFont instance to this document so that this font is flushed automatically on document close.
Adds a iText.Kernel.Font.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
font | a iText.Kernel.Font.PdfFont instance to add |
|
inlinevirtual |
This methods adds new name in the Dests NameTree.
This methods adds new name in the Dests NameTree. It throws an exception, if the name already exists.
key | Name of the destination. |
value | An object destination refers to. Must be an array or a dictionary with key /D and array. See ISO 32000-1 12.3.2.3 for more info. |
|
inlinevirtual |
This methods adds new name in the Dests NameTree.
This methods adds new name in the Dests NameTree. It throws an exception, if the name already exists.
key | Name of the destination. |
value | An object destination refers to. Must be an array or a dictionary with key /D and array. See ISO 32000-1 12.3.2.3 for more info. |
|
inlinevirtual |
Creates and adds new page to the end of document.
|
inlinevirtual |
Creates and inserts new page to the document.
index | position to addPage page to |
|
inlinevirtual |
Creates and inserts new page to the document.
index | position to addPage page to |
pageSize | page size of the new page |
Creates and adds new page with the specified page size.
pageSize | page size of the new page |
|
inlinevirtual |
Adds PdfOutputIntent that shall specify the colour characteristics of output devices on which the document might be rendered.
outputIntent |
PdfOutputIntent to add.
Reimplemented in iText.Pdfa.PdfADocument.
Inserts page to the document.
index | position to addPage page to |
page | page to addPage |
Adds page to the end of document.
page | page to add. |
|
inlinepackagevirtual |
Checks page before adding and add.
index | one-base index of the page. |
page |
PdfPage to add.
|
inlinepackagevirtual |
|
inlinepackagevirtual |
checks whether a method is invoked at the closed document
|
inlinepackagevirtual |
Checks whether PDF document conforms to a specific standard.
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
Checks whether PDF document conforms a specific standard.
obj | An object to conform. |
key | type of object to conform. |
|
inlinevirtual |
Checks whether PDF document conforms a specific standard.
obj | an object to conform. |
key | type of object to conform. |
resources |
PdfResources associated with an object to check.
contentStream | current content stream |
|
inlinevirtual |
Checks whether PDF document conforms a specific standard.
obj | an object to conform. |
key | type of object to conform. |
resources |
PdfResources associated with an object to check.
contentStream | current content stream. |
extra | extra data required for the check. |
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
Checks whether PDF document conforms a specific standard.
Checks whether PDF document conforms a specific standard. Shall be overridden.
gState | a iText.Kernel.Pdf.Canvas.CanvasGraphicsState object to conform. |
resources |
PdfResources associated with an object to check.
|
inlinevirtual |
Close PDF document.
|
inlinevirtual |
Copies a range of pages from current document to toDocument appending copied pages to the end.
Copies a range of pages from current document to toDocument appending copied pages to the end. Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pagesToCopy | list of pages to be copied. |
toDocument | a document to copy pages to. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument .
Copies a range of pages from current document to toDocument . Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pagesToCopy | list of pages to be copied. |
toDocument | a document to copy pages to. |
insertBeforePage | a position where to insert copied pages. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument .
Copies a range of pages from current document to toDocument . Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pagesToCopy | list of pages to be copied. |
toDocument | a document to copy pages to. |
insertBeforePage | a position where to insert copied pages. |
copier | a copier which bears a special copy logic. May be null. It is recommended to use the same instance of IPdfPageExtraCopier for the same output document. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument appending copied pages to the end.
Copies a range of pages from current document to toDocument appending copied pages to the end. Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pagesToCopy | list of pages to be copied. |
toDocument | a document to copy pages to. |
copier | a copier which bears a special copy logic. May be null. It is recommended to use the same instance of IPdfPageExtraCopier for the same output document. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument appending copied pages to the end.
Copies a range of pages from current document to toDocument appending copied pages to the end. This range is inclusive, both page
and pageTo are included in list of copied pages. Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pageFrom | 1-based start of the range of pages to be copied. |
pageTo | 1-based end (inclusive) of the range of pages to be copied. This page is included in list of copied pages. |
toDocument | a document to copy pages to. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument .
Copies a range of pages from current document to toDocument . Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pageFrom | start of the range of pages to be copied. |
pageTo | end of the range of pages to be copied. |
toDocument | a document to copy pages to. |
insertBeforePage | a position where to insert copied pages. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument .
Copies a range of pages from current document to toDocument . This range is inclusive, both page
and pageTo are included in list of copied pages. Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pageFrom | 1-based start of the range of pages to be copied. |
pageTo | 1-based end (inclusive) of the range of pages to be copied. This page is included in list of copied pages. |
toDocument | a document to copy pages to. |
insertBeforePage | a position where to insert copied pages. |
copier | a copier which bears a special copy logic. May be null. It is recommended to use the same instance of IPdfPageExtraCopier for the same output document. |
|
inlinevirtual |
Copies a range of pages from current document to toDocument appending copied pages to the end.
Copies a range of pages from current document to toDocument appending copied pages to the end. This range is inclusive, both page
and pageTo are included in list of copied pages. Use this method if you want to copy pages across tagged documents. This will keep resultant PDF structure consistent.
If outlines destination names are the same in different documents, all such outlines will lead to a single location in the resultant document. In this case iText will log a warning. This can be avoided by renaming destinations names in the source document.
pageFrom | 1-based start of the range of pages to be copied. |
pageTo | 1-based end (inclusive) of the range of pages to be copied. This page is included in list of copied pages. |
toDocument | a document to copy pages to. |
copier | a copier which bears a special copy logic. May be null. It is recommended to use the same instance of IPdfPageExtraCopier for the same output document. |
|
inlinevirtual |
Creates next available indirect reference.
|
inlinevirtual |
Dispatches an event.
Implements iText.Kernel.Events.IEventDispatcher.
|
inlinevirtual |
Dispatches a delayed event.
Implements iText.Kernel.Events.IEventDispatcher.
|
inlinevirtual |
Find iText.Kernel.Font.PdfFont from loaded fonts with corresponding fontProgram and encoding or CMAP.
fontProgram | a font name or path to a font program |
encoding | an encoding or CMAP |
|
inlinevirtual |
Flush all copied objects and remove them from copied cache.
Flush all copied objects and remove them from copied cache.
Note, if you will copy objects from the same document, duplicated objects will be created. That's why usually this method is meant to be used when all copying from source document is finished. For other cases one can also consider other flushing mechanisms, e.g. pages-based flushing.
sourceDoc | source document |
|
inlinepackagevirtual |
Flushes all newly added or loaded fonts.
|
inlinepackagevirtual |
Flush info dictionary if needed.
appendMode | true if the document is edited in append mode. |
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinepackagevirtual |
Flush an object.
pdfObject | object to flush. |
canBeInObjStm | indicates whether object can be placed into object stream. |
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
Returns files associated with PDF document.
|
inlinevirtual |
Gets PDF catalog.
|
inlinevirtual |
Get the IConformanceLevel
Reimplemented in iText.Pdfa.PdfADocument, and iText.Pdfua.PdfUADocument.
|
inlinevirtual |
Gets default font for the document: Helvetica, WinAnsi.
Gets default font for the document: Helvetica, WinAnsi. One instance per document.
null
on error.
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
Gets default page size.
Gets default page size. New pages by default are created with this size.
|
inlinevirtual |
Gets the container containing all available dependencies.
|
inlinepackagevirtual |
List all newly added or loaded fonts
|
inlinevirtual |
Obtains numeric document id.
|
inlinevirtual |
Obtains document id as a iText.Commons.Actions.Sequence.SequenceId.
|
inlinevirtual |
Gets document information dictionary.
Gets document information dictionary. info is lazy initialized. It will be initialized during the first call of this method.
|
inlinevirtual |
Gets the encrypted payload of this document, or returns null
if this document isn't an unencrypted wrapper document.
|
inlinevirtual |
Returns the object containing the registered products.
|
inlinevirtual |
Get the first page of the document.
|
inlinevirtual |
Create a new instance of iText.Kernel.Font.PdfFont or load already created one.
dictionary |
PdfDictionary that presents iText.Kernel.Font.PdfFont.
instance of iText.Kernel.Font.PdfFont
Note, PdfFont which created with iText.Kernel.Font.PdfFontFactory.CreateFont(PdfDictionary) won't be cached until it will be added to iText.Kernel.Pdf.Canvas.PdfCanvas or PdfResources.
|
inlinevirtual |
Gets the last page of the document.
|
inlinevirtual |
Gets current memory limits handler
MemoryLimitsAwareHandler
instance
|
inlinevirtual |
Gets modified document id
Gets modified document id
In order to set modifiedDocumentId WriterProperties.SetModifiedDocumentId(PdfString) should be used
|
inlinevirtual |
Gets next parent index of tagged document.
|
inlinevirtual |
Gets number of pages of the document.
|
inlinevirtual |
Get number of indirect objects in the document.
|
inlinevirtual |
Gets original document id
Gets original document id
In order to set originalDocumentId WriterProperties.SetInitialDocumentId(PdfString) should be used
|
inlinevirtual |
This method returns a complete outline tree of the whole document.
updateOutlines | if the flag is true , the method reads the whole document and creates outline tree. If the flag is false , the method gets cached outline tree (if it was cached via calling getOutlines method before). |
|
inlinevirtual |
Gets the page by page number.
pageNum | page number. |
|
inlinevirtual |
Gets the PdfPage instance by PdfDictionary.
pageDictionary |
PdfDictionary that present page.
|
inlinepackagevirtual |
Returns the factory for creating page instances.
Reimplemented in iText.Pdfa.PdfADocument, and iText.Pdfua.PdfUADocument.
|
inlinevirtual |
This method retrieves the page labels from a document as an array of String objects.
System.String list of page labels if they were found, or null
otherwise
|
inlinevirtual |
Gets page number by PdfDictionary.
pageDictionary |
PdfDictionary that present page.
|
inlinevirtual |
Gets page number by page.
page | the page. |
|
inlinevirtual |
|
inlinevirtual |
Gets PDF version.
|
inlinevirtual |
|
inlinevirtual |
Gets a persistent XMP metadata serialization options.
|
inlinevirtual |
Gets iText.Kernel.Pdf.Tagging.PdfStructTreeRoot of tagged document.
iText.Kernel.Pdf.Tagging.PdfStructTreeRoot in case document is tagged, otherwise it returns null.
|
inlinevirtual |
Gets document TagStructureContext
.
Gets document TagStructureContext
. The document must be tagged, otherwise an exception will be thrown.
TagStructureContext
.
|
inlinevirtual |
Gets document trailer.
|
inlinevirtual |
|
inlinevirtual |
Gets XMPMetadata.
|
inlinevirtual |
Gets XMPMetadata or create a new one.
createNew | if true, create a new empty XMPMetadata if it did not present. |
|
inlinevirtual |
Checks if event dispatcher as an event handler assigned for a certain event type.
Implements iText.Kernel.Events.IEventDispatcher.
|
inlinevirtual |
Indicates if the document has any outlines
true
, if there are outlines and false
otherwise.
|
inlinevirtual |
This method initializes an outline tree of the document and sets outline mode to true.
|
inlinepackagevirtual |
Initialize iText.Kernel.Pdf.Tagutils.TagStructureContext.
Reimplemented in iText.Pdfa.PdfADocument.
|
inlinevirtual |
Returns true
if the document is opened in append mode, and false
otherwise.
true
if the document is opened in append mode, and false
otherwise.
|
inlinevirtual |
Gets close status of the document.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Gets tagged status of the document.
|
inlinevirtual |
Gets static copy of cross reference table.
|
inlinepackagevirtual |
Mark an object with PdfObject.MUST_BE_FLUSHED.
pdfObject | an object to mark. |
|
inlinevirtual |
Marks PdfStream object as embedded file stream.
Marks PdfStream object as embedded file stream. Note that this method is for internal usage. To add an embedded file to the PDF document please use specialized API for file attachments. (e.g. AddFileAttachment(System.String, iText.Kernel.Pdf.Filespec.PdfFileSpec) , PdfPage.AddAnnotation(iText.Kernel.Pdf.Annot.PdfAnnotation) )
stream | to be marked as embedded file stream |
|
inlinevirtual |
Moves page to new place in same document with all it tag structure
pageNumber | number of Page that will be moved |
insertBefore | indicates before which page new one will be inserted to |
|
inlinevirtual |
Moves page to new place in same document with all it tag structure
page | page to be moved in document if present |
insertBefore | indicates before which page new one will be inserted to |
true
if this document contained the specified page
|
inlinepackagevirtual |
Initializes document.
newPdfVersion | new pdf version of the resultant file if stamper is used and the version needs to be changed, or null otherwise |
|
inlinevirtual |
Registers a product for debugging purposes.
productData | product to be registered. |
|
inlinevirtual |
Remove all event handlers.
Implements iText.Kernel.Events.IEventDispatcher.
|
inlinevirtual |
|
inlinevirtual |
Removes page from the document by page number.
pageNum | the one-based index of the PdfPage to be removed |
|
inlinevirtual |
Removes the first occurrence of the specified page from this document, if it is present.
Removes the first occurrence of the specified page from this document, if it is present. Returns true
if this document contained the specified element (or equivalently, if this document changed as a result of the call).
page | page to be removed from this document, if present |
true
if this document contained the specified page
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Sets default page size.
Sets default page size. New pages by default will be created with this size.
pageSize | page size to be set as default |
|
inlinevirtual |
Sets an encrypted payload, making this document an unencrypted wrapper document.
Sets an encrypted payload, making this document an unencrypted wrapper document. The file spec shall include the AFRelationship key with a value of EncryptedPayload, and shall include an encrypted payload dictionary.
fs | encrypted payload file spec. iText.Kernel.Pdf.Filespec.PdfEncryptedPayloadFileSpecFactory can produce one. |
|
inlinevirtual |
|
inlinevirtual |
Sets a persistent XMP metadata serialization options.
serializeOptions | serialize options |
|
inlinevirtual |
Specifies that document shall contain tag structure.
Specifies that document shall contain tag structure. See ISO 32000-1, section 14.8 "Tagged PDF"
|
inlinevirtual |
Sets the flag indicating the presence of structure elements that contain user properties attributes.
userProperties | the user properties flag |
|
inlinepackagevirtual |
Use this method to set the XMP Metadata.
xmpMetadata | The xmpMetadata to set. |
|
inlinevirtual |
Sets the XMP Metadata.
xmpMeta | the xmpMetadata to set |
|
inlinevirtual |
Sets the XMP Metadata.
xmpMeta | the xmpMetadata to set |
serializeOptions | serialization options |
|
inlinepackagevirtual |
Save destinations in a temporary storage for further copying.
destination | the iText.Kernel.Pdf.Navigation.PdfDestination to be updated itself. |
onPageAvailable | a destination consumer that will handle the copying when the destination still resolves, it gets the new destination as input |
onPageNotAvailable | a destination consumer that will handle the copying when the destination is not available, it gets the original destination as input |
|
inlinepackagevirtual |
Initializes the new instance of document's structure tree root iText.Kernel.Pdf.Tagging.PdfStructTreeRoot.
Initializes the new instance of document's structure tree root iText.Kernel.Pdf.Tagging.PdfStructTreeRoot. See ISO 32000-1, section 14.7.2 Structure Hierarchy.
str | dictionary to create structure tree root |
|
inlinepackagevirtual |
Update XMP metadata values from PdfDocumentInfo.
|
inlinepackagevirtual |
Updates XMP metadata.
Updates XMP metadata. Shall be overridden.
Reimplemented in iText.Pdfa.PdfADocument.
|
package |
Document catalog.
|
package |
flag determines whether to write unused objects to result document
|
package |
Document info.
|
package |
Document version.
|
package |
|
package |
Document trailed.
|
package |
|
package |
XMP Metadata for the document.