Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

CUPS-PDF - A free virtual PDF printer Pick of the Week
The macosxhints Rating:

[Score: 10 out of 10]
CUPS-PDF is a free little package that was mentioned back in March in this hint as part of a solution to batch converting Word documents to PDF. However, CUPS-PDF is actually an amazingly useful little add-on for nearly anyone who regularly prints to PDF. CUPS-PDF installs a "virtual" PDF printer, which you can then select and use just as you would a normal printer. When you print a job to the virtual PDF printer, the output shows up in a cups-pdf folder on your desktop.

Yes, you can do exactly the same thing by clicking the PDF button in the Print dialog, then selecting Save as PDF from the drop-down menu. But CUPS-PDF makes the process much faster and easier. With the built-in solution, you have to not only click a button and choose a menu item, you then have to pick a name and save location for the resulting file. CUPS-PDF print jobs are always named after the document that you printed (prefixed by a job number), and they're automatically saved to the cups-pdf folder on your desktop. So if you set the virtual PDF printer as your default, you can print to a PDF by just pressing Command-P then Return. This makes it a snap to convert a number of existing documents, or to easily save all your web receipts during an extensive online shopping trip.

Another way to use your virtual printer is to make a desktop printer out of it (in Printer Setup Utility). Store it in your dock for fast access, and then just drag and drop print jobs to it when you need something turned into a PDF. And yes, Adobe Acrobat Pro includes a virtual PDF writer ... but this solution is completely free, works very well, and integrates perfectly into the Print dialog. Well worth a look if you're a heavy user of PDF printing.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[38,895 views]  

CUPS-PDF - A free virtual PDF printer | 26 comments | Create New Account
Click here to return to the 'CUPS-PDF - A free virtual PDF printer' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
CUPS-PDF - A free virtual PDF printer
Authored by: amaloney on Tue, Aug 28 2007 at 2:35PM PDT
I have never got this to work.
I think the reason is found at
http://www.codepoetry.net/support/other_software/cups_pdf_package/cannot_install_cups_pdf_printer
where it says:
===========
This is for the stock version of CUPS that comes with Mac OS X. If you've installed a different version then you need to manually install the backend module at /usr/libexec/cups/backend/cups-pdf into the proper directory for your version of CUPS.
=============
I have installed CUPS 1.2.12 and am using OS X 10.4.10.

I do not know where to go with this instruction "to manually install…" to try to get it to work.

Al Maloney


[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: mizraith on Wed, Aug 29 2007 at 5:33PM PDT
I have actually gotten it to work -- and the hint a while back was more specific than this repost. Anyway, in the end it seemed kinda pointless given OS X's native print to PDF capabilities. Adding additional Automator workflows helps the print-to-pdf functionality as well.

The only use I found for the CUPS-PDF was to *share* the ability to print to PDF to those less fortunate Windows users. While this worked for most general purpose documents, it seemed to fall down pretty hard on (you guessed it) various PowerPoint type files (images, specifically).



[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: Helge33 on Thu, Aug 30 2007 at 4:35AM PDT
I am not surprised. I never understood the purpose of amateur software like CUPS which apparently is only useful for exotic or outdated printer models?

I neither understand why on a Mac(!) the 1560. PDF Utility shall be a 10 point pick of the week?

I neither understand why this part of the osxhint webpage is barely readable with Safari as there are no line breaks...??



[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: dewab on Tue, Aug 28 2007 at 3:23PM PDT
Another way this could be done would be to create a customer Automator Workflow and save it in /Library/PDF Services/

Use the "Save PDF to Web Receipts Folder" as a template. Can also add timestamping and other information.

[ Reply to This | # ]
Non-Interactive, Digitally signing PDFs
Authored by: pepi on Wed, Aug 29 2007 at 2:11AM PDT
The difference with a dedicated PDF Printer is, that it can be used non-interactively from any script and without any GUI needed. This can be very handy if you want to automate workflows or processes that do not involve a user to click buttons.
I'd like to see a CUPS receipt that will allow me to automatically sign a PDF I print through it with a cryptographic signature. I haven't yet found any automated solution to do this on the Mac. Pepi

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: kyngchaos on Wed, Aug 29 2007 at 8:39AM PDT
Except that Save as PDF won't work in Adobe Reader 8 - Adobe blocked this. Why would I want to save a PDF to PDF?

Form PDFs don't allow saving, so the helpful note from Adobe when you open one says to print a copy after filling in the form if you want a record of what you filled in. But you can't save to PDF when printing from Reader 8, so the only way to get a digital copy of the filled-in form is to print thru a virtual printer.

[ Reply to This | # ]
but how small are the resultant files?
Authored by: chidimaar on Tue, Aug 28 2007 at 5:00PM PDT
This sounds promising, as I have to convert a bunch of keynote presentations to pdfs for students to download after my lectures (kids these days - want everything handed to them!). Keynote's (Apple's) built in export to PDF / print to PDF options both lead to rather large files that are tough on dialup lines. So my question is - does this make the pdf files smaller than Apple's version? I guess I'll get around to testing this one of these days but if anyone knows the answer, I'd appreciate hearing about it.

[ Reply to This | # ]
but how small are the resultant files?
Authored by: ploesslkh on Tue, Aug 28 2007 at 5:47PM PDT
I printed the macosxhints webpage. With save as "pdf" it's 352 kb, with the CUPS-PDF 2.8 MB

[ Reply to This | # ]
but how small are the resultant files?
Authored by: rainwadj on Tue, Sep 4 2007 at 9:39AM PDT
Similar results here. On a 2-page document (with graphics) in Pages:

CUPS-PDF: 6 MB
Print-to-PDF: 184 KB



[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: NovaScotian on Tue, Aug 28 2007 at 5:38PM PDT
I use CUPS-PDF, and have this little script in my Scripts menu to move through my printers:
tell application "Printer Setup Utility"
	activate
	repeat
		set myPrinters to every printer
		set C to count myPrinters
		set DefaultPrinter to current printer
		repeat with k from 1 to C
			if item k of myPrinters is DefaultPrinter then
				set current printer to item ((k mod C) + 1) of myPrinters
				exit repeat
			end if
		end repeat
		if button returned of (display dialog (name of current printer) as text default button 1 buttons {"OK"} with title "Press Enter when Printer is Correct" giving up after 1.5) is "OK" then exit repeat
	end repeat
	quit
end tell


[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: plowedu on Tue, Aug 28 2007 at 7:35PM PDT
I found the resulting PDF files to be very large, much larger than save as "compress PDF" or even as PDF

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: amaloney on Sun, Jan 27 2008 at 8:26PM PST
plowedu

Have you got any more info about the large size of the pdf documents created by cups-pdf?

Al Maloney

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: reece146 on Wed, Aug 29 2007 at 8:16AM PDT
How does this do the paging of the resultant PDF?

I use Paparazzi for printing PDFs just because it automatically makes the resultant PDF one large/long file. Very handy when printing web apges and you don't want embedded images or whatever split between pages.

If this did the same thing I could dump Paparazzi becuase it is kinda tedious to have to re-open the URL in the program and then save. <minor_quibble />

[ Reply to This | # ]
CUPS-PDF - Virtual PDF printer?
Authored by: msbarb on Fri, Aug 31 2007 at 6:58AM PDT
I just joined and was reading this particular thread and will continue to explore to find other things. However, this is what I need to know (or learn is maybe a better word)...

Yesterday I just discovered that I could create a PDF using Illustrator. I tested it, send my 1st PDF file in an email to test it...all is A-OK. Now I get eager for more PDF knowledge...but I am an old feeble minded person who kind of needs 'ABC directions' to do things. I am also a financially broke old person, so going out and purchasing software that will DO what I want is out of the question right now.

My Goal is to create a multiple page PDF and preferably with clickable links...though active hyperlinks is on the bottom of my list right now. I see many talking about PDFs here, and tips/tricks to do...but frankly my mind is boggled. Can anyone help me out with an EZ to use/follow system?

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: DDDAMORE on Thu, Oct 4 2007 at 12:19PM PDT
Does anyone know how to change the name of the cups-pdf Folder?

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: thejoecarroll on Tue, Dec 4 2007 at 3:05AM PST
The destination folder can be specified here by editing the file /private/etc/cups/cups-pdf.conf Look for the following:
### Key: Out
## CUPS-PDF output directory
## special qualifiers:
## ${HOME} will be expanded to the user's home directory
## ${USER} will be expanded to the user name
## in case it is an NFS export make sure it is exported without
## root_squash!
### Default: /var/spool/cups-pdf/${USER}

Out ${HOME}/cups-pdf/


[ Reply to This | # ]
Printing Protected Documents
Authored by: quickbrownfox on Sun, Jan 25 2009 at 11:51AM PST
I was able to use this hint to print a PDF copy of a document which was protected by Adobe's LiveCycle Rights Management. The trick is to select "Print as image" in the Advanced Print Setup dialog (accessible from the Advanced button in Reader's print dialog). This creates a huge file (63MB in my case), but it does work. The resulting PDF can be opened in Preview.app, which was not the case with my original document. Opening this document and printing it to a PDF from Preview (via the PDF menu in the print dialog) will create a much smaller file.

Of course, this method turns the document into a bitmap, so you don't get selectable, scalable text, but it does allow you to save a local copy of a protected document.

[ Reply to This | # ]
Getting it to work with Snow Leopard
Authored by: victory on Sun, Aug 30 2009 at 5:34AM PDT
[Sorry, these are *not* detailed instructions -- they are just general hints for technically-inclined users. If the cmd-line isn't your thing or the description doesn't make sense, I'd suggest waiting to see if the pre-packaged installer will be updated for 10.6]

Overall Problem(s): The current (v2.4.6.1) CodePoetry package of CUPS-PDF driver doesn't work under Snow Leopard. After installing the package, the CUPS-PRINTER doesn't even show up in the Printer & Fax system prefs when you select 'Add Printer'.

Solution step#1: Per the latest CUPS-PDF README, the /usr/libexec/cups/backend/cups-pdf binary must now be chmod'ed 0700 and be chowned by root:wheel. Otherwise, the CUPS-PRINTER won't even show up. Do this and the CUPS-PRINTER should now appear and allow you to add it.

Solution step#2: The new 'application sandbox' feature in 10.6 won't allow the required pstopdf binary to write to a folder in a user's homedir. So the default 'Out ${HOME}/Desktop/cups-pdf/' entry in the /etc/cups/cups-pdf.conf file will cause the printjob to silently fail. (Watch System.log for evidence of this)

After wasting a few hours trying different methods to get the sandbox to create an exception for pstopdf, I gave up. Instead I just edited the cups-pdf.conf entry to point to somewhere the sandbox will allow (e.g. '/var/spool/cups-pdf/${USER}' ) then just symlinked it to a folder in my homedir.

At the moment I prefer this rather than potentially messing with the system-wide sandbox config, since this security mechanism isn't completely documented as of yet.


NOTE: While I applaud the CodePoetry author for creating the prepackaged OSX installer, if anyone reading this is going to actually dig this deep to get it to work under Snow Leopard, you might consider just building the original CUPS-PDF driver (it's only a single file) directly from the source. See http://www.cups-pdf.de . The current latest (v2.5.0) worked fine for me using the above techniques. Just don't forget that you need to manually install/edit the cups-pdf.conf file also.

[ Reply to This | # ]
Getting it to work with Snow Leopard
Authored by: DaveNJ on Wed, Sep 2 2009 at 9:08AM PDT
Hmmm, can't get this working under SL - the CUPS printer is created, but when printing it just appears in the dock for a bounce or two but then is gone...

Can someone provide detailed steps?

[ Reply to This | # ]
Getting it to work with Snow Leopard
Authored by: bbell2000 on Sun, Sep 20 2009 at 1:13PM PDT
Thanks for this. The codepoetry site leads one to believe that version 2.4.6.1 addresses this issue, but I did not find that to be the case.

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: ChipMck on Mon, Sep 14 2009 at 8:51AM PDT
to get CUPS-PDF to work with Snow Leopard - 10.6.0 or .1
- referring to CUPS-PDF 2.5.0 package's README

Permission setting for the BackEnd
via Terminal
cd /usr/libexec/cups/backend/
sudo chmod 0700 cups-pdf

Output Folder
Snow Leopard objects to ${Home} and ${User}
Suggestion
1. Finder --> Go --> Go to Folder ….
"/etc/cups" and punch Go
2. Select cups-pdf.conf and drag to your Desktop
3. On your Desktop, select cups-pdf.conf
4. Ctrl-Click and Open with Textedit
a. Find "#Out "
b. On new line "Out /Users/Shared/Cups_PDF"
c. Delete any other line starting with "Out "
d. Find "#AnonDirName "
e. On new line "AnonDirName /Users/Shared/Cups_PDF/Anonymous"
f. Delete any other line starting with "AnonD"
g. Save
5. Drag cups-pdf.conf back to folder /etc/cups and Authenticate/Replace
6. via Terminal
cd /etc/cups
sudo chown root:_lp cups-pdf.conf
exit
7. On your Desktop, trash cups-pdf.conf
8. Finder --> Go --> Go to Folder ….
"/Users/Shared/Cups_PDF"
9. Ctrl-Click and Make Alias
10. Drag the Alias to your Desktop

Good Luck

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: bossa nova on Tue, Sep 15 2009 at 4:24AM PDT
ChipMck,
I tried what you have and received the following error:
The printer software was installed incorrectly. Please reinstall the printer's software or contact the manufacturer for assistance.
Again here is what you listed in your instructions...
to get CUPS-PDF to work with Snow Leopard - 10.6.0 or .1 - referring to CUPS-PDF 2.5.0 package's README
Permission setting for the BackEnd
via Terminal
cd /usr/libexec/cups/backend/
sudo chmod 0700 cups-pdf
Output Folder
Snow Leopard objects to ${Home} and ${User}
Suggestion
1. Finder --> Go --> Go to Folder ….
"/etc/cups" and punch Go
2. Select cups-pdf.conf and drag to your Desktop
3. On your Desktop, select cups-pdf.conf
4. Ctrl-Click and Open with Textedit
a. Find "#Out " --This line actually reads "Out" no pound sign here
b. On new line "Out /Users/Shared/Cups_PDF"
c. Delete any other line starting with "Out "
d. Find "#AnonDirName "
e. On new line "AnonDirName /Users/Shared/Cups_PDF/Anonymous"
f. Delete any other line starting with "AnonD"
g. Save
5. Drag cups-pdf.conf back to folder /etc/cups and Authenticate/Replace
6. via Terminal
cd /etc/cups
sudo chown root:_lp cups-pdf.conf
exit
7. On your Desktop, trash cups-pdf.conf
8. Finder --> Go --> Go to Folder ….
"/Users/Shared/Cups_PDF"
9. Ctrl-Click and Make Alias
10. Drag the Alias to your Desktop

---
Thanks!

John

[ Reply to This | # ]

CUPS-PDF - A free virtual PDF printer
Authored by: ChipMck on Wed, Sep 16 2009 at 2:40PM PDT
you are right that the distributed file has 'Out ', not '#Out'.

I would change that line to be prefixed with '#' - this shows the original setting.
Then add a new line specifying another folder - without any substitutions ${...}.

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: ChipMck on Thu, Sep 17 2009 at 6:02AM PDT
the site http://www.codepoetry.net/ was updated today 2009.09.17
stating that CUPS-PDF package would be updated for Snow Leopard

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: SFJeep on Mon, Oct 12 2009 at 12:27PM PDT

I was able to get this working for 10.6 by using different directories.

Instead of

Out /Users/Shared/Cups_PDF

AnonDirName /Users/Shared/Cups_PDF/Anonymous
I used

Out /var/spool/cups-pdf

AnonDirName /var/spool/cups-pdf
You could also have a subdirectory of /var/spool/cups-pdf to match the printer name. Of course, ensure that permissions are set appropriately for whatever directory you specify here.

[ Reply to This | # ]
CUPS-PDF - A free virtual PDF printer
Authored by: JLG on Mon, Oct 26 2009 at 3:19PM PDT
This is the way to go. Apparently Snow Leopard is VERY restrictive when it comes to where it allows this printer driver to write files.

Edit /etc/cups/cups-pdf.conf and put a "#" in front of any "Out" or "AnonDirName" entry (thus commenting them out). The default cups-pdf values (pointing to /var/spool/cups-pdf) will work best here.

Create the cups-pdf printer.

Print a test job to your new printer.

Run the following command:
sudo ln -s /var/spool/cups-pdf/username /Users/username/cups-pdf
(replacing "username" with your username)

Now, you should be able to see your PDF files in the "cups-pdf" folder in your home directory.

[ Reply to This | # ]