Hi,
What control, on what platform are you using?
Also, can you please clarify your requirements? Thank you.
We are using infragistics UltraPrintDocument control in .net. When we write _ultraPrintDocument.Print(); method then pdf generation process starts and after generating complete pdf. we don't want dialogbox which opened after generating pdf. Is there any solution to stop to open save dialogbox and cancel gereated pdf automatically.
Thanks
Hello,
It's still unclear what you are trying to achieve. I assume your using our Winforms Printing components?
The only safe place to cancel a print job is to handle the BeginPrint event for the PrintDocument.
eg.
private void ultraPrintDocument1_BeginPrint(object sender, System.Drawing.Printing.PrintEventArgs e) { e.Cancel = true; }
In general, calling the Print method will cause several events to fire, the most important ones fire in this order for the PrintDocument component:
BeginPrint
After this event, the "Printing" progress indicator is displayed to the end user while the printing is performed. PagePrintingPrintPagePagePrintedThere are no other dialogs that appears unless you are using the PrintPreviewDialog or some other dialog to appear to save your report, pdf, etc. Nonetheless I recommend handling the BeginPrint, determine if you need to print or not and cancel the process in it's tracks.
Let me know if you have any questions regarding this matter.