Click or drag to resize
Pdf Library for .NET

PdfPage Class

Represents a page in a PDF document. Obtained from AddPage or the document's Pages collection; add graphic elements to it with Add(PdfPageElement).
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfCanvas
    SelectPdf.UniversalPdfPage

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class PdfPage : PdfCanvas

The PdfPage type exposes the following members.

Properties
 NameDescription
Public propertyClientRectangle Gets the drawable area of this page, in page coordinates: what is left of the sheet once the margins and the document header and footer are taken out.
(Overrides PdfCanvasClientRectangle)
Public propertyCustomFooter Gets or sets a footer shown on this page only, instead of the document footer.
Public propertyCustomHeader Gets or sets a header shown on this page only, instead of the document header.
Public propertyDisplayFooter Controls if a custom footer is displayed in the current pdf page.
Public propertyDisplayHeader Controls if a custom header is displayed in the current pdf page.
Public propertyDocument The parent pdf document of the current page.
Public propertyMargins Gets the pdf page margins. Read-only.
Public propertyOrientation Gets or sets the orientation of the page.
Public propertyPageIndex Gets or sets the zero-based index of this page in the document.
Public propertyPageSize Gets the size of the page, in points.
Public propertyRotation Gets or sets the pdf page rotation.
Top
Methods
 NameDescription
Public methodAdd Adds a graphic element to this page and renders it.
(Overrides PdfCanvasAdd(PdfPageElement))
Public methodCode exampleAddAsync(PdfPageElement) Adds a pdf page element to the canvas without waiting for it to be rendered.
(Inherited from PdfCanvas)
Public methodAddAsync(PdfPageElement, CancellationToken) Adds a pdf page element to the canvas without waiting for it to be rendered, stopping when the specified token is cancelled.
(Inherited from PdfCanvas)
Public methodMeasureString Measures the size of the specified string when rendered with the specified font.
(Inherited from PdfCanvas)
Top
Example
PdfDocument document = new PdfDocument();
PdfPage page = document.AddPage();
page.Rotation = PdfPageRotation.Rotate_90;
float width = page.PageSize.Width;
document.Save("out.pdf");
document.Close();
See Also