使用 Adob​​e Acrobat 以编程方式打印到文件 [英] Print to File Programmatically using Adobe Acrobat

查看:56
本文介绍了使用 Adob​​e Acrobat 以编程方式打印到文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 adobe acrobat reader 中的高级打印设置中,我注意到有一个打印到文件选项.我目前正在 vb.net 中开发一个函数库,用于打印各种格式的文件以打印语言文件(postscript).然而,我似乎找不到一种以编程方式访问此功能的方法,是否有一种方法可以在不使用第三方工具的情况下执行此操作,因为我需要尽可能避免使用外部库.

In the advanced print settings inside adobe acrobat reader, I have noticed that there is a print to file option. I am currently developing a library of functions in vb.net that prints files of various formats to print language files (postscript). I can't seem to find however a way to access this functionality programmatically, is there a way to do this without using a third party tool as I need to try and avoid using external libraries if at all possible.

推荐答案

您可以使用 PrintDocument 类在 FILE: 端口上打印到 PostScript 打印机.默认情况下,Windows 提供了 PostScript 打印驱动程序.一个例子是 HP LaserJet 2800 PS,它是随 Server 2008 提供的.通常,如果名称中有 PS,打印机将能够打印到文件.

You can use the PrintDocument class to print to a PostScript printer on the FILE: port. PostScript print drivers are provided with Windows by default. An example is HP LaserJet 2800 PS, which is provided with Server 2008. Generally if it has PS in the name the printer will be able to print to file.

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()

这篇关于使用 Adob​​e Acrobat 以编程方式打印到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆