Search Results for

    Show / Hide Table of Contents

    Class PdfDocument

    Inheritance
    System.Object
    PdfDocument
    Implements
    IPdfDocument
    System.IDisposable
    Namespace: IronPdf.Pdfium
    Assembly: IronPdf.dll
    Syntax
    public class PdfDocument : Object, IPdfDocument

    Properties

    Bookmarks

    Declaration
    public PdfBookmarkCollection Bookmarks { get; }
    Property Value
    Type Description
    PdfBookmarkCollection

    PageCount

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

    PageSizes

    Declaration
    public IList<SizeF> PageSizes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<System.Drawing.SizeF>

    Methods

    CreatePrintDocument()

    Declaration
    public PrintDocument CreatePrintDocument()
    Returns
    Type Description
    System.Drawing.Printing.PrintDocument

    CreatePrintDocument(PdfPrintMode)

    Declaration
    public PrintDocument CreatePrintDocument(PdfPrintMode printMode)
    Parameters
    Type Name Description
    PdfPrintMode printMode
    Returns
    Type Description
    System.Drawing.Printing.PrintDocument

    CreatePrintDocument(PdfPrintSettings)

    Declaration
    public PrintDocument CreatePrintDocument(PdfPrintSettings settings)
    Parameters
    Type Name Description
    PdfPrintSettings settings
    Returns
    Type Description
    System.Drawing.Printing.PrintDocument

    DeletePage(Int32)

    Declaration
    public void DeletePage(int page)
    Parameters
    Type Name Description
    System.Int32 page

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Finalize()

    Declaration
    protected override void Finalize()

    GetInformation()

    Declaration
    public PdfInformation GetInformation()
    Returns
    Type Description
    PdfInformation

    GetPageLinks(Int32, Size)

    Declaration
    public PdfPageLinks GetPageLinks(int page, Size size)
    Parameters
    Type Name Description
    System.Int32 page
    System.Drawing.Size size
    Returns
    Type Description
    PdfPageLinks

    GetPdfText(PdfTextSpan)

    Declaration
    public string GetPdfText(PdfTextSpan textSpan)
    Parameters
    Type Name Description
    PdfTextSpan textSpan
    Returns
    Type Description
    System.String

    GetPdfText(Int32)

    Declaration
    public string GetPdfText(int page)
    Parameters
    Type Name Description
    System.Int32 page
    Returns
    Type Description
    System.String

    GetTextBounds(PdfTextSpan)

    Declaration
    public IList<PdfRectangle> GetTextBounds(PdfTextSpan textSpan)
    Parameters
    Type Name Description
    PdfTextSpan textSpan
    Returns
    Type Description
    System.Collections.Generic.IList<PdfRectangle>

    Load(Stream)

    Declaration
    public static PdfDocument Load(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream
    Returns
    Type Description
    PdfDocument

    Load(Stream, String)

    Declaration
    public static PdfDocument Load(Stream stream, string password)
    Parameters
    Type Name Description
    System.IO.Stream stream
    System.String password
    Returns
    Type Description
    PdfDocument

    Load(String)

    Declaration
    public static PdfDocument Load(string path)
    Parameters
    Type Name Description
    System.String path
    Returns
    Type Description
    PdfDocument

    Load(String, String)

    Declaration
    public static PdfDocument Load(string path, string password)
    Parameters
    Type Name Description
    System.String path
    System.String password
    Returns
    Type Description
    PdfDocument

    PointFromPdf(Int32, PointF)

    Declaration
    public Point PointFromPdf(int page, PointF point)
    Parameters
    Type Name Description
    System.Int32 page
    System.Drawing.PointF point
    Returns
    Type Description
    System.Drawing.Point

    PointToPdf(Int32, Point)

    Declaration
    public PointF PointToPdf(int page, Point point)
    Parameters
    Type Name Description
    System.Int32 page
    System.Drawing.Point point
    Returns
    Type Description
    System.Drawing.PointF

    RectangleFromPdf(Int32, RectangleF)

    Declaration
    public Rectangle RectangleFromPdf(int page, RectangleF rect)
    Parameters
    Type Name Description
    System.Int32 page
    System.Drawing.RectangleF rect
    Returns
    Type Description
    System.Drawing.Rectangle

    RectangleToPdf(Int32, Rectangle)

    Declaration
    public RectangleF RectangleToPdf(int page, Rectangle rect)
    Parameters
    Type Name Description
    System.Int32 page
    System.Drawing.Rectangle rect
    Returns
    Type Description
    System.Drawing.RectangleF

    Render(Int32, Int32, Int32, Single, Single, PdfRenderFlags)

    Declaration
    public Image Render(int page, int width, int height, float dpiX, float dpiY, PdfRenderFlags flags)
    Parameters
    Type Name Description
    System.Int32 page
    System.Int32 width
    System.Int32 height
    System.Single dpiX
    System.Single dpiY
    PdfRenderFlags flags
    Returns
    Type Description
    System.Drawing.Image

    Render(Int32, Int32, Int32, Single, Single, PdfRotation, PdfRenderFlags)

    Declaration
    public Image Render(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags)
    Parameters
    Type Name Description
    System.Int32 page
    System.Int32 width
    System.Int32 height
    System.Single dpiX
    System.Single dpiY
    PdfRotation rotate
    PdfRenderFlags flags
    Returns
    Type Description
    System.Drawing.Image

    Render(Int32, Int32, Int32, Single, Single, Boolean)

    Declaration
    public Image Render(int page, int width, int height, float dpiX, float dpiY, bool forPrinting)
    Parameters
    Type Name Description
    System.Int32 page
    System.Int32 width
    System.Int32 height
    System.Single dpiX
    System.Single dpiY
    System.Boolean forPrinting
    Returns
    Type Description
    System.Drawing.Image

    Render(Int32, Single, Single, PdfRenderFlags)

    Declaration
    public Image Render(int page, float dpiX, float dpiY, PdfRenderFlags flags)
    Parameters
    Type Name Description
    System.Int32 page
    System.Single dpiX
    System.Single dpiY
    PdfRenderFlags flags
    Returns
    Type Description
    System.Drawing.Image

    Render(Int32, Single, Single, Boolean)

    Declaration
    public Image Render(int page, float dpiX, float dpiY, bool forPrinting)
    Parameters
    Type Name Description
    System.Int32 page
    System.Single dpiX
    System.Single dpiY
    System.Boolean forPrinting
    Returns
    Type Description
    System.Drawing.Image

    RenderBytes(Int32, Int32, Int32, Single, Single, PdfRotation, PdfRenderFlags)

    Declaration
    public byte[] RenderBytes(int page, int width, int height, float dpiX, float dpiY, PdfRotation rotate, PdfRenderFlags flags)
    Parameters
    Type Name Description
    System.Int32 page
    System.Int32 width
    System.Int32 height
    System.Single dpiX
    System.Single dpiY
    PdfRotation rotate
    PdfRenderFlags flags
    Returns
    Type Description
    System.Byte[]

    RotatePage(Int32, PdfRotation)

    Declaration
    public void RotatePage(int page, PdfRotation rotation)
    Parameters
    Type Name Description
    System.Int32 page
    PdfRotation rotation

    Save(Stream)

    Declaration
    public void Save(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Save(String)

    Declaration
    public void Save(string path)
    Parameters
    Type Name Description
    System.String path

    Search(String, Boolean, Boolean)

    Declaration
    public PdfMatches Search(string text, bool matchCase, bool wholeWord)
    Parameters
    Type Name Description
    System.String text
    System.Boolean matchCase
    System.Boolean wholeWord
    Returns
    Type Description
    PdfMatches

    Search(String, Boolean, Boolean, Int32)

    Declaration
    public PdfMatches Search(string text, bool matchCase, bool wholeWord, int page)
    Parameters
    Type Name Description
    System.String text
    System.Boolean matchCase
    System.Boolean wholeWord
    System.Int32 page
    Returns
    Type Description
    PdfMatches

    Search(String, Boolean, Boolean, Int32, Int32)

    Declaration
    public PdfMatches Search(string text, bool matchCase, bool wholeWord, int startPage, int endPage)
    Parameters
    Type Name Description
    System.String text
    System.Boolean matchCase
    System.Boolean wholeWord
    System.Int32 startPage
    System.Int32 endPage
    Returns
    Type Description
    PdfMatches

    Implements

    IPdfDocument
    System.IDisposable
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronPDF to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronPDF free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.