如何在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.