Click here to Skip to main content
15,912,493 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a application in which i try to print records from a file.
While trying to print the records ,it shows the print dialog.

I want to suppress it.

Any ideas will be really helpful.

Thanks in advance.
Posted
Updated 3-Oct-11 2:39am
v2
Comments
Simon Bang Terkildsen 3-Oct-11 9:40am    
Shows us what you're doing (post the relevant code).

1 solution

use your file path direclty.........

dont use showdialog method.

XpsDocument xpsDocument = new
XpsDocument("C:\\FixedDocumentSequence.xps", FileAccess.ReadWrite);
FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence();

pDialog.PrintDocument(fixedDocSeq.DocumentPaginator, "Test print job");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900