PdfViewer.PrintPage Event

Occurs when the document page is printed.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v20.1.dll

Declaration

public event PdfPrintPageEventHandler PrintPage
Public Event PrintPage As PdfPrintPageEventHandler

Event Data

The PrintPage event's data class is PdfPrintPageEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the print job should be canceled. Inherited from PrintPageEventArgs.
Graphics Gets the Graphics used to paint the page. Inherited from PrintPageEventArgs.
HasMorePages Gets or sets a value indicating whether an additional page should be printed. Inherited from PrintPageEventArgs.
MarginBounds Gets the rectangular area that represents the portion of the page inside the margins. Inherited from PrintPageEventArgs.
PageBounds Gets the rectangular area that represents the total area of the page. Inherited from PrintPageEventArgs.
PageCount Returns the total number of pages which were sent to the printer.
PageNumber Returns the page number of the currently printed page.
PageSettings Gets the page settings for the current page. Inherited from PrintPageEventArgs.

Remarks

Use this event to perform actions when the document is sent to a printer. The current page number and the total number of pages can be accessed via the PdfPrintPageEventArgs.PageNumber and PdfPrintPageEventArgs.PageCount properties, respectively.

The print job can also be canceled by setting the Cancel property to true for the PrintPageEventArgs. For more information about other properties of PrintPageEventArgs, see the PrintPageEventArgs Class MSDN topic.

See Also