[cups] Printing a PWG Raster file

Michael Sweet msweet at apple.com
Fri Jun 12 05:08:36 PDT 2015


Jacob,

That is not supported by the current OS X filters.  The reporting of image/pwg-raster support and use of cgimagetopdf is an artifact of how the filter is (incorrectly) specified to work in the /usr/share/cups/mime/apple.convs file (image/* rule instead of selected formats).

Please file a bug:

    http://bugreport.apple.com

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

> On Jun 12, 2015, at 4:06 AM, Jacob Marble <jacobmarble at google.com> wrote:
> 
> I would like to print PWG Raster files.
> 
> Using OSX 10.10, queues have the following attribute:
> document-format-supported = ..., image/pwg-raster,...
> 
> I'm using the example .pwg files found at ftp.pwg.org.
> $ lp filename.pwg
> 
> Some (seemingly) relevant log lines follow, with my comments.
> 
> D [12/Jun/2015:00:45:46 -0700] [Job 34] 4 filters for job:
> D [12/Jun/2015:00:45:46 -0700] [Job 34] cgimagetopdf (image/pwg-raster to
> application/pdf, cost 25)
> D [12/Jun/2015:00:45:46 -0700] [Job 34] cgpdftops (application/pdf to
> application/postscript, cost 25)
> D [12/Jun/2015:00:45:46 -0700] [Job 34] pstops (application/postscript to
> application/vnd.cups-postscript, cost 66)
> D [12/Jun/2015:00:45:46 -0700] [Job 34] - (application/vnd.cups-postscript
> to printer/generic_ps, cost 0)
> d [12/Jun/2015:00:59:27 -0700] generic_ps: File
> "/usr/libexec/cups/filter/cgimagetopdf" permissions OK (040555/uid=0/gid=0).
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: Preparing to start
> "/usr/libexec/cups/filter/cgimagetopdf", arguments:
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[0] =
> "/usr/libexec/cups/daemon/cups-exec"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[1] = "-g"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[2] = "26"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[3] = "-n"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[4] = "0"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[5] = "-u"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[6] = "26"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[7] =
> "/private/var/spool/cups/tmp/10efd55805db3"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[8] =
> "/usr/libexec/cups/filter/cgimagetopdf"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[9] = "generic_ps"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[10] = "35"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[11] = "jacobmarble"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[12] = "olb1.pwg"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[13] = "1"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[14] = "finishings=3
> number-up=1 job-uuid=urn:uuid:295cad9b-5ad1-32c5-7ae5-1db126827a44
> job-originating-host-name=localhost time-at-creation=1434095967
> time-at-processing=1434095967"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: argv[15] =
> "/private/var/spool/cups/d00035-001"
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: Setting spawn attributes.
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: Setting file actions.
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: Calling posix_spawn.
> d [12/Jun/2015:00:59:27 -0700] cupsdStartProcess: pid=78065
> d [12/Jun/2015:00:59:27 -0700]
> cupsdStartProcess(command="/usr/libexec/cups/filter/cgimagetopdf",
> argv=0x7fff5bd8d010, envp=0x7fff5bd8f390, infd=-1, outfd=27, errfd=21,
> backfd=22, sidefd=24, root=0, profile=0x7fafe140eee0,
> job=0x7fafe1528c80(35), pid=0x7fafe1528d8c) = 78065
> I [12/Jun/2015:00:59:27 -0700] [Job 35] Started filter
> /usr/libexec/cups/filter/cgimagetopdf (PID 78065)
> 
> So gcimagetopdf should convert the PWG Raster to PDF format. After that,
> it's standard stuff.
> 
> D [12/Jun/2015:00:45:46 -0700] [Job 34] There was a problem reading the
> image file /private/var/spool/cups/d00034-001.
> D [12/Jun/2015:00:45:46 -0700] [Job 34] PID 77541
> (/usr/libexec/cups/filter/cgimagetopdf) stopped with status 1.
> E [12/Jun/2015:00:45:46 -0700] [Job 34] The file
> ‘/private/var/spool/cups/tmp/12ee65581b66f’ could not be opened.
> D [12/Jun/2015:00:45:46 -0700] [Job 34] PID 77542
> (/usr/libexec/cups/filter/cgpdftops) stopped with status 1.
> D [12/Jun/2015:00:45:46 -0700] [Job 34] The print file is empty.
> 
> gcimagetopdf fails because the file either couldn't be opened or was empty.
> Let's try the filter from the command line:
> 
> $ /usr/libexec/cups/filter/cgimagetopdf 0 me "job title" 1 "" olb1.pwg
> DEBUG: cgimagetopdf - document title: "job title"
> DEBUG: cgimagetopdf - filename: "olb1.pwg"...
> DEBUG: No size in ppd, assuming letter
> There was a problem reading the image file olb1.pwg.
> 
> Am I making a bad assumption that document-format-supported always speaks
> 100% truth?
> 
> *Should* this work?
> 
> I understand that PWG Raster support is mainly intended for IPP Everywhere,
> so the use case is a filter output, not a filter input. I need it for
> filter input.
> 
> Jacob
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list