如何在LAN打印机上打印pdf文件 [英] How to print pdf file on LAN Printer
本文介绍了如何在LAN打印机上打印pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在LAN网络上打印pdf文件。我正在尝试使用此代码,但它正在使用默认打印机。
I want to print a pdf file on LAN network. I am trying with this code but it is taking the default printer.
PrintDialog pd = new PrintDialog();
pd.PrinterSettings.PrinterName = @"\\192.168.10.139\HP DeskJet 2130 series";
ProcessStartInfo info = new ProcessStartInfo();
info.Verb = "print";
info.FileName = CurrentEmailFilePath;
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process p = new Process();
p.StartInfo.Arguments = pd.PrinterSettings.PrinterName.ToString();
pd.PrinterSettings.MaximumPage = 1;
p.StartInfo = info;
p.Start();
p.WaitForInputIdle();
System.Threading.Thread.Sleep(3000);
if (false == p.CloseMainWindow())
p.Kill();
如何将我的pdf文件打印到LAN网络打印机?
How i can print my pdf file in to LAN network printer?
关心atik sarker
Regards atik sarker
推荐答案
感谢您的回复,这不起作用。
Thank you for your response, This is not working.
这篇关于如何在LAN打印机上打印pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文