CUPS - setup and usage?

Helge Blischke h.blischke at acm.org
Thu Jan 27 06:45:08 PST 2011


dickson wrote:

>> dickson wrote:
>>
>> >> dickson wrote:
>> >>
>> >> > Dear all,
>> >> >
>> >> > Please help to verify my understanding about usage and setup of CUPS
>> >> > in Red Hat (Linux). Thanks.
>> >> >
>> >> > Installed package
>> >> > ---------------------
>> >> > hal-cups-utils-0.5.2-8
>> >> > libgnomecups-0.1.12-5
>> >> > cups-libs-1.1.22-0.rc1.9.10
>> >> > cups-1.1.22-0.rc1.9
>> >> > cups-1.1.22-0.rc1.9.10
>> >> >
>> >> > If I setup a Epson dot matrix printer "abc" in CUPS with filter
>> >> > "zn-TW",
>> >> >
>> >> > 1. a printer set in CUPS can accept any document type (pdf, text
>> >> > with Chinese characters) because CUPS will automatically convert it
>> >> > to ps format. Is it right?
>> >> >
>> >> > 2. Or I must convert these file to ps first and then sent to that
>> >> > printer?
>> >> >
>> >> > 3. under /usr/lib/cups/filter/, a lot of program (texttops, ...etc)
>> >> > are there. What is "option" when use these command? As I try to
>> >> > convert a UTF-8 Chinese character text file to ps, ps is generated
>> >> > but only have English character.
>> >>
>> >> I think you should upgrade at least to CUPS 1.3.x.
>> >>
>> >> Then it should be a matter of which font set you use for the texttops
>> >> filter in your installation. In case you have questions then, I think
>> >> I could give you some hints.
>> >>
>> >> Helge
>> >>
>> >
>> > Thanks for your help, Helge.
>> > I install CUPS 1.4.6 and then try to print the pdf document directly.
>> > In version 1.4.6, there is no place/area for me to set the
>> > locale-filter. Does it mean that there is no need to manually set the
>> > filter. (Because in 1.1.2, I can set this printer queue to use zh_TW,
>> > the other use zh_CN) For 1.4.6 CUPS, the print job still fails because
>> > the process "pdftops" fails during printing. The message is in the
>> > error_log of CUPS as follows:
>> >
>> > *****************************************************************
>> > D [25/Jan/2011:15:59:41 +0800] [Job 50] renderer PID kid4=21613
>> > D [25/Jan/2011:15:59:41 +0800] [Job 50] renderer command: gs -q
>> > -dPARANOIDSAFER -dBATCH -dNOPAUSE -sOutputFile=- -sDEVICE=omni
>> > -sDeviceName=Epson_LQ_1050___360_dpi_ -sproperties="
>> > Form=iso_a3_297.00x420.00mm InputTray=Tray-2 media=MEDIA_PLAIN
>> > Resolution=360x180 printmode=PRINT_MODE_1_ANY
>> > dither=dither=DITHER_LEVEL Rotation=Portrait" - D [25/Jan/2011:15:59:41
>> > +0800] [Job 50] D
>> > [25/Jan/2011:15:59:41 +0800] [Job 50] Closing renderer D
>> > [25/Jan/2011:15:59:41 +0800] [Job 50] foomatic-gswrapper: gs
>> > '-dPARANOIDSAFER' '-dBATCH' '-dNOPAUSE' '-sOutputFile=/dev/fd/3'
>> > '-sDEVICE=omni' '-sDeviceName=Epson_LQ_1050___360_dpi_' '-sproperties=
>> > Form=iso_a3_297.00x420.00mm InputTray=Tray-2 media=MEDIA_PLAIN
>> > Resolution=360x180 printmode=PRINT_MODE_1_ANY
>> > dither=dither=DITHER_LEVEL Rotation=Portrait' '/dev/fd/0' 3>&1 1>&2 D
>> > [25/Jan/2011:15:59:42 +0800]
>> > [Job 50] GNU Ghostscript 7.07 (2003-05-17)
>> > D [25/Jan/2011:15:59:42 +0800] [Job 50] Copyright (C) 2003 artofcode
>> > LLC,
>> > Benicia, CA.  All rights reserved. D [25/Jan/2011:15:59:42 +0800] [Job
>> > 50] This software comes with NO WARRANTY: see the file PUBLIC for
>> > details. D
>> > [25/Jan/2011:15:59:42 +0800] [Job 50] Loading NimbusRomNo9L-Regu font
>> > [from
>> > /usr/share/fonts/default/Type1/n021003l.pfb... 2492060 1116166 1662616
>> > 356238 0 done. D [25/Jan/2011:15:59:42 +0800] [Job 50] Using
>> > NimbusRomanNo9L-Regu font for NimbusRomNo9L-Regu. D
>> > [25/Jan/2011:15:59:42 +0800] [Job 50] Loading NimbusSanL-Regu font from
>> > /usr/share/fonts/default/Type1/n019003l.pfb... 2867020 1460804 1682712
>> > 367446 0 done. D [25/Jan/2011:15:59:42 +0800] [Job 50] Using
>> > NimbusSansL-Regu font for NimbusSanL-Regu. D [25/Jan/2011:15:59:43
>> > +0800] PID 21606 (/usr/lib/cups/filter/foomatic-rip) stopped with
>> > status 3! D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] Error: /undefined in
>> > [Unrecoverable D 25/Jan/2011:15:59:43 +0800] [Job 50] Operand stack: D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] D [25/Jan/2011:15:59:43 +0800]
>> > [[Job
>> > 50] Execution stack:
>> > D [25/Jan/2011:15:59:43 +0800] [Job 50] %interp_exit   .runexec2
>> > --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
>> > --nostringval--   --nostringval--   --nostringval--   false   1
>> > %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3
>> > %oparray_pop   1   3   %oparray_pop   .runexec2   --nostringval--
>> > --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
>> > --nostringval--   --nostringval-- D [25/Jan/2011:15:59:43 +0800] [Job
>> > 50] Dictionary stack:
>> > D [25/Jan/2011:15:59:43 +0800] [Job 50] --dict:1073/1123(ro)(G)--
>> > --dict:0/20(G)--   --dict:98/200(L)-- D [25/Jan/2011:15:59:43 +0800]
>> > [Job 50] Current allocation mode is local D [25/Jan/2011:15:59:43
>> > +0800] [Job 50] Last OS error: 2 D [25/Jan/2011:15:59:43 +0800] [Job
>> > 50] GNU Ghostscript 7.07: Unrecoverable error, exit code 1 D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] renderer return value: 1 D
>> > [25/Jan/2011:15:59:43 +0800]
>> > [Job 50] renderer received signal: 1 D [25/Jan/2011:15:59:43 +0800]
>> > [[Job
>> > 50] Process dying with "Possible error on renderer command line or
>> > PostScript error. Check options.", exit stat: 3 D [25/Jan/2011:15:59:43
>> > +0800] [Job 50] Possible error on renderer command line or PostScript
>> > error. Check options. D [25/Jan/2011:15:59:43 +0800] [Job 50] tail
>> > process done writing data to STDOUT D [25/Jan/2011:15:59:43 +0800] [Job
>> > 50] KID4 finished D [25/Jan/2011:15:59:43 +0800] [Job 50] KID3 exited
>> > with status 3 D [25/Jan/2011:15:59:43 +0800] [Job 50] Renderer exit
>> > stat: 3 D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] Renderer process finished D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] Killing process 21612 (KID3) D
>> > [25/Jan/2011:15:59:43 +0800] [Job 50] Process dying with "Error closing
>> > renderer", exit stat: 3 D [25/Jan/2011:15:59:43 +0800] [Job 50] Error
>> > closing renderer
>> > *****************************************************************
>> >
>> >
>> > I am not sure that the failure reason is related to "Ghostscript"
>> > version or missing Chinese fonts, or others. Anyone know why?
>> >
>> > Thanks a lot.
>>
>> From the excerpt of your error_log, I conclude that one of the filters
>> preceding the pstops filter (presumably the pdftops filter) failed and
>> wrote an error message to standard output (which probably started with
>> the line
>>
>> Unrecoverable error ...)
>>
>> which  in turn caused Ghostscript to complain when interpreting this as
>> PostScript input.
>>
>> Please do the following:
>>
>> (1) post the error log from the beginning of that (or a similarly
>> failing) job, beginning with a line containing "autotyping file" or the
>> like.
>>
>> (2) post (an URL to) the (or a similarly failing) PDF for me to look
>> into,
>>
>> I need this information to dig more deeply into your issue.
>>
>> Helge
>>
>>
>>
> -----------------------------------------------------------------------------
> 27-Jan-2011
> Dear Helge,
> Thanks for your help.
> 
> (1) The following log is the complete log from cups
> 
> *************************************************************************
> D [27/Jan/2011:11:26:22 +0800] cupsdAcceptClient: 9 from localhost:631
> (IPv4) D [27/Jan/2011:11:26:22 +0800] cupsdReadClient: 9 POST / HTTP/1.1
> D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState: Active clients
> D [27/Jan/2011:11:26:22 +0800] cupsdAuthorize: No authentication data
> provided. D [27/Jan/2011:11:26:22 +0800] cupsdReadClient: 9 1.1
> Get-Printer-Attributes 1 D [27/Jan/2011:11:26:22 +0800]
> Get-Printer-Attributes ipp://localhost:631/printers/isp1_tw D
> [27/Jan/2011:11:26:22 +0800] Returning IPP successful-ok for
> Get-Printer-Attributes (ipp://localhost:631/printers/isp1_tw) from
> localhost D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState: Not busy D
> [27/Jan/2011:11:26:22 +0800] cupsdReadClient: 9 POST /printers/isp1_tw
> HTTP/1.1 D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState: Active clients
> D [27/Jan/2011:11:26:22 +0800] cupsdAuthorize: No authentication data
> provided. D [27/Jan/2011:11:26:22 +0800] cupsdReadClient: 9 1.1 Create-Job
> 1 D [27/Jan/2011:11:26:22 +0800] Create-Job
> ipp://localhost:631/printers/isp1_tw D [27/Jan/2011:11:26:22 +0800]
> cupsdMarkDirty(----J-) D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState:
> Active clients and dirty files D [27/Jan/2011:11:26:22 +0800] add_job:
> requesting-user-name="root" I [27/Jan/2011:11:26:22 +0800] [Job 64] Adding
> start banner page "none". D [27/Jan/2011:11:26:22 +0800] Discarding unused
> job-created event... I [27/Jan/2011:11:26:22 +0800] [Job 64] Queued on
> "isp1_tw" by "root". D [27/Jan/2011:11:26:22 +0800] Returning IPP
> successful-ok for Create-Job (ipp://localhost:631/printers/isp1_tw) from
> localhost D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState: Dirty files D
> [27/Jan/2011:11:26:22 +0800] cupsdReadClient: 9 POST /printers/isp1_tw
> HTTP/1.1 D [27/Jan/2011:11:26:22 +0800] cupsdSetBusyState: Active clients
> and dirty files D [27/Jan/2011:11:26:22 +0800] cupsdAuthorize: No
> authentication data provided. D [27/Jan/2011:11:26:22 +0800]
> cupsdReadClient: 9 1.1 Send-Document 1 D [27/Jan/2011:11:26:23 +0800]
> Send-Document ipp://localhost:631/printers/isp1_tw D [27/Jan/2011:11:26:23
> +0800] cupsdIsAuthorized: requesting-user-name="root" D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Auto-typing file... D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Request file type is
> application/pdf. D [27/Jan/2011:11:26:23 +0800] cupsdMarkDirty(----J-) I
> [27/Jan/2011:11:26:23 +0800] [Job 64] File of type application/pdf queued
> by "root". I [27/Jan/2011:11:26:23 +0800] [Job 64] Adding end banner page
> "none". D [27/Jan/2011:11:26:23 +0800] cupsdMarkDirty(----J-) D
> [27/Jan/2011:11:26:23 +0800] cupsdMarkDirty(----J-) D
> [27/Jan/2011:11:26:23 +0800] cupsdSetBusyState: Active clients, printing
> jobs, and dirty files D [27/Jan/2011:11:26:23 +0800] Discarding unused
> printer-state-changed event... D [27/Jan/2011:11:26:23 +0800] [Job 64]
> job-sheets=none,none D [27/Jan/2011:11:26:23 +0800] [Job 64]
> argv[0]="isp1_tw" D [27/Jan/2011:11:26:23 +0800] [Job 64] argv[1]="64" D
> [27/Jan/2011:11:26:23 +0800] [Job 64] argv[2]="root" D
> [27/Jan/2011:11:26:23 +0800] [Job 64] argv[3]="BPVD-V19a-AE.pdf" D
> [27/Jan/2011:11:26:23 +0800] [Job 64] argv[4]="1" D [27/Jan/2011:11:26:23
> +0800] [Job 64] argv[5]="finishings=3 number-up=1
> job-uuid=urn:uuid:35305ab1-a962-3cf7-756e-c828a0e5ea37
> job-originating-host-name=localhost time-at-creation=1296098782
> time-at-processing=1296098783 AP_D_InputSlot=" D [27/Jan/2011:11:26:23
> +0800] [Job 64] argv[6]="/var/spool/cups/d00064-001" D
> [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[0]="CUPS_CACHEDIR=/var/cache/cups" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[1]="CUPS_DATADIR=/usr/share/cups" D [27/Jan/2011:11:26:23
> +0800] [Job 64] envp[2]="CUPS_DOCROOT=/usr/share/doc/cups" D
> [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[3]="CUPS_FONTPATH=/usr/share/cups/fonts" D [27/Jan/2011:11:26:23
> +0800] [Job 64] envp[4]="CUPS_REQUESTROOT=/var/spool/cups" D
> [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[5]="CUPS_SERVERBIN=/usr/lib/cups" D [27/Jan/2011:11:26:23 +0800] [Job
> 64] envp[6]="CUPS_SERVERROOT=/etc/cups" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[7]="CUPS_STATEDIR=/var/run/cups" D [27/Jan/2011:11:26:23
> +0800] [Job 64] envp[8]="HOME=/var/spool/cups/tmp" D [27/Jan/2011:11:26:23
> +0800] [Job 64]
> envp[9]="PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin" D
> [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[10]="SERVER_ADMIN=root at isz195.ust.hk" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[11]="SOFTWARE=CUPS/1.4.6" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[12]="TMPDIR=/var/spool/cups/tmp" D [27/Jan/2011:11:26:23
> +0800] [Job 64] envp[13]="TZ=Asia/Hong_Kong" D [27/Jan/2011:11:26:23
> +0800] [Job 64] envp[14]="USER=root" D [27/Jan/2011:11:26:23 +0800] [Job
> 64] envp[15]="CUPS_SERVER=localhost" D [27/Jan/2011:11:26:23 +0800] [Job
> 64] envp[16]="CUPS_ENCRYPTION=IfRequested" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[17]="IPP_PORT=631" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[18]="CHARSET=utf-8" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[19]="LANG=en_US.UTF-8" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[20]="PPD=/etc/cups/ppd/isp1_tw.ppd" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[21]="RIP_MAX_CACHE=8m" D [27/Jan/2011:11:26:23 +0800] [Job
> 64] envp[22]="CONTENT_TYPE=application/pdf" D [27/Jan/2011:11:26:23 +0800]
> [Job 64] envp[23]="DEVICE_URI=socket://isp1.ust.hk:9100" D
> [27/Jan/2011:11:26:23 +0800] [Job 64] envp[24]="PRINTER_INFO=Created by
> redhat-config-printer 0.6.x" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[25]="PRINTER_LOCATION=" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[26]="PRINTER=isp1_tw" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[27]="CUPS_FILETYPE=document" D [27/Jan/2011:11:26:23 +0800] [Job 64]
> envp[28]="FINAL_CONTENT_TYPE=printer/isp1_tw" I [27/Jan/2011:11:26:23
> +0800] [Job 64] Started filter /usr/lib/cups/filter/pdftops (PID 15994) I
> [27/Jan/2011:11:26:23 +0800] [Job 64] Started filter
> /usr/lib/cups/filter/pstoraster (PID 15995) I [27/Jan/2011:11:26:23 +0800]
> [Job 64] Started filter /usr/lib/cups/filter/rastertoepson (PID 15997) I
> [27/Jan/2011:11:26:23 +0800] [Job 64] Started backend
> /usr/lib/cups/backend/socket (PID 15998) D [27/Jan/2011:11:26:23 +0800]
> Discarding unused job-state-changed event... D [27/Jan/2011:11:26:23
> +0800] Returning IPP successful-ok for Send-Document
> (ipp://localhost:631/printers/isp1_tw) from localhost D
> [27/Jan/2011:11:26:23 +0800] cupsdSetBusyState: Printing jobs and dirty
> files D [27/Jan/2011:11:26:23 +0800] [Job 64] Started filter gs (PID
> 15999) D [27/Jan/2011:11:26:23 +0800] [Job 64] Started filter pstops (PID
> 16000) D [27/Jan/2011:11:26:23 +0800] cupsdReadClient: 9 WAITING Closing
> on EOF D [27/Jan/2011:11:26:23 +0800] cupsdCloseClient: 9 D
> [27/Jan/2011:11:26:23 +0800] [Job 64] STATE: +connecting-to-device D
> [27/Jan/2011:11:26:23 +0800] Discarding unused printer-state-changed
> event... D [27/Jan/2011:11:26:23 +0800] [Job 64] Looking up
> "isp1.ust.hk"... I [27/Jan/2011:11:26:23 +0800] [Job 64] Starting GPL
> Ghostscript 9.00...
> D [27/Jan/2011:11:26:23 +0800] [Job 64] Running /usr/local/bin/gs -dQUIET
> -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOMEDIAATTRS -sDEVICE=cups
> -sstdout=%stderr -sOUTPUTFILE=%stdout -c  -f -_ D [27/Jan/2011:11:26:23
> +0800] Discarding unused job-progress event... D [27/Jan/2011:11:26:23
> +0800] Discarding unused printer-state-changed event... D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Connecting to isp1.ust.hk:9100 I
> [27/Jan/2011:11:26:23 +0800] [Job 64] Connecting to printer... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused job-progress event... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused printer-state-changed
> event... D [27/Jan/2011:11:26:23 +0800] cupsdMarkDirty(P-----) D
> [27/Jan/2011:11:26:23 +0800] Discarding unused printer-state-changed
> event... I [27/Jan/2011:11:26:23 +0800] [Job 64] Start rendering... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused job-progress event... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused printer-state-changed
> event... I [27/Jan/2011:11:26:23 +0800] [Job 64] Processing page 1... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused job-progress event... D
> [27/Jan/2011:11:26:23 +0800] Discarding unused printer-state-changed
> event... D [27/Jan/2011:11:26:23 +0800] [Job 64] Page = 612x792; 18,18 to
> 594,774 D [27/Jan/2011:11:26:23 +0800] [Job 64] slow_collate=0,
> slow_duplex=0, slow_order=0 W [27/Jan/2011:11:26:23 +0800] [Job 64] This
> document does not conform to the Adobe Document Structuring Conventions
> and may not print correctly! D [27/Jan/2011:11:26:23 +0800] [Job 64] Set
> job-printer-state-message to "This document does not conform to the Adobe
> Document Structuring Conventions and may not print correctly!", current
> level=WARN D [27/Jan/2011:11:26:23 +0800] Discarding unused job-progress
> event... D [27/Jan/2011:11:26:23 +0800] Discarding unused
> printer-state-changed event... D [27/Jan/2011:11:26:23 +0800] [Job 64] PID
> 16000 (pstops) exited with no errors. D [27/Jan/2011:11:26:23 +0800] [Job
> 64] PID 15999 (gs) stopped with status 255! D [27/Jan/2011:11:26:23 +0800]
> PID 15994 (/usr/lib/cups/filter/pdftops) stopped with status 255! D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Error: /undefined in Unrecoverable D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Operand stack: D
> [27/Jan/2011:11:26:23 +0800] [Job 64] D [27/Jan/2011:11:26:23 +0800] [Job
> 64] Execution stack:
> D [27/Jan/2011:11:26:23 +0800] [Job 64] %interp_exit   .runexec2  
> --nostringval--   --nostringval--   --nostringval--   2   %stopped_push  
> --nostringval--   --nostringval--   --nostringval--   false   1  
> %stopped_push   1910   1   3   %oparray_pop   1909   1   3   %oparray_pop 
>  1893   1   3   %oparray_pop   1787   1   3   %oparray_pop  
> --nostringval--   %errorexec_pop   .runexec2   --nostringval--  
> --nostringval--   --nostringval--   2   %stopped_push   --nostringval-- D
> [27/Jan/2011:11:26:23 +0800] [Job 64] Dictionary stack:
> D [27/Jan/2011:11:26:23 +0800] [Job 64] --dict:1155/1684(ro)(G)--  
> --dict:0/20(G)--   --dict:83/200(L)-- D [27/Jan/2011:11:26:23 +0800] [Job
> 64] Current allocation mode is local D [27/Jan/2011:11:26:23 +0800] [Job
> 64] Last OS error: 2
> D [27/Jan/2011:11:26:23 +0800] [Job 64] GPL Ghostscript  9.00:
> Unrecoverable error, exit code 1 I [27/Jan/2011:11:26:23 +0800] [Job 64]
> Rendering completed D [27/Jan/2011:11:26:23 +0800] Discarding unused
> job-progress event... D [27/Jan/2011:11:26:23 +0800] Discarding unused
> printer-state-changed event... E [27/Jan/2011:11:26:23 +0800] [Job 64] No
> pages found! D [27/Jan/2011:11:26:23 +0800] Discarding unused job-progress
> event... D [27/Jan/2011:11:26:23 +0800] Discarding unused
> printer-state-changed event... D [27/Jan/2011:11:26:23 +0800] PID 15997
> (/usr/lib/cups/filter/rastertoepson) stopped with status 1! D
> [27/Jan/2011:11:26:23 +0800] PID 15995 (/usr/lib/cups/filter/pstoraster)
> stopped with status 1! D [27/Jan/2011:11:26:28 +0800] Discarding unused
> printer-state-changed event... D [27/Jan/2011:11:26:28 +0800] Report:
> clients=0 D [27/Jan/2011:11:26:28 +0800] Report: jobs=2 D
> [27/Jan/2011:11:26:28 +0800] Report: jobs-active=1 D [27/Jan/2011:11:26:28
> +0800] Report: printers=3 D [27/Jan/2011:11:26:28 +0800] Report:
> printers-implicit=0 D [27/Jan/2011:11:26:28 +0800] Report:
> stringpool-string-count=768 D [27/Jan/2011:11:26:28 +0800] Report:
> stringpool-alloc-bytes=8576 D [27/Jan/2011:11:26:28 +0800] Report:
> stringpool-total-bytes=16712 D [27/Jan/2011:11:26:38 +0800] Discarding
> unused printer-state-changed event... I [27/Jan/2011:11:26:53 +0800]
> Saving printers.conf... I [27/Jan/2011:11:26:53 +0800] Saving job cache
> file "/var/cache/cups/job.cache"... D [27/Jan/2011:11:26:53 +0800]
> cupsdSetBusyState: Printing jobs D [27/Jan/2011:11:26:53 +0800] Discarding
> unused printer-state-changed event...
> ******************************************************************************
> 
> (2) you can view/download this pdf from the following url:
> http://www.labour.gov.hk/eng/form/bpvd/BPVD-V19a-AE.pdf
> 
> (3) questions for exploring my problem:
>     (i) CUPS1.4.6 need Ghostscirpt (must be installed)?
>     (ii) Does CUPS use filter-locale to print UTF8 (Chinese character)?
>          Or it can print the document (pdf, text, ps) with automatically
>          conversion ( I don't need to set anything)?
>     (iii) Does Redhat4.0 need to install the related fonts?

Thanks for the sample file. The results I got so far are as follows:

*  The PDF is perfectly OK, and the chinese fonts are properly included
    (only the TimesNewRoman fonts are not included, but these, or equivalent ones,
    are installed by default on every Linux system).
*   But the chinese fonts are embedded in the PDF as (subsetted) CID fonts, which older
    versions of Ghostscript may be unable to process.
*   Obviously, you have two different Ghostscript instances installed on your system:
    one under the path /usr/bin/gs (which gets invoked by the pdftops filter of your CUPS 1.4.6),
    one under the path /usr/local/bin/gs (version 9.00 which is invoked by the pstoraster filter).
*   The ghostscript instance invoked from the pdftops filter exited with the exit code 255,
    which means when processing the input PDF, an error occurred the cause of which is
    unknown to the running ghostscript. That leads me to the suspicion that it is a quite old
    version which cannot cope with the CID fonts embedded in the PDF.

To further inventigation, could you please execute (from a terminal)

/usr/bin/gs -h

and post the complete output (probably a couple of tenth of lines)?

I cannot determine if the old ghostscript instance needs to be retained because of (maybe)
special properties, so I'd suggest to try the following steps (as root):

(1) rename the old ghostscript instance to, say, gsold by:
mv /usr/bin/gs /usr/bin/gsold

(2) make your gs 9.00 the default ghostscript instance for CUPS by
ln -s /usr/local/bin/gs /usr/bin/gs

Another approach would be to edit the cups startup script (probably /etc/init.d/cups) and insert 
a statement to insert /usr/local/bin preceding /usr/bin in the PATH environment variable.
But I'd need to see that script before I could give you a recommendation for this.

Helge





More information about the cups mailing list