簡體   English   中英

如何將PDF打印到默認打印機以外的其他內容

[英]How to print a PDF to something other than the default printer

我使用此代碼從acrobat reader打印pdf文件。

private void SendToPrinter()
{
    ProcessStartInfo info = new ProcessStartInfo();
    info.Verb = "print";
    info.FileName = @"c:\output.pdf";
    info.CreateNoWindow = true;
    info.WindowStyle = ProcessWindowStyle.Hidden;

    Process p = new Process();
    p.StartInfo = info;
    p.Start();

    p.WaitForInputIdle();
    System.Threading.Thread.Sleep(3000);
    if (false == p.CloseMainWindow())
        p.Kill();
}

但是,它通過默認打印機打印。

如何選擇要將打印機發送到的打印機? 默認。

我嘗試使用ex:info.Arguments的屬性,但這不起作用。

使用/ t命令行參數強制adobe使用特定的打印機:

AcroRd32.exe /t path "printername" "drivername" "portname"

有關詳細信息,請參閱PDF開發人員常見問題解答: http//partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf

如何使用“printto” 動詞 考取"\\\\\\server\\printer"info.Arguments

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM