Virtual printer driver for MacOS

430 Views Asked by At

Can I make a virtual printer driver for macOS?

As a service, it's gonna be working on the background and when any user pressed cmd+p to print out any document, mine app will be appearing in the list of printer on the default print out page of Apple.

1

There are 1 best solutions below

1
On

Yes, it could be done, and you don't need a driverkit here.

You could find the code example here: https://sourceforge.net/p/pdfwriterformac/code/HEAD/tree/

This project does exeactly what you need, it's written in C and uses CUPS API.

Worth to mention, it is not running like a background service itself, it is instead creates some settings and binary which is used by cupsd system daemon, but this is how it works on macos.

I also think it is possible with some efforts to do the same with Swift, since you added the relevant tag to the question.