簡體   English   中英

使用 Adob​​e Acrobat 以編程方式打印到文件

[英]Print to File Programmatically using Adobe Acrobat

在 adobe acrobat reader 中的高級打印設置中,我注意到有一個打印到文件選項。 我目前正在 vb.net 中開發一個函數庫,用於打印各種格式的文件以打印語言文件(postscript)。 然而,我似乎無法找到一種以編程方式訪問此功能的方法,有沒有一種方法可以在不使用第三方工具的情況下做到這一點,因為我需要盡可能避免使用外部庫。

您可以使用 PrintDocument 類在 FILE: 端口上打印到 PostScript 打印機。 默認情況下,Windows 提供了 PostScript 打印驅動程序。 例如,HP LaserJet 2800 PS 隨 Server 2008 一起提供。通常,如果名稱中包含 PS,打印機將能夠打印到文件。

https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.printtofile

    ...
    printDocument1.PrinterSettings.PrintToFile = true
    printDocument1.PrinterSettings.PrintFileName = "c:\temp\test.ps"
    printDocument1.Print()

暫無
暫無

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

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