In windows application iam using System.Diagnostics.Process.Start(filepath) to open the file and i would to click the print option thro programatically.
Whether we can able to achieve this in windows application. Kindly help me.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Dec 10, 2011, 3:59 AM
when you open the file, if you want to print that document then .net supports to print the document.
You have to use the System.Drawing.Print namespace.
Any way you know the path of the document, then you have to use the streamreader to read the file and we have to fix the number of lines per page.
The PrintDocument class will be used to set the peoperties and print() method will be used to print.
Please go through this link, you will get the code.
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.print.aspx
Thanks,
Senthil.