I had done this some years ago with Linux Mint and promptly forgot a few small details. I'm thus documenting it here so the process goes smoothly for those not privy to the details.

1) Select Menu->System Tools->Manage Printing which will get you into the CUPS application via your browser (localhost:631). I'm on CUPS 2.3.3op2.
2) Select the Adminstration then Add Printer. Enter your user name and password to get you through the login.
3) Follow the prompts/selections to add a CUPS-PDF (Virtual Printer).
4) I selected generic with options in my case. Follow all the way through to add the printer.

The default output directory for CUPS-PDF is /var/spool/cups-pdf/${USER} (where ${USER} is the name of your user in the system. Do a test print to the PDF virtual printer and check for the PDF file in this directory. It should be there. I created a /PDF folder in my home directory. You'll find a configuration file here /etc/cups/cups-pdf.conf where the output directory can be changed to your liking. I use Geany as my editor so I navigated to the /etc/cups folder and entered the terminal command below:

sudo geany cups-pdf.conf (This gives root permissions for changing the file.)

Scroll down and find the line #Out /var/spool/cups-pdf/${USER} which is commented out with the #. I replaced the line with the following:

Out /home/scott/PDF

Save the file which will cause the changes to take effect immediately. Use your user specific name to replace scott. You can use something other than PDF if you like. There are some warnings in the cups-pdf.conf file about white spaces. Be careful to heed these warnings. Printing to the PDF virtual printer will end up in the folder you specified.

Many applications allow creating a PDF directly from within them, For example, Libre Writer. Other applications like InkScape don't. Having a PDF virtual printer comes in handy for those applications that don't include a PDF print icon. Happy printing.


Evolve and simplify!
Scott Bridgman, Why not join and post your own comments??
scott@muniac.com (email me)
BACK HOME