Page class

Class representing page of PDF document.

public sealed class Page : IDisposable


Name Description
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).
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. Returs -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)
Number { get; } Get number of the page.
PageInfo { get; set; } Gets or sets the page info (for generator only, not filled in when reading file).
Paragraphs { get; set; } Gets the paragraphs.
Rect { get; set; } Gets or sets rectangle of the page. Page crop box is returned if specified, otherwise page media box is returned. 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.


Name Description
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.
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.
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.
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.
static IntToRotation(int) Translates integer value into corresponding rotation enumeration member.
static RotationToInt(Rotation) Translates rotation enumeration member into integer value.

Other Members

Name Description
delegate BeforePageGenerate Procedure for customize header and footer.

See Also