简体   繁体   中英

How to open some mac application on print command?

I am new to mac applications, i want to know, is there any way through which i can open my created application whenever user tries to print a document using a specific printer(installed by me).

i am working on conversion of .doc to .PS and then .PS to .pdf

.PS to .pdf is already achieved by me using ghost script.

The requirement of my application is to open itself whenever user tries to print a document using a specific printer

All Suggestions are welcome, Thanx in advance

The OS X print system is based on CUPS . (In fact, its creator, Michael Sweet, now works on CUPS as an Apple employee.) So one approach is to write your own CUPS printer driver. You can search the web for help writing a CUPS printer driver. I couldn't find any Mac-specific guides (even in Apple's Mac Dev Center), but there are some guides for Linux that might help you get started.

A much simpler, but somewhat different approach, is to create a “Print Plugin”. When you print in OS X, the print dialog has a “PDF” button in the lower-left that pops up a menu of other options, like “Open PDF in Preview”, “Mail PDF”, “Add PDF to iTunes”, and so on. Each of these options is a Print Plugin. You can create your own Print Plugin using the Automator application. It has a template for creating a Print Plugin workflow. You can easily create a workflow that opens the PDF in your app. If you want to do this, and need help with Automator, you should probably ask on Ask Different instead of stack overflow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM