Error about Ghostscript

chris zqy2000zqy at gmail.com
Mon Oct 15 22:14:02 PDT 2007


> chris wrote:
> >> chris schrieb:
> >>> I build cups gs hpijs.. and run in the Embedded System
> >>>
> >>> When I start cupsd and run lp to print a text file , I have the error_log as below,  error is at tail.
> >>>
> >>>
> >>> But if I first run texttops generate a ps file, and then use gs to generate pcl file, then use lp to print this pcl file. I can get the printed file.
> >>> D [15/Oct/2007:20:48:35 +0000] [Job 2] renderer command: gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 3600" -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=1 -dIjsUseOutputFD -sOutputFile=- -
> >>> D [15/Oct/2007:20:48:39 +0000] [Job 2] foomatic-gswrapper: gs '-sstdout=%stderr' '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=deskjet 3600' '-dDEVICEWIDTHPOINTS=612' '-dDEVICEHEIGHTPOINTS=792' '-r300' '-sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=1' '-dIjsUseOutputFD' '-sOutputFile=%stdout' '-'
> >>> D [15/Oct/2007:20:48:40 +0000] [Job 2]
> >>> D [15/Oct/2007:20:48:40 +0000] [Job 2] Closing renderer
> >>> D [15/Oct/2007:20:48:41 +0000] [Job 2] unable to create Job object err=3
> >>> D [15/Oct/2007:20:48:41 +0000] [Job 2] Segmentation fault
> >> Ouch - something dies here rather badly.
> >>
> >> Can you run all that commands in a pipe successfully?
> >>
> >> texttops ... | gs ... | lp ...
> >>
> >>
> >> --
> >> Tomasz Chmielewski
> >> http://wpkg.org
> >>
> >
> >
> > Now I texttops ... generate a ps file
> > and run gs ... -sOutputFile=xxx.pcl xxx.ps
> > and lp -o raw xxx.pcl
> >
> > How run all that in a pipe?
> > texttops ...  | gs -sOutputFile=xxx.pcl  ?    this mybe wrong
> > Thanks
>
>
> * You need to use all commandline parameters that you use from the lp/lpr
>   commandline as well.
>
> * You need to specifiy all the default parameters that are stored in
>   ~/.cups/lpoptions and in /etc/cups/lpoptions.
>
> * You need to set the env var PPD to the same ppd that your printer uses.
>
> * You need to run each filter with the CUPS-required arguments, in the
>   same order.
>
> Unfortunately, foomatic-rip does not always behave like a standard CUPS
> filter should behave (using 5 or 6 arguments in a given order, that is
> shown if you run any of the other CUPS filters with zero arguments). At
> least I've seen versions which were not that easy to run on the command
> line. You need to supply additional env vars on the commandline (like
> CUPS_SERVER) to make it behave like a CUPS filter.
>
>
> Example:
> --------
>
> commandline to print was
>
>    lp -d printername \
>       -o PageSize=A3 \
>       -o prettyprint=true \
>       /home/zyq/text.txt
>
> lpoptions -d printername returns a line of
>
>    page-top=33 page-bottom=40 page-left=50 page-right=20 landscape=true
>
> then your procedure should be like this:
>
> params="page-top=33 \
>        page-bottom=40 \
>        page-left=50 \
>        page-right=20 \
>        landscape=true \
>        PageSize=A3 \
>        prettyprint=true"
>
> args="22 someone my_jobtitle 1 \"${params}\""
> (where: "22" is the fake job ID,
>         "someone"  is the fake user name,
>         "my_jobtitle" the fake job title
>         "1" is the number of requested job copies)
>
> and your pipeline would be
>
> PPD=/etc/cups/ppd/printername.ppd \
>     /usr/lib/cups/filter/texttops "${args}" /home/zyq/text.txt \
>     | /usr/lib/cups/filter/pstops "${args}" \
>     | /usr/lib/cups/filter/foomatic-rip "${args}" \
>     | tee resulting-printfile.prn
>
> resulting-printfile.prn is now the file that s




More information about the cups mailing list