Re: strange gs problem: unicode encoding problem with pdf (?)
Florian,
sorry for the late response.
Am Mittwoch, 21. Mai 2008 schrieb Florian Kulzer:
> On Tue, May 20, 2008 at 22:41:26 +0200, Rainer Dorsch wrote:
> > Am Montag, 19. Mai 2008 schrieb Florian Kulzer:
> > > On Sun, May 18, 2008 at 23:30:15 +0200, Rainer Dorsch wrote:
> > > > Am Sonntag, 18. Mai 2008 schrieb Florian Kulzer:
> > > > > On Sat, May 17, 2008 at 23:47:06 +0200, Rainer Dorsch wrote:
> > > > > > Hello,
> > > > > >
> > > > > > I have a pdf file here which
> > > > > >
> > > > > > - Displays perfectly with kpdf
> > > > > > - Does not print from kpdf. This is because gs fails with this
> > > > > > file:
>
> [...]
>
> > > > /var/log/cups/error_log contains:
> > > >
> > > > E [18/May/2008:23:25:04 +0200] PID 16470
> > > > (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!
> > > > E [18/May/2008:23:25:04 +0200] [Job 117] Job stopped due to filter
> > > > errors.
> > > >
> > > >
> > > > The file prints from the linux acroread version.
> > > >
> > > > Is there a way to gather useful debug data?
> > >
> > > You can try to run
> > >
> > > foomatic-rip -v --ppd /etc/cups/ppd/$PRINTER.ppd KKA-DKB.pdf >
> > > test.printer
> > >
> > > and hope for helpful error messages.
> > >
> > > (Replace $PRINTER so that you get the correct name of the ppd file for
> > > your printer. This ppd file should be in /etc/cups/ppd/ and have the
> > > same name as the printer in CUPS.)
> >
> > Something seems to be broken here. Although pdfinfo detects correctly
> > that there are two pages to be printed foomatic-rip wants to print over
> > 100 pages, but does not give a useful error message:
> >
> > rd@blackbox:~/tmp.nobackup$ pdfinfo KKA-DKB.pdf
> > Author: User
> > Creator: DocBridge Mill/cpcold 2.05.01 (Apr 3 2008)
> > Producer: Compart MFFPDF I/O Filter 2008-04-03 01:29:23
> > CreationDate: Wed Apr 23 03:41:11 2008
> > ModDate: Wed Apr 23 03:41:11 2008
> > Tagged: no
> > Pages: 2
> > Encrypted: no
> > Page size: 612 x 841.9 pts
> > File size: 33527 bytes
> > Optimized: no
> > PDF version: 1.3
> > rd@blackbox:~/tmp.nobackup$
> >
> > rd@blackbox:~/tmp.nobackup$ foomatic-rip -v --ppd
> > /etc/cups/ppd/hplj6p.ppd KKA-DKB.pdf > /dev/null
> > foomatic-rip version $Revision$ running...
> > called with
> > arguments: '-v', '--ppd', '/etc/cups/ppd/hplj6p.ppd', 'KKA-DKB.pdf'
> > Parsing PPD file ...
> > *cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
>
> [...]
>
> > Reading PostScript input ...
> >
> > Job does not start with "%!", is it PostScript?
> > Starting file converter
> >
> > Starting converter for non-PostScript files
> > tail process done reading data from STDIN
> > KID2 finished
> > file converter PID kid2=6675
> > file converter command: enscript -G -M A4 -b "Page $%|
> > rd@blackbox" --margins=36:36:36:36 --mark-wrapped-lines=arrow --word-wrap
> > -p- --> This document is DSC-conforming!
>
> I find that a bit strange; enscript is an ASCII text to postscript
> converter AFAIK. When I call foomtaic-rip on a PDF file then it invokes
> a2ps (which in turn delegates to pdf2ps). Something seems to be fishy
> with this PDF file, you also had this "ASCII text" output from the
> "file" command initially, right?
No, initially I downloaded a html/javascript file by accident. The pdf really
is reported as pdf:
rd@blackbox:~/tmp.nobackup$ file KKA-DKB.pdf
KKA-DKB.pdf: PDF document, version 1.3
rd@blackbox:~/tmp.nobackup$
> [ snip: lots of pages reported indeed ]
>
> The only thing that I noted in the snipped output is that it never calls
> ghostscript (which is what happens when I use footmatic-rip on PDFs).
There are two ghostscript commands:
rd@blackbox:~/tmp.nobackup$ grep gs foomatic-rip.err
renderer command:
gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="HP
LaserJet" -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dDuplex=false -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=0,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=- -
foomatic-gswrapper:
gs '-sstdout=%stderr' '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=HP
LaserJet' '-dDEVICEWIDTHPOINTS=595' '-dDEVICEHEIGHTPOINTS=842' '-dDuplex=false' '-r300' '-sIjsParams=Quality:Quality=0,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=0,PS:MediaPosition=7' '-dIjsUseOutputFD' '-sOutputFile=%stdout' '-_'
rd@blackbox:~/tmp.nobackup$
I put the complete output file (STDERR) to
http://www.alzental-castle.de/~rd/foomatic-rip.err
BTW, gs displays the pdf file as well as acroread or kpdf. Is it possible that
the problem has something todo with the hplip/hpijs backend?
> > Closing file converter
> > KID2 exited with status 0
> > KID1 exited with status 0
> > File converter exit stat: 0
> > File converter process finished
> >
> > Closing foomatic-rip.
> > rd@blackbox:~/tmp.nobackup$
>
> [...]
>
> > Any input what additional debug data I could collect and who to report
> > the problem are very welcome.
>
> I am afraid that this bug might be specific to this file, so it cannot
> be investigated if you cannot submit the file for inspection due to
> privacy concerns.
>
The file is not secret and I would be ok with sharing it to individual
developers (without any formal agreement), but I would not want to post it
unprotected on an web page. If you are interested I would send it to you in a
private mail or send you an URL.
Thanks,
Rainer
--
Rainer Dorsch
Lärchenstr. 6
D-72135 Dettenhausen
07157-734133
email: rdorsch@web.de
jabber: rdorsch@jabber.org
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/
Reply to: