Click here to Skip to main content
15,896,368 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
See more:
hi all,

working on printing the pdf document directly based on printer Name.

how can i do this in winforms?

Let me know the details.

my code is
Process objProcess = new Process();
            objProcess.StartInfo.FileName = @"F:/test.pdf";
            objProcess.StartInfo.Arguments = "/d:" + @"\\Domain\Printer Name";
            objProcess.StartInfo.Verb = "Print";
            objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            objProcess.StartInfo.UseShellExecute = true;
            objProcess.Start();
Posted
Updated 4-Sep-12 20:12pm
v2
Comments
pradiprenushe 5-Sep-12 7:26am    
Try this
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.printdocument.aspx

1 solution

See if this CP article helps: Silent Print Using C#[^]
 
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