CHANEY LAW FIRM BLOG

Subscribe to our Blog

Adding a PDF printer for Wine-based Windows application on a Mac (How-to)

My previous post showed you how to install a Windows-based PTX viewer on a Mac. The next project is to install a PDF printer so you can convert .ptx files to PDF and open them natively with the Mac.

We're going to use MacPorts again to install a package called CUPS-PDF. This is very similar to the "Save as PDF" feature already on your Mac. Open up the Terminal application and run this command to install CUPS-PDF:

sudo port install cups-pdf

The output of this command will give you some instructions to run upon initial setup. They are:

ln -s /opt/local/var/spool/cups-pdf/$USER ~/Desktop/cups-pdf
/opt/local/libexec/cups-pdf_links.sh
sudo killall -1 cupsd

The first command creates a link to the output folder on your Desktop. You can move this link into whichever folder you prefer. The second command will require you to be an administrator and type in your password (it uses the sudo command). 

The next thing to do is install the CUPS-PDF printer on your Mac. Go to System Preferences > Printers & Scanners, and click the '+' below the printer list. CUPS-PDF should appear in the 'Default' list. Simply highlight CUPS-PDF, click 'Add', and you should have a CUPS-PDF printer in your printer list. (This will work for printing other things to PDF too — for instance, if you want to change print options but Save to PDF won't let you, the CUPS-PDF printer is a good workaround).

Finally, we need to tell the Wine emulator to reload so it can see the CUPS-PDF printer. The command in Terminal to accomplish this is:

sudo port -n upgrade --force wine-devel

After running this command, you should be able to select CUPS-PDF in the print dialog of the E-Tran viewer. Here's the result:

Happy PTX printing!