Hello everybody.
Can someone please tell me how to stop the page ejecting from the printer after the printing of the print document has completed?
I use VB.Net and have tried setting the HasMorePages of the PrintPageEventArgs to false. However, it does not work. I have to print on a paper roll, so I cannot let the printer push the paper forward to complete the page height.
Here is the code sample.
pDoc is the PrintDocument object.
VB Code:
Private sub pDoc_PrintPage(sender as object, e as PrintPageEventArgs) Handles pDoc.PrintPage
'Printing Code goes here.
'After the printing is finished
e.HasMorePages = False
End Sub
Please help me. It is urgent.
Thanks in advance.
NIKHIL