I found this question at many places that how to print pdf file in .net in which you have only the full path of that pdf file
here is you solution in vb.net
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.Verb = “print”
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.FileName = sReport
Process.Start(psi)
on the above code for printing pdf file dynamically on any printer you need to create following steps
Step 1. Create instance of “ProcessInfo”
Step 2. make processinfo.Useshallexecute propery to true (that is for execution of that shall)
Step 3. set processinfo.verb property to true (-in this case we need to print the file so the verb is “print”)
Step 4. set processinfo.windowstyle to hidden (if you want to hide window from the user)
Step 5.set processinfo.filename = full path of your pdf file
Step 6. process.start(processinfo) (start your processinfo )
this will print the given file on the default printer of your computer .
How to print the pdf file in a given printer name
Hello Ripal Soni,
First of all, http://www.ripalsoni.wordpress.com is an excellent site for .NET Interview Question Answers
Excelent article Print PDF file in .net
Excelent Article Print PDF file in .net
Keep it up
Excelent Article
Thanks and keep it up….
This code is work, but after print is not close pdfWindow.
Note : I checked in .Net 2.0 .
//Hidden Window
psi.WindowStyle=ProcessWindowStyle.Hidden; is not Work.
Please kindly tell How to Hidden ProcessWindow?
I used the Same code but it did not work
Plz can u help me
how to print pdf file using c# coding and how to print word documents i am using 2.0 framework