Class Page

Page class

Class representing page of PDF document.

public sealed class Page : IDisposable

Properties

NameDescription
Actions { get; }Gets collection of page properties.
Annotations { get; }Gets collection of page annotations. Annotations
ArtBox { get; set; }Gets or sets art box of the page.
Artifacts { get; }Gets collection of artifacts on the page.
Background { get; set; }Gets or sets the background color of the page.
BackgroundImage { get; set; }Gets or sets background image for page (for generator only, not filled in when reading document).
BleedBox { get; set; }Gets or sets bleed box of the page.
ColorType { get; }Sets color type of the pages based on information getting from operators SetColor, images and forms.
Contents { get; }Gets collection of operators in the content stream of the page. OperatorCollection
CropBox { get; set; }Gets or sets crop box of the page.
Duration { get; set; }Gets of set page display duration. This is time in seconds that page shall be displayed during presentation. Returns -1 if duration is not defined.
FieldsInTabOrder { get; }Gets list of Field object in Tab order on this page.
Footer { get; set; }Gets or sets page footer.
Group { get; set; }Gets or sets a group attributes class specifying the attributes of the page�s page group for use in the transparent imaging model.
Header { get; set; }Gets or sets page header.
IsAddParagraphsAfterLast { get; set; }Gets or sets the addition of paragraphs after the last paragraph of the page
Layers { get; set; }Gets or sets layers collection.
MediaBox { get; set; }Gets or sets media box of the page.
NoteLineStyle { get; set; }Gets or sets the line style for notes.(for generator only, not filled in when reading document)
Number { get; }Get number of the page.
PageInfo { get; set; }Gets or sets the page info (for generator only, not filled in when reading document).
Paragraphs { get; set; }Gets the paragraphs.
Rect { get; set; }Gets or sets rectangle of the page. For get: page crop box is returned if specified, otherwise page media box is returned. For set: page media box always set. Please note that this property don’t consider page rotation. To get page rectangle considering rotation please use ActualRect.
Resources { get; }Gets page resources. Resources object contains collections of images, forms and fonts. Resources
Rotate { get; set; }Gets or sets rotation of the page.
RotationMatrix { get; }Gets transofmation matrix for the page.
TabOrder { get; set; }Gets or sets tab order of the page. Possible values: Row, Column. Default, Manual
TocInfo { get; set; }Gets or sets table of contents info.
TrimBox { get; set; }Gets or sets trim box of the page.
UserUnit { get; set; }Gets or sets UserUnit value. A positive number giving the size of default user space units, in multiples of 1 ⁄ 72 inch. Default value is 1. Please set zero or negative value in order to clear this entry in page.
Watermark { get; set; }Gets or sets the watermark of the page.

Methods

NameDescription
Accept(AnnotationSelector)Accepts AnnotationSelector visitor object that provides functionality to work with annotations.
Accept(ImagePlacementAbsorber)Accepts ImagePlacementAbsorber visitor object that provides functionality to work with image placement objects.
Accept(TextAbsorber)Accepts TextAbsorber visitor object that provides functionality to work with text objects.
Accept(TextFragmentAbsorber)Accepts TextFragmentAbsorber visitor object that provides functionality to work with text objects.
AddGraphics(GraphicElementCollection, Rectangle)Adds graphics to the page. Works faster than adding elements one by one with AddOnPage method.
AddImage(Stream, Rectangle)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(string, Rectangle)Adds image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(string, Stream, Rectangle)Adds searchable image onto the page and locates it in the middle of specified rectangle saving image’s proportion.
AddImage(Stream, Rectangle, int, int, bool)Adds image on page and places it depend on image rectangle position.
AddStamp(Stamp)Put stamp into page. Stamp can be page number, image or simple text, e.g. some logo.
AsByteArray(Resolution)Converts current page as bitmap and than returns array of bytes.
AsXml()Converts current page as xml in utf8 encoding.
CalculateContentBBox()Calculates bbox value - rectangle containing contents without visible margins.
ConvertToPNGMemoryStream()Convert page to PNG for DSR, OMR, OCR image stream.
DeleteGraphics(GraphicElementCollection)Deletes graphics from the page. Works faster than deleting elements one by one with Remove method.
Dispose()Frees up memory
Flatten()Removes all fields located on the page and place their values instead.
FreeMemory()Clears cached data
GetNotifications()Returns notifications about inside operations with page content. (Only notifications about paragraph events in text adding scenarios are supported now.)
GetPageRect(bool)Returns rectangle of the page according to its CropBox (or MediaBox if CropBox null).
HasVectorGraphics()Detect of the presence of vector graphics, if it is present on the page.
IsBlank(double)Gets the flag whether page is blank or not.
MakeGrayscale()Converts the page to grayscale.
SendTo(PageDevice, Stream)Sends page to process with given page device.
SendTo(PageDevice, string)Sends page to process with given page device.
SetPageSize(double, double)Sets page size for page.
TrySaveVectorGraphics(string)Tries to save vector graphics if they are present on the page. The save format is SVG.
static IntToRotation(int)Translates integer value into corresponding rotation enumeration member.
static RotationToInt(Rotation)Translates rotation enumeration member into integer value.

Events

NameDescription
event OnBeforePageGenerateEvent for customize header and footer.

Other Members

NameDescription
delegate BeforePageGenerateProcedure for customize header and footer.

See Also