TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nava Amo
NA
25
17.3k
How Can I print from winForm to XPS printer without dialog?
Jan 1 2015 3:14 AM
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!
Reply
Answers (
0
)
need to come red color for error message c#(MVC 2)
.net