iText 7 7.1.9 API
iText.Kernel.Pdf.PdfPage Class Reference
Inheritance diagram for iText.Kernel.Pdf.PdfPage:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >

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 PdfArray. More...
 
virtual int  GetContentStreamCount ()
  Gets the size of Contents object PdfArray. 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. 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. 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. 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 PdfDictionary. 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 ()
 

Member Function Documentation

◆ AddAnnotation() [1/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.AddAnnotation ( int  index,
PdfAnnotation  annotation,
bool  tagAnnotation 
)
inlinevirtual

Adds specified iText.Kernel.Pdf.Annot.PdfAnnotation to specified index in annotations array with or without autotagging.

Adds specified iText.Kernel.Pdf.Annot.PdfAnnotation to specified index in annotations array with or without autotagging. May be used in chain.

Parameters
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() )

Returns
this PdfPage instance.

◆ AddAnnotation() [2/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.AddAnnotation ( PdfAnnotation  annotation )
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.

Parameters
annotation the iText.Kernel.Pdf.Annot.PdfAnnotation to add.
Returns
this PdfPage instance.

◆ AddAssociatedFile() [1/2]

virtual void iText.Kernel.Pdf.PdfPage.AddAssociatedFile ( PdfFileSpec  fs )
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

Parameters
fs file specification dictionary of associated file

◆ AddAssociatedFile() [2/2]

virtual void iText.Kernel.Pdf.PdfPage.AddAssociatedFile ( String  description,
PdfFileSpec  fs 
)
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

Parameters
description the file description
fs file specification dictionary of associated file

◆ AddOutputIntent()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.AddOutputIntent ( PdfOutputIntent  outputIntent )
inlinevirtual

Adds PdfOutputIntent that shall specify the colour characteristics of output devices on which the page might be rendered.

Parameters
outputIntent

PdfOutputIntent to add.

Returns
this PdfPage object
See also
PdfOutputIntent

◆ ContainsAnnotation()

virtual bool iText.Kernel.Pdf.PdfPage.ContainsAnnotation ( PdfAnnotation  annotation )
inlinevirtual

Checks if page contains the specified annotation.

Parameters
annotation the iText.Kernel.Pdf.Annot.PdfAnnotation to check.
Returns

true if page contains specified annotation and false otherwise.

◆ CopyAsFormXObject()

virtual PdfFormXObject iText.Kernel.Pdf.PdfPage.CopyAsFormXObject ( PdfDocument  toDocument )
inlinevirtual

Copies page as FormXObject to the specified document.

Parameters
toDocument a document to copy to.
Returns
copied iText.Kernel.Pdf.Xobject.PdfFormXObject object.

◆ CopyTo() [1/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.CopyTo ( PdfDocument  toDocument )
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.

Parameters
toDocument a document to copy page to.
Returns
copied PdfPage.

◆ CopyTo() [2/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.CopyTo ( PdfDocument  toDocument,
IPdfPageExtraCopier  copier 
)
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.

Parameters
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.
Returns
copied PdfPage.

◆ Flush() [1/2]

override void iText.Kernel.Pdf.PdfPage.Flush ( )
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 >.

◆ Flush() [2/2]

virtual void iText.Kernel.Pdf.PdfPage.Flush ( bool  flushResourcesContentStreams )
inlinevirtual

Flushes page dictionary, its content streams, annotations and thumb image.

Flushes page dictionary, its content streams, annotations and thumb image. If flushResourcesContentStreams 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 PdfADocument is used, flushing will be applied only if flushResourcesContentStreams 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.

Parameters
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.

◆ GetAnnotations()

virtual IList<PdfAnnotation> iText.Kernel.Pdf.PdfPage.GetAnnotations ( )
inlinevirtual

Gets array of annotation dictionaries that shall contain indirect references to all annotations associated with the page.

Returns
the System.Collections.IList<E> < iText.Kernel.Pdf.Annot.PdfAnnotation > containing all page's annotations.

◆ GetAnnotsSize()

virtual int iText.Kernel.Pdf.PdfPage.GetAnnotsSize ( )
inlinevirtual

Gets the number of iText.Kernel.Pdf.Annot.PdfAnnotation associated with this page.

Returns
the int number of iText.Kernel.Pdf.Annot.PdfAnnotation associated with this page.

◆ GetArtBox()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetArtBox ( )
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.

Returns
the iText.Kernel.Geom.Rectangle object specified by page's ArtBox, expressed in default user space units. CropBox by default.

◆ GetAssociatedFiles()

virtual PdfArray iText.Kernel.Pdf.PdfPage.GetAssociatedFiles ( bool  create )
inlinevirtual

Returns files associated with PDF page.

Parameters
create iText will create AF array if it doesn't exist and create value is true
Returns
associated files array.

◆ GetBleedBox()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetBleedBox ( )
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.

Returns
the iText.Kernel.Geom.Rectangle object specified by page's BleedBox, expressed in default user space units. CropBox by default.

◆ GetContentBytes()

virtual byte [] iText.Kernel.Pdf.PdfPage.GetContentBytes ( )
inlinevirtual

Get decoded bytes for the whole page content.

Returns
byte array.

◆ GetContentStream()

virtual PdfStream iText.Kernel.Pdf.PdfPage.GetContentStream ( int  index )
inlinevirtual

Gets the content stream at specified 0-based index in the Contents object PdfArray.

Gets the content stream at specified 0-based index in the Contents object PdfArray. The situation when Contents object is a PdfStream is treated like a one element array.

Parameters
index the int index of returned PdfStream.
Returns

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.

◆ GetContentStreamCount()

virtual int iText.Kernel.Pdf.PdfPage.GetContentStreamCount ( )
inlinevirtual

Gets the size of Contents object PdfArray.

Gets the size of Contents object PdfArray. The situation when Contents object is a PdfStream is treated like a one element array.

Returns
the int size of Contents object, or 1 if Contents object is a PdfStream.

◆ GetCropBox()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetCropBox ( )
inlinevirtual

Gets the iText.Kernel.Geom.Rectangle specified by page's CropBox, that defines the visible region of default user space.

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.

Returns
the iText.Kernel.Geom.Rectangle object specified by pages's CropBox, expressed in default user space units. MediaBox by default.

◆ GetDocument()

virtual PdfDocument iText.Kernel.Pdf.PdfPage.GetDocument ( )
inlinevirtual

Gets the PdfDocument that owns that page, or null if such document isn't exist.

Returns

PdfDocument that owns that page, or null if such document isn't exist.

◆ GetFirstContentStream()

virtual PdfStream iText.Kernel.Pdf.PdfPage.GetFirstContentStream ( )
inlinevirtual

Returns the Contents object if it is PdfStream , or first stream in the array if it is PdfArray.

Returns
first PdfStream in Contents object, or null if Contents is empty.

◆ GetLastContentStream()

virtual PdfStream iText.Kernel.Pdf.PdfPage.GetLastContentStream ( )
inlinevirtual

Returns the Contents object if it is PdfStream , or last stream in the array if it is PdfArray.

Returns
first PdfStream in Contents object, or null if Contents is empty.

◆ GetMediaBox()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetMediaBox ( )
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

Returns

iText.Kernel.Geom.Rectangle object specified by page Media Box, expressed in default user space units.

◆ GetNextMcid()

virtual int iText.Kernel.Pdf.PdfPage.GetNextMcid ( )
inlinevirtual

Calculates and returns next available MCID reference.

Returns
calculated MCID reference.

◆ GetOutlines()

virtual IList<PdfOutline> iText.Kernel.Pdf.PdfPage.GetOutlines ( bool  updateOutlines )
inlinevirtual

This method gets outlines of a current page

Returns
return all outlines of a current page

◆ GetPageSize()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetPageSize ( )
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.

Returns

iText.Kernel.Geom.Rectangle that specify page size.

◆ GetPageSizeWithRotation()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetPageSizeWithRotation ( )
inlinevirtual

Gets page size, considering page rotation.

Returns

iText.Kernel.Geom.Rectangle that specify size of rotated page.

◆ GetResources()

virtual PdfResources iText.Kernel.Pdf.PdfPage.GetResources ( )
inlinevirtual

Gets the PdfResources wrapper object for this page resources.

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());

Returns

PdfResources wrapper of the page.

◆ GetRotation()

virtual int iText.Kernel.Pdf.PdfPage.GetRotation ( )
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.

Returns

int number of degrees. Default value: 0

◆ GetStreamBytes()

virtual byte [] iText.Kernel.Pdf.PdfPage.GetStreamBytes ( int  index )
inlinevirtual

Gets decoded bytes of a certain stream of a page content.

Parameters
index index of stream inside Content.
Returns
byte array.

◆ GetStructParentIndex()

virtual int iText.Kernel.Pdf.PdfPage.GetStructParentIndex ( )
inlinevirtual

Gets the key of the page’s entry in the structural parent tree.

Returns
the key of the page’s entry in the structural parent tree. If page has no entry in the structural parent tree, returned value is -1.

◆ GetTabOrder()

virtual PdfName iText.Kernel.Pdf.PdfPage.GetTabOrder ( )
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.

Returns
a PdfName specifying the annotations tab order or null if tab order is not defined.

◆ GetThumbnailImage()

virtual PdfImageXObject iText.Kernel.Pdf.PdfPage.GetThumbnailImage ( )
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

Returns
the thumbnail image, or null if it is not present

◆ GetTrimBox()

virtual Rectangle iText.Kernel.Pdf.PdfPage.GetTrimBox ( )
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.

Returns
the iText.Kernel.Geom.Rectangle object specified by page's TrimBox, expressed in default user space units. CropBox by default.

◆ GetXmpMetadata()

virtual PdfStream iText.Kernel.Pdf.PdfPage.GetXmpMetadata ( )
inlinevirtual

Gets the XMP Metadata object.

Returns

PdfStream object, that represent XMP Metadata.

◆ IsIgnorePageRotationForContent()

virtual bool iText.Kernel.Pdf.PdfPage.IsIgnorePageRotationForContent ( )
inlinevirtual
Returns
true - if 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.

◆ IsPageRotationInverseMatrixWritten()

virtual bool iText.Kernel.Pdf.PdfPage.IsPageRotationInverseMatrixWritten ( )
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)

Returns
true, if inverse matrix is already applied, false otherwise.

◆ NewContentStreamAfter()

virtual PdfStream iText.Kernel.Pdf.PdfPage.NewContentStreamAfter ( )
inlinevirtual

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).

Returns
Created PdfStream object.

◆ NewContentStreamBefore()

virtual PdfStream iText.Kernel.Pdf.PdfPage.NewContentStreamBefore ( )
inlinevirtual

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).

Returns
Created PdfStream object.

◆ Put()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.Put ( PdfName  key,
PdfObject  value 
)
inlinevirtual

Helper method that associate specified value with specified key in the underlined PdfDictionary.

Helper method that associate specified value with specified key in the underlined PdfDictionary. May be used in chain.

Parameters
key the PdfName key with which the specified value is to be associated.
value the PdfObject value to be associated with the specified key.
Returns
this PdfPage object.

◆ RemoveAnnotation()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.RemoveAnnotation ( PdfAnnotation  annotation )
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.

Parameters
annotation an annotation to be removed.
Returns
this PdfPage instance.

◆ SetAdditionalAction()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetAdditionalAction ( PdfName  key,
PdfAction  action 
)
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.

Parameters
key a PdfName specifying the name of an additional action
action the iText.Kernel.Pdf.Action.PdfAction to add as an additional action
Returns
this PdfPage instance.

◆ SetArtBox()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetArtBox ( Rectangle  rectangle )
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.

Parameters
rectangle the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units.
Returns
this PdfPage instance.

◆ SetBleedBox()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetBleedBox ( Rectangle  rectangle )
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.

Parameters
rectangle the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units.
Returns
this PdfPage instance.

◆ SetCropBox()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetCropBox ( Rectangle  rectangle )
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.

Parameters
rectangle the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units.
Returns
this PdfPage instance.

◆ SetIgnorePageRotationForContent()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetIgnorePageRotationForContent ( bool  ignorePageRotationForContent )
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.

Parameters
ignorePageRotationForContent - true to ignore rotation of the new content on the rotated page.

◆ SetMediaBox()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetMediaBox ( Rectangle  rectangle )
inlinevirtual

Sets the Media Box object, that defines the boundaries of the physical medium on which the page shall be displayed or printed.

Parameters
rectangle the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units.
Returns
this PdfPage instance.

◆ SetPageLabel() [1/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetPageLabel ( PageLabelNumberingStyle numberingStyle,
String  labelPrefix 
)
inlinevirtual

This method adds or replaces a page label.

Parameters
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
Returns
this PdfPage instance.

◆ SetPageLabel() [2/2]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetPageLabel ( PageLabelNumberingStyle numberingStyle,
String  labelPrefix,
int  firstPage 
)
inlinevirtual

This method adds or replaces a page label.

Parameters
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.
Returns
this PdfPage instance.

◆ SetPageRotationInverseMatrixWritten()

virtual void iText.Kernel.Pdf.PdfPage.SetPageRotationInverseMatrixWritten ( )
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)

◆ SetResources()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetResources ( PdfResources  pdfResources )
inlinevirtual

Sets PdfResources object.

Parameters
pdfResources

PdfResources to set.

Returns
this PdfPage instance.

◆ SetRotation()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetRotation ( int  degAngle )
inlinevirtual

Sets the page rotation.

Parameters
degAngle the int number of degrees by which the page shall be rotated clockwise when displayed or printed. Shall be a multiple of 90.
Returns
this PdfPage instance.

◆ SetTabOrder()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetTabOrder ( PdfName  tabOrder )
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.

Parameters
tabOrder a PdfName specifying the annotations tab order. See method description for the allowed values.
Returns
this PdfPage instance.

◆ SetThumbnailImage()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetThumbnailImage ( PdfImageXObject  thumb )
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

Parameters
thumb the thumbnail image
Returns
this PdfPage object

◆ SetTrimBox()

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetTrimBox ( Rectangle  rectangle )
inlinevirtual

Sets the TrimBox object, that define the intended dimensions of the finished page after trimming.

Parameters
rectangle the iText.Kernel.Geom.Rectangle object to set, expressed in default user space units.
Returns
this PdfPage instance.

◆ SetXmpMetadata() [1/3]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetXmpMetadata ( byte[]  xmpMetadata )
inlinevirtual

Sets the XMP Metadata.

Parameters
xmpMetadata the byte[] of XMP Metadata to set.
Returns
this PdfPage instance.

◆ SetXmpMetadata() [2/3]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetXmpMetadata ( XMPMeta  xmpMeta )
inlinevirtual

Serializes XMP Metadata to byte array and sets it.

Serializes XMP Metadata to byte array and sets it. Uses padding equals to 2000.

Parameters
xmpMeta the iText.Kernel.XMP.XMPMeta object to set.
Returns
this PdfPage instance.

◆ SetXmpMetadata() [3/3]

virtual iText.Kernel.Pdf.PdfPage iText.Kernel.Pdf.PdfPage.SetXmpMetadata ( XMPMeta  xmpMeta,
SerializeOptions  serializeOptions 
)
inlinevirtual

Serializes XMP Metadata to byte array and sets it.

Parameters
xmpMeta the iText.Kernel.XMP.XMPMeta object to set.
serializeOptions the iText.Kernel.XMP.Options.SerializeOptions used while serialization.
Returns
this PdfPage instance.