如何为Mac OSX编写虚拟打印机驱动程序

如何为Mac OSX编写虚拟打印机驱动程序

问题描述:

我需要为OSX编写一个虚拟打印机驱动程序",以便当用户按Command + P打开打印"对话框时,他会看到我的虚拟打印机...该打印机将用于生成各种类型的文件,而不是实际打印到纸上.

I need to write a "virtual printer driver" for OSX, so that when the user presses Command+P to open the Print dialog, he sees my virtual printer...which will be used to generate files of various types, instead of physically printing to paper.

我是这个主题的新手,我环顾了一下,却一无所获.您是否有涉及此主题的文档的链接或参考?

I'm new to the subject, I looked around a bit but found nothing. Do you have any link or reference to documentation that cover this topic?

与其编写驱动程序,不如考虑使用

Rather than writing a driver, consider using the PDF Services feature of OS X print dialogs. In either the system-wide /Library/PDF Services or a user's ~/Library/PDF Services directory, you can put AppleScripts, Automator workflows, or symlinks/aliases to applications or folders. Those items will appear in the PDF pop-up menu in the print dialog, and if the user selects the item, a PDF of the file will be placed in the folder or be passed to the application, script, or workflow.