Method OnNativePrintDocumentPrintPage
OnNativePrintDocumentPrintPage(object?, CancelEventArgs)
Handles the print page event for the native print document, raising the print page logic and updating the cancellation status as needed.
protected virtual void OnNativePrintDocumentPrintPage(object? sender, CancelEventArgs e)
Parameters
senderobjectThe source of the event, typically the print document object that initiated the print page request.
eCancelEventArgsA CancelEventArgs that contains the event data, including the cancellation flag that can be set to abort printing.
Remarks
Override this method to customize how print pages are processed during native printing. The cancellation status of the event is updated based on the print page logic.
Exceptions
- InvalidOperationException
Thrown if the drawing context required for printing is not available.