我尝试在服务器端打印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上找到但在服务器端无法正常工作。你能帮我吗?并解决了这个问题。非常感谢你