如何在服务器asp.net上打印pdf文件

时间:2015-01-12 08:25:22

标签: c# asp.net printing process

我尝试在服务器端打印pdf文件。现在我已经有pdf文件,我尝试使用此代码进行打印。

Process printJob = new Process();
                    printJob.StartInfo.FileName = fileName;
                    printJob.StartInfo.Arguments = printerName;
                    printJob.StartInfo.Verb = "printto";
                    printJob.StartInfo.CreateNoWindow = true;
                    printJob.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                    PrinterSettings setting = new PrinterSettings();
                    setting.DefaultPageSettings.Landscape = true;
                    printJob.Start();
                    printJob.Close();

此代码工作在localhost上找到但在服务器端无法正常工作。你能帮我吗?并解决了这个问题。非常感谢你

0 个答案:

没有答案