SpreadsheetGear 2012
PrintPage Event (WorkbookPrintDocument)






Syntax
'Declaration
 
<SRDescriptionAttribute("Occurs once for each page to be printed.")>
Public Event PrintPage As System.Drawing.Printing.PrintPageEventHandler
'Usage
 
Dim instance As WorkbookPrintDocument
Dim handler As System.Drawing.Printing.PrintPageEventHandler
 
AddHandler instance.PrintPage, handler
[SRDescription("Occurs once for each page to be printed.")]
public event System.Drawing.Printing.PrintPageEventHandler PrintPage
public event PrintPage: System.Drawing.Printing.PrintPageEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
[SRDescription("Occurs once for each page to be printed.")]
public: __event System.Drawing.Printing.PrintPageEventHandler* PrintPage
[SRDescription("Occurs once for each page to be printed.")]
public:
event System.Drawing.Printing.PrintPageEventHandler^ PrintPage
Event Data

The event handler receives an argument of type System.Drawing.Printing.PrintPageEventArgs containing data related to this event. The following PrintPageEventArgs properties provide information specific to this event.

PropertyDescription
CancelGets or sets a value indicating whether the print job should be canceled.  
GraphicsGets the System.Drawing.Graphics used to paint the page.  
HasMorePagesGets or sets a value indicating whether an additional page should be printed.  
MarginBoundsGets the rectangular area that represents the portion of the page inside the margins.  
PageBoundsGets the rectangular area that represents the total area of the page.  
PageSettingsGets the page settings for the current page.  
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

WorkbookPrintDocument Class
WorkbookPrintDocument Members

Send Feedback