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
Mahe
NA
38
1.8k
Printing Issue in Windows Application (.Net, C#)
Dec 8 2015 1:15 AM
Hi All,
Am working in Windows Application (.Net , C#). It involves in generating a PDF and printing the PDF. Am able to generate and print the PDF.
For Printing i used following lines of code.
[code]
String file = @"C:\PDFOutput\RegistrationDetail.pdf";
Process p=new Process();
PrinterSettings printer = new PrinterSettings();
obj.PrinterName ="10.11.12.13";
ProcessStartInfo pinfo = new ProcessStartInfo(file);
pinfo.Verb ="PrintTo";
pinfo.CreateNoWindow = true;
pinfo.WindowStyle= ProcessWindowStyle.Hidden;
p.StartInfo =pinfo;
p.Start(); p.close();
[/code]
I need to configure printer (10.11.12.13) as default printer in my dev machine(app server) and then i need to execute the application to work properly. In case i need to change the printer, i need to add the new printer as default printer and then need to execute the process. Is there any alternate way to accomplish this printing without adding as default printer and i can modify the printer dynamically.
thanks in advance.
Regards,
Mahe
Reply
Answers (
3
)
Elevator Simulaton
how do i print using ip address through network printer