System :: Add cups-pdf to hplip extension



Now the new cups extension is out the door, I seem to be making some progress on having a "pdf printer" available in cups using cups-pdf.

The pdf printer is automatically recognised by cups, the test page passes out of cups to cups-pdf, but appears to fail at the final hurdle due to some sort of permissions "issue".

If I examine the cups error_log and cut & paste the gs command from the middle of all the yada-yada to a terminal window, it will convert a ps file to pdf. If I try to paste the output to the cups-pdf spooler it fails:
Code Sample
$ gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/dsl/test.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /home/dsl/test.ps

[works OK]

$ gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/var/spool/cups-pdf/dsl/test.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /home/dsl/test.ps
**** Unable to open the initial device, quitting.

$ ls -l /var/spool
drwx--x---    3 root     staff          80 Apr  8 16:28 cups
drwxr-xr-x    5 root     root          120 Apr  8 16:36 cups-pdf

$ ls -l /var/spool/cups-pdf
drwxr-x--x    2 root     staff          60 Apr  8 16:41 SPOOL
drwx------    2 dsl      staff          60 Apr  8 16:36 dsl
drwx------    2 root     root           60 Apr  8 16:31 root

Note that my understanding of the normal process is that the print is spooled as a ps file in /var/spool/cups-pdf/SPOOL and then processed to /var/spool/cups-pdf/{user}/*.pdf

Any ideas?

As it turns out the whole problem was the gs/cups-pdf looks for /var/tmp to use for working files whereas dsl uses /tmp - aaaargh :p

I'll add the now working cups-pdf printer to the cups-1.3.5 extension.

iirc, earlier versions of DSL had /tmp point to /var/tmp...
but I guess you found a way to specify it
(I was just wondering if it could be useful to add /var/tmp back in)

Quote
but I guess you found a way to specify it

- /etc/cups/cups-pdf.conf allows you to set the gs tmp folder

Quote
earlier versions of DSL had /tmp point to /var/tmp

- since dsl uses /tmp, it might be better that /var/tmp -> /tmp?

Quote
- since dsl uses /tmp, it might be better that /var/tmp -> /tmp?
Yea, I was thinking on similar lines.  I was thinking it could be used for possible increased compatibility (though I haven't ran into something that specifically calls for /var/tmp), but that's just my thought... apparently it could be for this: http://www.pathname.com/fhs/2.2/fhs-5.15.html which would make sense for the default configuration of gs.

Next Page...
original here.