Click here to Skip to main content
15,946,179 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Firstly I save the document on server in pdf format, then Printing it on Client printer using the following code.
C#
Process proc = new Process();
                     proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                     proc.StartInfo.Verb = "print";
 
                    // string AdobeVersion = GetAdobeVersion();
                     proc.StartInfo.FileName = AdobePath + "\\Reader\\AcroRd32.exe";
                     proc.StartInfo.Arguments = @"/p /h " + "D:\\abc.pdf";
                     proc.StartInfo.UseShellExecute = false;
                     proc.StartInfo.CreateNoWindow = true;
                     proc.Start();
                     proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
                     if (proc.HasExited == false)
                     {
                         proc.WaitForExit(1000);
                     }
                     proc.EnableRaisingEvents = true;
                     proc.CloseMainWindow();
                     proc.Close();

Everything runs fine on my machine, but when deploying to server, it does not work.
Can anybody help me in this. I want to print pdf from srevr to client printer without any popup,message,nor print dialog or anything, just want to print it on the clients printer automaticaly by clicking on a Button.
Posted
Updated 8-Mar-13 23:57pm
v2

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