Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
How Can I print from winForm to XPS printer without dialog?
Nava Amo
Jan 1 2015 3:14 AM
1.1k
Reply
Hello!
I try to print to XPS printer (it's not my default printer), but the program opens me a dialog.
Can I skip the dialog?
This is the code: pSettings = new PrinterSettings();
pSettings.PrintFileName = "test.xps";
RawPrinterHelper.SendStringToPrinter(pSettings.PrinterName, toSend);
spcn = new StandardPrintController(); printDocument1.PrinterSettings.PrinterName = "Microsoft XPS Document Writer"; printDocument1.PrintController = spcn;
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage); printDocument1.Print();
thanks!
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
need to come red color for error message c#(MVC 2)
.net