Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to print pdf document silently.
But adobe does not get closed after printing of document.

I have tried following code. It works for all type of documents but failed for pdf document.
I serached on google, i found the option to Kill adobe exe after printing of document.
Does any one have better solution than this?

Thanks in advance,
Pushkar

What I have tried:

C#
Process oProcess = new Process();
oProcess.StartInfo.FileName = PDFFilePath;
oProcess.StartInfo.UseShellExecute = true;
oProcess.StartInfo.CreateNoWindow = true;
oProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
oProcess.StartInfo.Verb = "print";
oProcess.Start();
oProcess.WaitForExit();
Success = true;
Posted
Updated 23-May-16 3:13am
Comments
Kornfeld Eliyahu Peter 23-May-16 8:45am    
Check this: http://www.codeproject.com/Tips/598424/How-to-Silently-Print-PDFs-using-Adobe-Reader-and
OriginalGriff 23-May-16 9:00am    
I'd suggest that as the solution!
Why not post it as such?
Kornfeld Eliyahu Peter 23-May-16 9:12am    
I felt it was too easy to find :-)
OriginalGriff 23-May-16 9:18am    
Obviously not for the OP... :laugh:

1 solution

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