Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Add cups-pdf to hplip extension, Script needs modification< Next Oldest | Next Newest >
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 08 2008,14:17 QUOTE

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?
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 15 2008,09:51 QUOTE

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.
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: April 15 2008,18:06 QUOTE

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)
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: April 16 2008,03:41 QUOTE

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?
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: April 16 2008,07:51 QUOTE

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.
Back to top
Profile PM 
9 replies since Jan. 11 2008,13:33 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: Add cups-pdf to hplip extension

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code