Search Results for

    Show / Hide Table of Contents

    Class PdfPrintDocument

    PDF Class enabling developers granular control over sending printable documents to a physical printer.

    An assembly reference to System.Drawing is required in your project.

    Note: 'PdfPrintDocument' is only supported on: 'Windows'.

    Inheritance
    System.Object
    PdfPrintDocument
    Namespace: IronPdf.PrintDoc
    Assembly: IronPdf.dll
    Syntax
    public class PdfPrintDocument : PrintDocument

    Constructors

    PdfPrintDocument(PdfDocument, PdfPrintSettings, PrinterSettings, PrintController)

    Initializes a new instance of the System.Drawing.Printing.PrintDocument class.

    Declaration
    public PdfPrintDocument(PdfDocument pdfDocument, PdfPrintSettings settings, PrinterSettings printerSettings, PrintController printController)
    Parameters
    Type Name Description
    PdfDocument pdfDocument

    An PdfDocument of document.

    PdfPrintSettings settings

    A PdfPrintSettings that configures the print document.

    System.Drawing.Printing.PrinterSettings printerSettings

    A System.Drawing.Printing.PrinterSettings that specifies where and how the document is printed.

    System.Drawing.Printing.PrintController printController

    The System.Drawing.Printing.PrintController that guides the printing process.

    Methods

    OnBeforePrintPage(PrintPageEventArgs)

    Represents the method that will handle the System.Drawing.Printing.PrintDocument.PrintPage

    event of a System.Drawing.Printing.PrintDocument.

    Declaration
    protected virtual void OnBeforePrintPage(PrintPageEventArgs e)
    Parameters
    Type Name Description
    System.Drawing.Printing.PrintPageEventArgs e

    System.Drawing.Printing.PrintPageEventArgs that contains the event data.

    OnBeforeQueryPageSettings(QueryPageSettingsEventArgs)

    Represents the method that handles the System.Drawing.Printing.PrintDocument.QueryPageSettings

    event of a System.Drawing.Printing.PrintDocument.

    Declaration
    protected virtual void OnBeforeQueryPageSettings(QueryPageSettingsEventArgs e)
    Parameters
    Type Name Description
    System.Drawing.Printing.QueryPageSettingsEventArgs e

    A System.Drawing.Printing.QueryPageSettingsEventArgs that contains the event data.

    OnBeginPrint(PrintEventArgs)

    Raises the System.Drawing.Printing.PrintDocument.BeginPrint event. It is called

    after the System.Drawing.Printing.PrintDocument.Print method is called and before

    the first page of the document prints.

    Declaration
    protected override void OnBeginPrint(PrintEventArgs e)
    Parameters
    Type Name Description
    System.Drawing.Printing.PrintEventArgs e

    A System.Drawing.Printing.PrintEventArgs that contains the event data.

    OnPrintPage(PrintPageEventArgs)

    Raises the System.Drawing.Printing.PrintDocument.PrintPage event. It is called

    before a page prints.

    Declaration
    protected override void OnPrintPage(PrintPageEventArgs e)
    Parameters
    Type Name Description
    System.Drawing.Printing.PrintPageEventArgs e

    A System.Drawing.Printing.PrintPageEventArgs that contains the event data.

    OnQueryPageSettings(QueryPageSettingsEventArgs)

    Raises the System.Drawing.Printing.PrintDocument.QueryPageSettings event. It

    is called immediately before each System.Drawing.Printing.PrintDocument.PrintPage

    event.

    Declaration
    protected override void OnQueryPageSettings(QueryPageSettingsEventArgs e)
    Parameters
    Type Name Description
    System.Drawing.Printing.QueryPageSettingsEventArgs e

    A System.Drawing.Printing.QueryPageSettingsEventArgs that contains the event data.

    Events

    BeforePrintPage

    Represents the method that will handle the System.Drawing.Printing.PrintDocument.PrintPage

    event of a System.Drawing.Printing.PrintDocument.

    Declaration
    public event PrintPageEventHandler BeforePrintPage
    Event Type
    Type Description
    System.Drawing.Printing.PrintPageEventHandler

    BeforeQueryPageSettings

    Represents the method that handles the System.Drawing.Printing.PrintDocument.QueryPageSettings

    event of a System.Drawing.Printing.PrintDocument.

    Declaration
    public event QueryPageSettingsEventHandler BeforeQueryPageSettings
    Event Type
    Type Description
    System.Drawing.Printing.QueryPageSettingsEventHandler
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Free 30-Day Trial Key
    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.