<< Click to Display Table of Contents >> PrintDevData Event - .NET |
Is sent only while printing, exactly before printing a new page and immediately after BeforePrintNewPage() has been sent. The only use for this event is to call DevSendData() in response.
DevSendData() enables your application to send escape sequences to the printing device. So it is possible to select for example an output paper bin by code (or whatever other functionality is provided by the connected printer).
PrintEventHandler VPE.PrintDevData(
object sender,
PrintEventArgs e
)
object sender
the VPE document object that fired the event
PrintEventArgs e
event data, derived from EventArgs, two additional members:
public class PrintEventArgs : EventArgs
{
public int Page; |
public PrintResultingAction PrintResultingAction; |
}
int Page
current page number that will be printed
PrintResultingAction enumeration:
is a return-parameter, i.e. you can assign it one of the following values to control the resulting action of VPE:
public enum PrintResultingAction
{
Ok, |
Change, |
}
Remarks:
When your application handles this event, the PrintAction member contains the current status of the printing progress. Your applications’s event handler can return a value in the PrintResultingAction member.
Your application should return Ok if it processes this message without calling DevSendData().
If it called DevSendData(), your application must return Change.