Search Results for

    Show / Hide Table of Contents

    Class PdfPage

    Represents a single page within a PDF document with access to dimensions, content, and manipulation methods. Provides properties for width, height, rotation, text extraction, and page transformation.

    Access pages via Pages collection. Each page provides access to text content, dimensions, and methods for resizing and transforming content.

    Example - Work with PDF pages:

    var pdf = PdfDocument.FromFile("document.pdf");
    

    // Access page properties: var page = pdf.Pages[0] as PdfPage; Console.WriteLine($"Size: {page.Width}mm x {page.Height}mm"); Console.WriteLine($"Rotation: {page.PageRotation}"); Console.WriteLine($"Text: {page.Text}");

    // Resize page: page.Resize(210, 297); // A4 size in mm

    // Extend page margins: page.Extend(10, 10, 20, 20); // Add margins (left, right, top, bottom)

    // Transform content: page.Transform(5, -5, 1.0, 1.0); // Move content 5mm right, 5mm down

    Inheritance
    System.Object
    PdfClientAccessor
    PdfPage
    Implements
    IPdfPage
    IronSoftware.Abstractions.Absolute.IDocumentPage<IPdfPageObjectModel>
    IronSoftware.Abstractions.Pdf.IPageContainer
    Namespace: IronPdf.Pages
    Assembly: IronPdf.dll
    Syntax
    public class PdfPage : PdfClientAccessor, IPdfPage

    Working with PDF pages in IronPDF runs through PdfPage. It represents a single page within a PDF document with access to dimensions, content, and manipulation methods.

    PdfPage matters when an application needs to configure or invoke PDF pages from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.

    To use PdfPage, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key properties include Characters, Height, Lines, ObjectModel. Assign options or invoke methods on the instance to configure or perform the operation. The transform PDF pages covers typical usage in C# end to end.

    using IronPdf;
    
    // Obtain PdfPage from the relevant entry point in the IronPDF API
    void Configure(PdfPage instance)
    {
        var current = instance.Characters;
        instance.Extend();
    }

    For the broader workflow, see the access PDF DOM object guide in the IronPDF C# documentation. For broader context, the PDF pages portion of the IronPDF C# API contains related types that work with PdfPage directly. PdfPage instances inherit additional members from PdfClientAccessor that may be relevant in advanced scenarios. In application code, treat PdfPage as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant PdfPage property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of PdfPage. Application code typically obtains or instantiates a single PdfPage and shares it across multiple IronPDF operations rather than recreating it per call.

    Constructors

    PdfPage(Double, Double)

    Create a new PDF page, not yet attached to a document

    Declaration
    public PdfPage(double Width, double Height)
    Parameters
    Type Name Description
    System.Double Width

    Page width (mm)

    System.Double Height

    Page height (mm)

    Properties

    Characters

    A collection of all characters on this page and their position

    Also see TextChunks and Lines

    Declaration
    public IDocumentCharCollection Characters { get; }
    Property Value
    Type Description
    IronSoftware.Abstractions.Pdf.IDocumentCharCollection

    Height

    Gets the height of the pdf page in mm.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double

    Lines

    A collection of all lines of text on this page and their position

    Declaration
    public IPdfTextObjectCollection Lines { get; }
    Property Value
    Type Description
    IPdfTextObjectCollection
    Remarks

    Derived from TextChunks for your convenience

    ObjectModel

    Declaration
    public IPdfPageObjectModel ObjectModel { get; }
    Property Value
    Type Description
    IPdfPageObjectModel

    PageIndex

    Gets the page index

    Declaration
    public int PageIndex { get; }
    Property Value
    Type Description
    System.Int32

    PageRotation

    Gets the page orientation.

    Declaration
    public PdfPageRotation PageRotation { get; set; }
    Property Value
    Type Description
    PdfPageRotation

    PrintHeight

    Gets the height of the pdf page in printer points.

    Declaration
    public double PrintHeight { get; }
    Property Value
    Type Description
    System.Double

    PrintWidth

    Gets the width of the pdf page in printer points.

    Declaration
    public double PrintWidth { get; }
    Property Value
    Type Description
    System.Double

    Text

    Page text

    Declaration
    public string Text { get; }
    Property Value
    Type Description
    System.String

    TextChunks

    A collection of all text objects on this page and their position

    The contents of each text object is rendered as a single unit

    The contents of each text object share font, origin position, etc.

    Also see Characters and Lines

    Declaration
    public IPdfTextObjectCollection TextChunks { get; }
    Property Value
    Type Description
    IPdfTextObjectCollection

    Width

    Gets the width of the pdf page in mm.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    Extend(Double, Double, Double, Double, MeasurementUnit)

    Extends this page bounds using the specified parameters (in millimeters)

    Does not resize page content; results in an empty margin around existing page content

    Declaration
    public void Extend(double ExtendLeft, double ExtendRight, double ExtendTop, double ExtendBottom, MeasurementUnit Units)
    Parameters
    Type Name Description
    System.Double ExtendLeft

    Desired amount (mm) to extend page width towards the left

    System.Double ExtendRight

    Desired amount (mm) to extend page width towards the right

    System.Double ExtendTop

    Desired amount (mm) to extend page height towards the top

    System.Double ExtendBottom

    Desired amount (mm) to extend page height towards the bottom

    MeasurementUnit Units

    Optionally specify units of measurement for input parameters

    Resize(Double, Double, MeasurementUnit)

    Resize this page to the specified dimensions (in millimeters)

    Declaration
    public void Resize(double PageWidth, double PageHeight, MeasurementUnit Units)
    Parameters
    Type Name Description
    System.Double PageWidth

    Desired page width, in millimeters

    System.Double PageHeight

    Desired page height, in millimeters

    MeasurementUnit Units

    Optionally specify units of measurement for input parameters

    Transform(Double, Double, Double, Double)

    Transforms this page contents using the specified parameters

    Affects the appearance of all content displayed on the page. Does NOT affect the physical page dimensions.

    Declaration
    public void Transform(double MoveX, double MoveY, double ScaleX, double ScaleY)
    Parameters
    Type Name Description
    System.Double MoveX

    Move the page contents left (negative) or right (positive), in millimeters

    System.Double MoveY

    Move the page contents down (negative) or up (positive), in millimeters

    System.Double ScaleX

    Scale the page contents horizontally (0.0 to infinity, where 1.0 is default scaling)

    System.Double ScaleY

    Scale the page contents vertically (0.0 to infinity, where 1.0 is default scaling)

    Implements

    IPdfPage
    IronSoftware.Abstractions.Absolute.IDocumentPage<>
    IronSoftware.Abstractions.Pdf.IPageContainer

    See Also

    PdfPagesCollection
    Pages
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    IronPDF_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronPDF