• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Page

Represents a single page in a PDF document. Wraps the internal page dictionary and provides a high-level API.

Inheritance
object
Page
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf
Assembly: DRIT.Pdf.dll
Syntax
public sealed class Page

Properties

Annotations

The annotation collection for this page (link annotations etc.).

Declaration
public AnnotationCollection Annotations { get; }
Property Value
Type Description
AnnotationCollection

ArtBox

The art box (spec §7.7.3.3). The extent of the page's meaningful content as intended by the page's creator. Defaults to CropBox if not set.

Declaration
public PdfRect ArtBox { get; set; }
Property Value
Type Description
PdfRect

AssociatedFiles

Associated files for this page (written to the page dictionary /AF entry). Files should come from EmbeddedFiles.

Declaration
public AssociatedFileCollection AssociatedFiles { get; }
Property Value
Type Description
AssociatedFileCollection

BleedBox

The bleed box (spec §7.7.3.3). The region to which page contents should be clipped when printed in a production environment. Defaults to CropBox if not set.

Declaration
public PdfRect BleedBox { get; set; }
Property Value
Type Description
PdfRect

Content

The drawing surface for this page.

Declaration
public PageContent Content { get; }
Property Value
Type Description
PageContent

CropBox

The crop box (visible region). Defaults to MediaBox if not set.

Declaration
public PdfRect CropBox { get; set; }
Property Value
Type Description
PdfRect

Height

Height of the media box.

Declaration
public double Height { get; }
Property Value
Type Description
double

MediaBox

The media box (physical page boundary) in user-space units (points).

Declaration
public PdfRect MediaBox { get; set; }
Property Value
Type Description
PdfRect

Rotate

Page rotation in degrees (0, 90, 180, 270).

Declaration
public int Rotate { get; set; }
Property Value
Type Description
int

Size

Width and height of the media box as a PdfSize.

Declaration
public PdfSize Size { get; }
Property Value
Type Description
PdfSize

Transform

A matrix that maps page coordinates to a normalised coordinate system, accounting for the page's Rotate value. Use this as the argument to All(PdfMatrix) when you need element bounds in the rotated / display coordinate space.

Declaration
public PdfMatrix Transform { get; }
Property Value
Type Description
PdfMatrix

TrimBox

The trim box (spec §7.7.3.3). The intended dimensions of the finished page after trimming. Defaults to CropBox if not set.

Declaration
public PdfRect TrimBox { get; set; }
Property Value
Type Description
PdfRect

Width

Width of the media box.

Declaration
public double Width { get; }
Property Value
Type Description
double

Methods

GetBoundaryBox(PageBoundaryType)

Gets the boundary box of the specified type.

Declaration
public PdfRect GetBoundaryBox(PageBoundaryType boundaryType)
Parameters
Type Name Description
PageBoundaryType boundaryType
Returns
Type Description
PdfRect

SetBoundaryBox(PageBoundaryType, PdfRect)

Sets the boundary box of the specified type.

Declaration
public void SetBoundaryBox(PageBoundaryType boundaryType, PdfRect rect)
Parameters
Type Name Description
PageBoundaryType boundaryType
PdfRect rect

SetMediaBox(double, double, double, double)

Sets the page media box using explicit coordinates.

Declaration
public void SetMediaBox(double left, double bottom, double right, double top)
Parameters
Type Name Description
double left
double bottom
double right
double top
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX