PCL input Filter with GhostPCL
kurt.pfeifle at infotec.com
Tue Jun 5 12:56:26 PDT 2007
> I have an legacy application (AS/400 based) that prints PCL output to cups. This works somewhat in RAW mode with PCL printers. But I want to use non-PCL printers and some of the more interesting CUPS features. So I went down the GhostPCL route which gets mentioned occasionaly here in the forum.
> The Idea is to see PCL as just another input format like PNG, TEXT or PDF and convert it to PS for further processing by CUPS.
> I compiled GhostPCL and wrote a cups input filter along this lines:
> bigwheel# cat /usr/local/libexec/cups/filter/pcltopdf
> #! /bin/sh
> [ -n "$6" ] && exec <"$6"
> /usr/local/bin/pcl6 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=- -
> By runing
> bigwheel# /usr/local/libexec/cups/filter/pcltopdf < test.pcl > test.pdf
> I veriefied the filter worked.
> Now I added simple PCL detection into /usr/local/etc/cups/mime.types and removed raw support:
> application/vnd.hp-PCL string(0,<1B>E<1B>)
> #application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
> I added the filter to /usr/local/etc/cups/mime.convs and restarted cups:
> application/vnd.hp-PCL application/pdf 65 pcl2pdf
> And get something like that:
> D [...] print_job: auto-typing file...
> D [...] print_job: request file type is application/vnd.hp-pcl.
> D [...] Print-Job client-error-document-format-not-supported: Unsupported format 'application/vnd.hp-pcl'!
> D [...] cupsdProcessIPPRequest: 14 status_code=40a (client-error-document-format-not-supported)
> /usr/local/bin/lpr: Unsupported format 'application/vnd.hp-pcl'!
> To me this indicates that the mime.convs configuration does not work as expected. Do I miss something here?
What about the upper-/lower-case difference of 'application/vnd.hp-PCL' and 'application/vnd.hp-pcl' (in your mime.convs file and in the log)?
Does it help if you lower-case the definition in mime.convs?
System & Network Printing Consultant --- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH - A RICOH Company ......... Stuttgart/Germany
More information about the cups