Printing to file with CUPS.

Piotr piotrwie at gmail.erase-me.com
Wed Aug 9 06:42:22 PDT 2006


Hello Everyone.

It happends very rarely that I have to ask a forum question...
Unfortunately I have to give up with solving this myself.

I use Slackware 10.2 with default CUPS package (1.1.23).
As far as I know Pat's usual work - he tries Slackware's packages to be as much not-customized as it's possible. I trust him.
I'm quite experienced Linux user(hacker a little). I'm using slackware since it was version 4 or something...


My problem is, I want to set up my desktop to have a "dummy" local printer exporting printed stuff as PostScript (and PDF later).
I need postscript as a intermediate form of data pasted later to documents I prepare. I know that postscript is standard output of almost every unix program, but i _need_ it as a printed output file.

I've choosen CUPS.

I almost immediately (after ca. 2 hours of digging) found that default package doesn't have any file output ability. Googling a lot helped me here - I found some "pdf file backend". At this moment I learned what backend is. I've put it into the /var/lib/cups/backends directory, restarted cupsd with pkill -SIGHUP cupsd (which I assumed works - worked)... Someone told at this mail that this was removed due to security reasons... Is that true?

But still - postscript files weren't created. In fact I'm completly lost whith things I must fill in the URI? (what is URI???) file:// or other points. And why file:/ not file:///? ...

some 1,5 days later of reading about linux-printing (i really tried as it is in a school - from very basic beginning) I've found a beautiful page:
http://aplawrence.com/MacOSX/macosxcupstofile.html
explaining how someone did this...
But come on... Is it that difficult? that I have to loopback through TCP? and write dummy TCP service to grab what CUPS exports?...
There's a nice comment of one guy - --Terry. To make my own backend.
However... His guide, though very nice, did not work. After cups restart testpages disappeared in my system (no sign in /var/log/cups/*). In web interface (localhost:631)
when I try to "Configure printer" @ http://localhost:631/admin/?op=config-printer&printer_name=foofile (my printer's name is foofile) i got an error message saying:
Error: client-error-not-possible.

I've searched the "client-error-not-possible", and found that it maight be a problem with /etc/cups/cups.conf that I don't have a FileDevice Yes statement.
I've included this (although this magic option wasn't explained in any manual I was searching), but it didn't help...

I'm simply giving up. with such theoretically easy thing like single station, no-network, loopback printing...
Can someone explain me what did I do wrong?
And how's the printing process taking place with CUPS system?

I'm using linux mainly because it's free.

And buying a book for 50$ + shipment to Poland = 70$ is exactly a price for OEM Redmond's system which makes it flawlessly. A simple... magic... and really nice checkbox... "Print to file..." Where are you? my 70$ worth checkbox...

And I know CUPS is really hard to glue together. I admire the coders. Such system requires great great knowledge, etc. But...

I made shared internet connection with bandwith sharing - QoS on 2.2 kernel faimily with HTB queues a way faster on i486-100 machine that I do setting up printing on my PIII-1000... Is it really problem with me?...






More information about the cups mailing list