howto setup a booklet printer
Helge Blischke
h.blischke at srz.de
Thu Sep 28 03:31:39 PDT 2006
luc castermans wrote:
>>luc castermans wrote:
>>
>>>>luc castermans wrote:
>>>>
>>>>
>>>>>>>Thanks Helge ! In which file should I insert these lines,
>>>>>>>guess in some .PPD file, right ?
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>Yes, in the printer's PPD, of course. Sorry, forgot to mention that-
>>>>>
>>>>>
>>>>>in HP-LaserJet_1320-hpijs.ppd I find following section:
>>>>>
>>>>>
>>>>>*cupsVersion: 1.0
>>>>>*cupsManualCopies: True
>>>>>*cupsModelNumber: 2
>>>>>*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
>>>>>*%pprRIP: foomatic-rip other
>>>>>*ModelName: "HP LaserJet 1320"
>>>>>*ShortNickName: "HP LaserJet 1320 hpijs"
>>>>>
>>>>>
>>>>>Should I insert the new cupsFilter line after the already existing one.
>>>>>Or should it be put at another place.
>>>>>
>>>>>Thanks,
>>>>>
>>>>>Luc
>>>>>
>>>>
>>>>AFAIK, you may only specify one filter in the PPD.So you'd have to write a
>>>>wrapper filter that
>>>>(1) executes your booklet creating commands
>>>>(2) calls foomatic-rip with the output of the former as input.
>>>
>>>
>>>I've following script now, but still something, wrong as I get no output. As per your tip I call foomatic-rip last in chain.
>>>
>>>#!/bin/sh
>>>
>>># Installation directories...
>>>prefix=/usr
>>>exec_prefix=${prefix}
>>>bindir=${exec_prefix}/bin
>>>
>>>#set -x -v
>>>
>>># See if we have a filename on the command-line...
>>>if test -z "$6"; then
>>> $bindir/psbook -q | $bindir/psnup -q -2 | $bindir/pstops -q "2:0 at 1.0(-0.00cm,0.0cm),1U at 1.0(21cm,29.7cm)" | /usr/bin/foomatic-rip $1 $2 $3 $4 $5
>>>else
>>> $bindir/psbook -q "$6" | $bindir/psnup -q -2 | $bindir/pstops -q "2:0 at 1.0(-0.00cm,0.0cm),1U at 1.0(21cm,29.7cm)" | /usr/bin/foomatic-rip $1 $2 $3 $4 $5
>>>fi
>>>
>>>any hints, tips are welcome.
>>>
>>>thanks
>>>
>>>
>>>
>>
>> I guess you need to specify "application/postscript" in your cupsFilter line in your
>>printer's PPD, as you want to run the pstops filter *after* the booklet making, which seems to
>>be correct. Thus you must ensure that your filter script is the first (and only) one
>>that handles PostScript data.
>>
>>Perhaps you set the log level to debug in your cupsd.conf , issue a kill -HUP `pidof cupsd`
>>and post the relevant parts of your error_log.
>
>
>>Helge
>
>
> Thanks Helge, I've used a modified HP-LaserJet_1320-hpijs.ppd file,
> in which the cupsFilter line is replaced by, 1st line commented out:
>
> *%cupsFilter: "application/vnd.cups-postscript 0 boekje"
> *cupsFilter: "application/postscript 0 boekje"
>
> ('boekje' stands for 'Buechlein oder ein kleines Buch')
>
> .. snippet from error_log
>
> I [27/Sep/2006:22:28:49 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=19471)
> I [27/Sep/2006:22:28:54 +0200] Started filter /usr/lib/cups/filter/boekje (PID 19472) for job 1064.
> I [27/Sep/2006:22:28:54 +0200] Started backend /usr/lib/cups/backend/lpd (PID 19476) for job 1064.
> E [27/Sep/2006:22:28:55 +0200] PID 19472 (/usr/lib/cups/filter/boekje) stopped with status 3!
> I [27/Sep/2006:22:28:55 +0200] Hint: Try setting the LogLevel to "debug" to find out more.
>
>
> can I sent error_log per E-mail to you, it is getting rather
> big to post on this site?
>
> thanks
>
> Luc
>
>
Yes, of course.
Helge
--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
More information about the cups
mailing list