iText 7 7.1.8 API
|
Public Member Functions |
|
virtual Rectangle | GetPageSize () |
Gets page size, defined by media box object. More... |
|
virtual Rectangle | GetPageSizeWithRotation () |
Gets page size, considering page rotation. More... |
|
virtual int | GetRotation () |
Gets the number of degrees by which the page shall be rotated clockwise when displayed or printed. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetRotation (int degAngle) |
Sets the page rotation. More... |
|
virtual PdfStream | GetContentStream (int index) |
Gets the content stream at specified 0-based index in the Contents object PdfArrayThe situation when Contents object is a PdfStream is treated like a one element array. More... |
|
virtual int | GetContentStreamCount () |
Gets the size of Contents object PdfArrayThe situation when Contents object is a PdfStream is treated like a one element array. More... |
|
virtual PdfStream | GetFirstContentStream () |
Returns the Contents object if it is PdfStream , or first stream in the array if it is PdfArray More... |
|
virtual PdfStream | GetLastContentStream () |
Returns the Contents object if it is PdfStream , or last stream in the array if it is PdfArray More... |
|
virtual PdfStream | NewContentStreamBefore () |
Creates new PdfStream object and puts it at the beginning of Contents array (if Contents object is PdfStream it will be replaced with one-element array). More... |
|
virtual PdfStream | NewContentStreamAfter () |
Creates new PdfStream object and puts it at the end of Contents array (if Contents object is PdfStream it will be replaced with one-element array). More... |
|
virtual PdfResources | GetResources () |
Gets the PdfResources wrapper object for this page resources. If page doesn't have resource object, then it will be inherited from page's parents. If neither parents nor page has the resource object, then the new one is created and added to page dictionary. NOTE: If you'll try to modify the inherited resources, then the new resources object will be created, so you won't change the parent's resources. This new object under the wrapper will be added to page dictionary on Flush() , or you can add it manually with this line, if needed: getPdfObject().put(PdfName.Resources, getResources().getPdfObject()); More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetResources (PdfResources pdfResources) |
Sets PdfResources object. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetXmpMetadata (byte[] xmpMetadata) |
Sets the XMP Metadata. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetXmpMetadata (XMPMeta xmpMeta, SerializeOptions serializeOptions) |
Serializes XMP Metadata to byte array and sets it. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetXmpMetadata (XMPMeta xmpMeta) |
Serializes XMP Metadata to byte array and sets it. More... |
|
virtual PdfStream | GetXmpMetadata () |
Gets the XMP Metadata object. More... |
|
virtual iText.Kernel.Pdf.PdfPage | CopyTo (PdfDocument toDocument) |
Copies page to the specified document. More... |
|
virtual iText.Kernel.Pdf.PdfPage | CopyTo (PdfDocument toDocument, IPdfPageExtraCopier copier) |
Copies page to the specified document. More... |
|
virtual PdfFormXObject | CopyAsFormXObject (PdfDocument toDocument) |
Copies page as FormXObject to the specified document. More... |
|
virtual PdfDocument | GetDocument () |
Gets the PdfDocument that owns that page, or null if such document isn't exist. More... |
|
override void | Flush () |
Flushes page dictionary, its content streams, annotations and thumb image. More... |
|
virtual void | Flush (bool flushResourcesContentStreams) |
Flushes page dictionary, its content streams, annotations and thumb image. More... |
|
virtual Rectangle | GetMediaBox () |
Gets iText.Kernel.Geom.Rectangle object specified by page's Media Box, that defines the boundaries of the physical medium on which the page shall be displayed or printed More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetMediaBox (Rectangle rectangle) |
Sets the Media Box object, that defines the boundaries of the physical medium on which the page shall be displayed or printed. More... |
|
virtual Rectangle | GetCropBox () |
Gets the iText.Kernel.Geom.Rectangle specified by page's CropBox, that defines the visible region of default user space. When the page is displayed or printed, its contents shall be clipped (cropped) to this rectangle and then shall be imposed on the output medium in some implementation-defined manner. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetCropBox (Rectangle rectangle) |
Sets the CropBox object, that defines the visible region of default user space. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetBleedBox (Rectangle rectangle) |
Sets the BleedBox object, that defines the region to which the contents of the page shall be clipped when output in a production environment. More... |
|
virtual Rectangle | GetBleedBox () |
Gets the iText.Kernel.Geom.Rectangle object specified by page's BleedBox, that define the region to which the contents of the page shall be clipped when output in a production environment. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetArtBox (Rectangle rectangle) |
Sets the ArtBox object, that define the extent of the page’s meaningful content (including potential white space) as intended by the page’s creator. More... |
|
virtual Rectangle | GetArtBox () |
Gets the iText.Kernel.Geom.Rectangle object specified by page's ArtBox, that define the extent of the page’s meaningful content (including potential white space) as intended by the page’s creator. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetTrimBox (Rectangle rectangle) |
Sets the TrimBox object, that define the intended dimensions of the finished page after trimming. More... |
|
virtual Rectangle | GetTrimBox () |
Gets the iText.Kernel.Geom.Rectangle object specified by page's TrimBox object, that define the intended dimensions of the finished page after trimming. More... |
|
virtual byte[] | GetContentBytes () |
Get decoded bytes for the whole page content. More... |
|
virtual byte[] | GetStreamBytes (int index) |
Gets decoded bytes of a certain stream of a page content. More... |
|
virtual int | GetNextMcid () |
Calculates and returns next available MCID reference. More... |
|
virtual int | GetStructParentIndex () |
Gets the key of the page’s entry in the structural parent tree. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetAdditionalAction (PdfName key, PdfAction action) |
Helper method to add an additional action to this page. More... |
|
virtual IList< PdfAnnotation > | GetAnnotations () |
Gets array of annotation dictionaries that shall contain indirect references to all annotations associated with the page. More... |
|
virtual bool | ContainsAnnotation (PdfAnnotation annotation) |
Checks if page contains the specified annotation. More... |
|
virtual iText.Kernel.Pdf.PdfPage | AddAnnotation (PdfAnnotation annotation) |
Adds specified annotation to the end of annotations array and tagged it. More... |
|
virtual iText.Kernel.Pdf.PdfPage | AddAnnotation (int index, PdfAnnotation annotation, bool tagAnnotation) |
Adds specified iText.Kernel.Pdf.Annot.PdfAnnotation to specified index in annotations array with or without autotagging. May be used in chain. More... |
|
virtual iText.Kernel.Pdf.PdfPage | RemoveAnnotation (PdfAnnotation annotation) |
Removes an annotation from the page. More... |
|
virtual int | GetAnnotsSize () |
Gets the number of iText.Kernel.Pdf.Annot.PdfAnnotation associated with this page. More... |
|
virtual IList< PdfOutline > | GetOutlines (bool updateOutlines) |
This method gets outlines of a current page More... |
|
virtual bool | IsIgnorePageRotationForContent () |
virtual iText.Kernel.Pdf.PdfPage | SetIgnorePageRotationForContent (bool ignorePageRotationForContent) |
If true - defines that in case the page has a rotation, then new content will be automatically rotated in the opposite direction. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetPageLabel (PageLabelNumberingStyle? numberingStyle, String labelPrefix) |
This method adds or replaces a page label. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetPageLabel (PageLabelNumberingStyle? numberingStyle, String labelPrefix, int firstPage) |
This method adds or replaces a page label. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetTabOrder (PdfName tabOrder) |
Sets a name specifying the tab order that shall be used for annotations on the page. More... |
|
virtual PdfName | GetTabOrder () |
Gets a name specifying the tab order that shall be used for annotations on the page. More... |
|
virtual iText.Kernel.Pdf.PdfPage | SetThumbnailImage (PdfImageXObject thumb) |
Sets a stream object that shall define the page’s thumbnail image. More... |
|
virtual PdfImageXObject | GetThumbnailImage () |
Sets a stream object that shall define the page’s thumbnail image. More... |
|
virtual iText.Kernel.Pdf.PdfPage | AddOutputIntent (PdfOutputIntent outputIntent) |
Adds PdfOutputIntent that shall specify the colour characteristics of output devices on which the page might be rendered. More... |
|
virtual iText.Kernel.Pdf.PdfPage | Put (PdfName key, PdfObject value) |
Helper method that associate specified value with specified key in the underlined PdfDictionaryMay be used in chain. More... |
|
virtual bool | IsPageRotationInverseMatrixWritten () |
This flag is meaningful for the case, when page rotation is applied and ignorePageRotationForContent is set to true. More... |
|
virtual void | SetPageRotationInverseMatrixWritten () |
NOTE: For internal usage! Use this method only if you know what you are doing. More... |
|
virtual void | AddAssociatedFile (String description, PdfFileSpec fs) |
Adds file associated with PDF page and identifies the relationship between them. More... |
|
virtual void | AddAssociatedFile (PdfFileSpec fs) |
virtual PdfArray | GetAssociatedFiles (bool create) |
Returns files associated with PDF page. More... |
|
Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
virtual T | GetPdfObject () |
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document, PdfIndirectReference reference) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | SetModified () |
virtual bool | IsFlushed () |
|
inlinevirtual |
Adds specified iText.Kernel.Pdf.Annot.PdfAnnotation to specified index in annotations array with or without autotagging. May be used in chain.
index | the index at which specified annotation will be added. If -1 then annotation will be added to the end of array. |
annotation | the iText.Kernel.Pdf.Annot.PdfAnnotation to add. |
tagAnnotation | if true the added annotation will be autotagged. |
(see iText.Kernel.Pdf.Tagutils.TagStructureContext.GetAutoTaggingPointer() )
|
inlinevirtual |
Adds specified annotation to the end of annotations array and tagged it.
Adds specified annotation to the end of annotations array and tagged it. May be used in chain.
annotation | the iText.Kernel.Pdf.Annot.PdfAnnotation to add. |
|
inlinevirtual |
Adds file associated with PDF page and identifies the relationship between them.
Adds file associated with PDF page and identifies the relationship between them.
Associated files may be used in Pdf/A-3 and Pdf 2.0 documents. The method adds file to array value of the AF key in the page dictionary.
For associated files their associated file specification dictionaries shall include the AFRelationship key
fs | file specification dictionary of associated file |
|
inlinevirtual |
Adds file associated with PDF page and identifies the relationship between them.
Adds file associated with PDF page and identifies the relationship between them.
Associated files may be used in Pdf/A-3 and Pdf 2.0 documents. The method adds file to array value of the AF key in the page dictionary. If description is provided, it also will add file description to catalog Names tree.
For associated files their associated file specification dictionaries shall include the AFRelationship key
description | the file description |
fs | file specification dictionary of associated file |
|
inlinevirtual |
Adds PdfOutputIntent that shall specify the colour characteristics of output devices on which the page might be rendered.
outputIntent |
PdfOutputIntent to add.
|
inlinevirtual |
Checks if page contains the specified annotation.
annotation | the iText.Kernel.Pdf.Annot.PdfAnnotation to check. |
true
if page contains specified annotation and false
otherwise.
|
inlinevirtual |
Copies page as FormXObject to the specified document.
toDocument | a document to copy to. |
System.IO.IOException |
|
inlinevirtual |
Copies page to the specified document.
Copies page to the specified document.
NOTE: Works only for pages from the document opened in reading mode, otherwise an exception is thrown.
toDocument | a document to copy page to. |
|
inlinevirtual |
Copies page to the specified document.
Copies page to the specified document.
NOTE: Works only for pages from the document opened in reading mode, otherwise an exception is thrown.
toDocument | a document to copy page 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 |
Flushes page dictionary, its content streams, annotations and thumb image.
Flushes page dictionary, its content streams, annotations and thumb image.
If the page belongs to the document which is tagged, page flushing also triggers flushing of the tags, which are considered to belong to the page. The logic that defines if the given tag (structure element) belongs to the page is the following: if all the marked content references (dictionary or number references), that are the descendants of the given structure element, belong to the current page - the tag is considered to belong to the page. If tag has descendants from several pages - it is flushed, if all other pages except the current one are flushed.
Reimplemented from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.
|
inlinevirtual |
Flushes page dictionary, its content streams, annotations and thumb image.
Flushes page dictionary, its content streams, annotations and thumb image. If
is true, all content streams that are rendered on this page (like FormXObjects, annotation appearance streams, patterns) and also all images associated with this page will also be flushed.
For notes about tag structure flushing see PdfPage#flush() method
If
is used, flushing will be applied only if
is true.
Be careful with handling document in which some of the pages are flushed. Keep in mind that flushed objects are finalized and are completely written to the output stream. This frees their memory but makes it impossible to modify or read data from them. Whenever there is an attempt to modify or to fetch flushed object inner contents an exception will be thrown. Flushing is only possible for objects in the writing and stamping modes, also its possible to flush modified objects in append mode.
flushResourcesContentStreams | if true all content streams that are rendered on this page (like form xObjects, annotation appearance streams, patterns) and also all images associated with this page will be flushed. |
|
inlinevirtual |
Gets array of annotation dictionaries that shall contain indirect references to all annotations associated with the page.
|
inlinevirtual |
Gets the number of iText.Kernel.Pdf.Annot.PdfAnnotation associated with this page.
int
number of iText.Kernel.Pdf.Annot.PdfAnnotation associated with this page.
|
inlinevirtual |
Gets the iText.Kernel.Geom.Rectangle object specified by page's ArtBox, that define the extent of the page’s meaningful content (including potential white space) as intended by the page’s creator.
|
inlinevirtual |
Returns files associated with PDF page.
create | iText will create AF array if it doesn't exist and create value is true |
|
inlinevirtual |
Gets the iText.Kernel.Geom.Rectangle object specified by page's BleedBox, that define the region to which the contents of the page shall be clipped when output in a production environment.
|
inlinevirtual |
Get decoded bytes for the whole page content.
iText.Kernel.PdfException | in case of any System.IO.IOException |
|
inlinevirtual |
Gets the content stream at specified 0-based index in the Contents object PdfArrayThe situation when Contents object is a PdfStream is treated like a one element array.
index | the int index of returned PdfStream |
PdfStream object at specified index; will return null in case page dictionary doesn't adhere to the specification, meaning that the document is an invalid PDF.
System.IndexOutOfRangeException | if the index is out of range |
|
inlinevirtual |
|
inlinevirtual |
Gets the iText.Kernel.Geom.Rectangle specified by page's CropBox, that defines the visible region of default user space. When the page is displayed or printed, its contents shall be clipped (cropped) to this rectangle and then shall be imposed on the output medium in some implementation-defined manner.
|
inlinevirtual |
Gets the PdfDocument that owns that page, or null
if such document isn't exist.
PdfDocument that owns that page, or null
if such document isn't exist.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Gets iText.Kernel.Geom.Rectangle object specified by page's Media Box, that defines the boundaries of the physical medium on which the page shall be displayed or printed
iText.Kernel.Geom.Rectangle object specified by page Media Box, expressed in default user space units.
iText.Kernel.PdfException | in case of any error while reading MediaBox object. |
|
inlinevirtual |
Calculates and returns next available MCID reference.
iText.Kernel.PdfException | in case of not tagged document. |
|
inlinevirtual |
This method gets outlines of a current page
|
inlinevirtual |
Gets page size, defined by media box object.
Gets page size, defined by media box object. This method doesn't take page rotation into account.
iText.Kernel.Geom.Rectangle that specify page size.
|
inlinevirtual |
Gets page size, considering page rotation.
iText.Kernel.Geom.Rectangle that specify size of rotated page.
|
inlinevirtual |
Gets the PdfResources wrapper object for this page resources. If page doesn't have resource object, then it will be inherited from page's parents. If neither parents nor page has the resource object, then the new one is created and added to page dictionary.
NOTE: If you'll try to modify the inherited resources, then the new resources object will be created, so you won't change the parent's resources. This new object under the wrapper will be added to page dictionary on Flush() , or you can add it manually with this line, if needed:
getPdfObject().put(PdfName.Resources, getResources().getPdfObject());
PdfResources wrapper of the page.
|
inlinevirtual |
Gets the number of degrees by which the page shall be rotated clockwise when displayed or printed.
Gets the number of degrees by which the page shall be rotated clockwise when displayed or printed. Shall be a multiple of 90.
int
number of degrees. Default value: 0
|
inlinevirtual |
Gets decoded bytes of a certain stream of a page content.
index | index of stream inside Content. |
iText.Kernel.PdfException | in case of any System.IO.IOException |
|
inlinevirtual |
Gets the key of the page’s entry in the structural parent tree.
|
inlinevirtual |
Gets a name specifying the tab order that shall be used for annotations on the page.
Gets a name specifying the tab order that shall be used for annotations on the page. The possible values are PdfName.R (row order), PdfName.C (column order), and PdfName.S (structure order). Beginning with PDF 2.0, the possible values also include PdfName.A (annotations array order) and PdfName.W (widget order). See ISO 32000 12.5, "Annotations" for details.
|
inlinevirtual |
Sets a stream object that shall define the page’s thumbnail image.
Sets a stream object that shall define the page’s thumbnail image. Thumbnail images represent the contents of its pages in miniature form
|
inlinevirtual |
Gets the iText.Kernel.Geom.Rectangle object specified by page's TrimBox object, that define the intended dimensions of the finished page after trimming.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
This flag is meaningful for the case, when page rotation is applied and ignorePageRotationForContent is set to true.
This flag is meaningful for the case, when page rotation is applied and ignorePageRotationForContent is set to true. NOTE: It is needed for the internal usage.
This flag defines if inverse matrix (which rotates content into the opposite direction from page rotation direction in order to give the impression of the not rotated text) is already applied to the page content stream. See SetIgnorePageRotationForContent(bool)
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Helper method that associate specified value with specified key in the underlined PdfDictionaryMay be used in chain.
key | the PdfName key with which the specified value is to be associated. |
value | the PdfObject value to be associated with the specified key. |
|
inlinevirtual |
Removes an annotation from the page.
Removes an annotation from the page.
NOTE: If document is tagged, PdfDocument's PdfTagStructure instance will point at annotation tag parent after method call.
annotation | an annotation to be removed. |
|
inlinevirtual |
Helper method to add an additional action to this page.
Helper method to add an additional action to this page. May be used in chain.
key | a PdfName specifying the name of an additional action |
action | the iText.Kernel.Pdf.Action.PdfAction to add as an additional action |
|
inlinevirtual |
Sets the ArtBox object, that define the extent of the page’s meaningful content (including potential white space) as intended by the page’s creator.
rectangle | the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units. |
|
inlinevirtual |
Sets the BleedBox object, that defines the region to which the contents of the page shall be clipped when output in a production environment.
rectangle | the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units. |
|
inlinevirtual |
Sets the CropBox object, that defines the visible region of default user space.
Sets the CropBox object, that defines the visible region of default user space. When the page is displayed or printed, its contents shall be clipped (cropped) to this rectangle and then shall be imposed on the output medium in some implementation-defined manner.
rectangle | the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units. |
|
inlinevirtual |
If true - defines that in case the page has a rotation, then new content will be automatically rotated in the opposite direction.
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 - false
ignorePageRotationForContent | - true to ignore rotation of the new content on the rotated page. |
|
inlinevirtual |
Sets the Media Box object, that defines the boundaries of the physical medium on which the page shall be displayed or printed.
rectangle | the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units. |
|
inlinevirtual |
This method adds or replaces a page label.
numberingStyle | The numbering style that shall be used for the numeric portion of each page label. May be NULL |
labelPrefix | The label prefix for page labels in this range. May be NULL |
|
inlinevirtual |
This method adds or replaces a page label.
numberingStyle | The numbering style that shall be used for the numeric portion of each page label. May be NULL |
labelPrefix | The label prefix for page labels in this range. May be NULL |
firstPage | The value of the numeric portion for the first page label in the range. Must be greater or equal 1. |
|
inlinevirtual |
NOTE: For internal usage! Use this method only if you know what you are doing.
NOTE: For internal usage! Use this method only if you know what you are doing.
This method is called when inverse matrix (which rotates content into the opposite direction from page rotation direction in order to give the impression of the not rotated text) is applied to the page content stream. See SetIgnorePageRotationForContent(bool)
|
inlinevirtual |
Sets PdfResources object.
pdfResources |
PdfResources to set.
|
inlinevirtual |
Sets the page rotation.
degAngle | the int number of degrees by which the page shall be rotated clockwise when displayed or printed. Shall be a multiple of 90. |
|
inlinevirtual |
Sets a name specifying the tab order that shall be used for annotations on the page.
Sets a name specifying the tab order that shall be used for annotations on the page. The possible values are PdfName.R (row order), PdfName.C (column order), and PdfName.S (structure order). Beginning with PDF 2.0, the possible values also include PdfName.A (annotations array order) and PdfName.W (widget order). See ISO 32000 12.5, "Annotations" for details.
tabOrder | a PdfName specifying the annotations tab order. See method description for the allowed values. |
|
inlinevirtual |
Sets a stream object that shall define the page’s thumbnail image.
Sets a stream object that shall define the page’s thumbnail image. Thumbnail images represent the contents of its pages in miniature form
thumb | the thumbnail image |
|
inlinevirtual |
Sets the TrimBox object, that define the intended dimensions of the finished page after trimming.
rectangle | the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units. |
|
inlinevirtual |
|
inlinevirtual |
Serializes XMP Metadata to byte array and sets it.
Serializes XMP Metadata to byte array and sets it. Uses padding equals to 2000.
xmpMeta | the iText.Kernel.XMP.XMPMeta object to set. |
iText.Kernel.XMP.XMPException | in case of XMP Metadata serialization error. |
System.IO.IOException | in case of writing error. |
|
inlinevirtual |
Serializes XMP Metadata to byte array and sets it.
xmpMeta | the iText.Kernel.XMP.XMPMeta object to set. |
serializeOptions | the iText.Kernel.XMP.Options.SerializeOptions used while serialization. |
iText.Kernel.XMP.XMPException | in case of XMP Metadata serialization error. |
System.IO.IOException | in case of writing error. |