CUPS-PDF Produces no output?

I have installed CUPS-PDF on my new Mac running Snow Leopard 10.6.8 and believe I have everything configured correctly. Here are key settings from /etc/cups/cups-pdf.conf file;


Out /var/spool/cups-pdf/${USER}


Spool /var/spool/cups-pdf/SPOOL


GhostScript /usr/bin/pstopdf


GSTmp /tmp


GSCall %s %s -o %s %s


PDFVer


Here are the owners / permissions of the SPOOL and output directories;


cd /var/spool


ls -ld cups-pdf

drwxr-xr-x 4 root wheel 136 Jun 7 22:08 cups-pdf


ls -l cups-pdf

drwxr-x--x 2 root wheel 68 Jul 18 08:44 SPOOL

drwxr-xr-x 2 root wheel 68 Jun 7 22:08 gbullman


Here are owners / permission on cups-pdf executable (I've tried with both chmod 0700 & 0500 permissions that I've found online);


cd /usr/libexec/cups/backend


ls -l cups-pdf

-rwx------ 1 root wheel 27480 Jul 15 16:39 cups-pdf


When I try to print to the CUPS-PDF print queue I've set up, everything appears to work fine, but no file is produced. Here is the log output with full logging level turned on;


Mon Jul 18 08:44:23 2011 [DEBUG] switching to new gid (wheel)

Mon Jul 18 08:44:23 2011 [DEBUG] initialization finished (v2.5.1)

Mon Jul 18 08:44:23 2011 [DEBUG] user identified (gbullman)

Mon Jul 18 08:44:23 2011 [DEBUG] output directory name generated (/var/spool/cups-pdf/gbullman)

Mon Jul 18 08:44:23 2011 [DEBUG] user information prepared

Mon Jul 18 08:44:23 2011 [DEBUG] spoolfile name created (/var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] source stream ready

Mon Jul 18 08:44:23 2011 [DEBUG] destination stream ready (/var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] owner set for spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] found beginning of postscript code (%!PS-Adobe-3.0)

Mon Jul 18 08:44:23 2011 [DEBUG] now extracting postscript code

Mon Jul 18 08:44:23 2011 [DEBUG] found title in ps code ((Untitled))

Mon Jul 18 08:44:23 2011 [DEBUG] found embedded (e)ps code (%!FontType1-1.0: FDQWDX+Monaco 1.0000.2.0000)

Mon Jul 18 08:44:23 2011 [DEBUG] found end of embedded (e)ps code (%%EOF)

Mon Jul 18 08:44:23 2011 [DEBUG] all data written to spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] trying to use PS title ((Untitled))

Mon Jul 18 08:44:23 2011 [DEBUG] removing trailing newlines from title ((Untitled))

Mon Jul 18 08:44:23 2011 [DEBUG] removing enclosing parentheses () from full title ((Untitled))

Mon Jul 18 08:44:23 2011 [DEBUG] removing special characters from title (Untitled)

Mon Jul 18 08:44:23 2011 [DEBUG] title successfully retrieved (job_53-Untitled)

Mon Jul 18 08:44:23 2011 [DEBUG] input data read from stdin

Mon Jul 18 08:44:23 2011 [DEBUG] output filename created (/var/spool/cups-pdf/gbullman/job_53-Untitled.pdf)

Mon Jul 18 08:44:23 2011 [DEBUG] ghostscript commandline built (/usr/bin/pstopdf -o /var/spool/cups-pdf/gbullman/job_53-Untitled.pdf /var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] output file unlinked (/var/spool/cups-pdf/gbullman/job_53-Untitled.pdf)

Mon Jul 18 08:44:23 2011 [DEBUG] TMPDIR set for GhostScript (/tmp)

Mon Jul 18 08:44:23 2011 [DEBUG] waiting for child to exit

Mon Jul 18 08:44:23 2011 [DEBUG] entering child process

Mon Jul 18 08:44:23 2011 [DEBUG] GID set for current user

Mon Jul 18 08:44:23 2011 [DEBUG] UID set for current user (gbullman)

Mon Jul 18 08:44:23 2011 [DEBUG] ghostscript has finished (3328)

Mon Jul 18 08:44:23 2011 [ERROR] failed to set file mode for PDF file (non fatal) (/var/spool/cups-pdf/gbullman/job_53-Untitled.pdf)

Mon Jul 18 08:44:23 2011 [DEBUG] ERRNO: 2

Mon Jul 18 08:44:23 2011 [DEBUG] no postprocessing

Mon Jul 18 08:44:23 2011 [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-841)

Mon Jul 18 08:44:23 2011 [DEBUG] all memory has been freed

Mon Jul 18 08:44:23 2011 [STATUS] PDF creation successfully finished (gbullman)


The only error is the one I've underlined above.


From what I've read online concerning that error message it is likely the .pdf file is not being generated or perhaps it is looking for something with permissions.


Does anyone have experience with CUPS-PDF and can offer additional things to look at & try to get this to work?


Thanks in advance.

17" MacBook Pro-OTHER, Mac OS X (10.6.8), iPhone 4 4.3.3, iPad 2 4.3.3

Posted on Jul 18, 2011 6:44 AM

Reply
3 replies

Jul 18, 2011 8:25 AM in response to gbullman

Where did you get CUPS PDF? The latest version writes files to /Users/Shared/CUPS-PDF/<user>.


Recent version of MacOS X introduced the sandbox security software that prevents 3rd party software from writing into your home directory the way CUPS PDF used to work.


Also, what are you trying to print? CUPS PDF will no longer let you print PDF files that have had print restricted by the author.

Jul 18, 2011 8:54 AM in response to etresoft

I obtained the version I'm trying to use in 2 parts; I downloaded the CUPS-PDF .mpkg from the site you linked to and did the initial install (cups-pdf version 2.5.0). Once that was not working I downloaded the source code for cups-pdf 2.5.1 from Freshmeat on this page. I compiled the cups-pdf executable per the instructions in the downloaded source (which included instructions for Mac OS) and placed it in /usr/libexec/cups/backend. Both the version in the .mpkg and the newly compiled one seem to have the same behavior.


My understanding was that the workaround for the Sandbox security was the writing of the output file to /var/spool/cups-pdf/${USER}, I thought the /Users/Shared/CUP-PDF/${USER} was for pre-sandboxed OS versions only.


I'm trying to print typical documents to PDF, no .pdf to .pdf. For testing purposes I'm trying to print a simple TextEdit text only doc. When I get past this and it is printing something I will typically use it to print documents from my Windows 7 virtual machine via VMware Fusion's Printing pass-thru. I seldom use this capability in Mac OS directly since the Save As PDF... works for those cases I want to save something as PDF.


I had this working on my previous Snow Leopard MacBook Pro and luckily have a clone of the image of that boot disk before I did a fresh OS install. Looks like it is time to do a piece by piece comparison of those 2 installs to see if I can find any differences.

Jul 18, 2011 9:13 AM in response to gbullman

Well I got it working. The only major difference I found and changed was that the Grp property in /etc/cups/cups-pdf.conf was staff on my old image and wheel on my new computer (I changed the new computer to staff). The ownership of /var/spool/cups-pdf and subdirectories was myuser:staff, but I'm not sure if that is because it was mounted and not the current boot disk of if that is what it really is. I changed my new computer to match the myuser:staff ownership of cups-pdf and below directories and now it is working with the 2.5.0 version of cups-pdf.


Hopefully this helps someone else.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

CUPS-PDF Produces no output?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.