FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-17-2008, 09:47 PM
Rainer Dorsch
 
Default strange gs problem: unicode encoding problem with pdf (?)

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:
rd@dell:/tmp$ gs DKB.pdf
GPL Ghostscript 8.62 (2008-02-29)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /syntaxerror in -file-
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval--
2 %stopped_push --nostringval-- --nostringval-- --nostringval--
false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1
3 %oparray_pop 1888 1 3 %oparray_pop 1771 1
3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval--
2 %stopped_push
Dictionary stack:
--dict:1151/1684(ro)(G)-- --dict:0/20(G)-- --dict:92/200(L)--
Current allocation mode is local
Current file position is 6
GPL Ghostscript 8.62: Unrecoverable error, exit code 1
rd@dell:/tmp$

(I do not want to post the file, because it contains credit card data).

- What surprises me is that acroread complains that the file is an unsupported
type or contains errors.

- since the file works on windows version of acrobat (downloaded from the same
source), I though it has something todo with the character encoding:

rd@dell:/tmp$ file DKB.pdf
DKB.pdf: ISO-8859 text, with very long lines, with CRLF, LF line terminators
rd@dell:/tmp$

Any inside what could go wrong here is very welcome. Also ideas on how to get
better debug information ....

Many thanks,
Rainer


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-18-2008, 11:51 AM
Florian Kulzer
 
Default strange gs problem: unicode encoding problem with pdf (?)

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:
>
> rd@dell:/tmp$ gs DKB.pdf
> GPL Ghostscript 8.62 (2008-02-29)
> Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> Error: /syntaxerror in -file-

[...]

> GPL Ghostscript 8.62: Unrecoverable error, exit code 1
> rd@dell:/tmp$
>
> (I do not want to post the file, because it contains credit card data).
>
> - What surprises me is that acroread complains that the file is an unsupported
> type or contains errors.
>
> - since the file works on windows version of acrobat (downloaded from the same
> source), I though it has something todo with the character encoding:
>
> rd@dell:/tmp$ file DKB.pdf
> DKB.pdf: ISO-8859 text, with very long lines, with CRLF, LF line terminators

That does not seem to be a PDF file at all, but rather a plain text
file. The output for a PDF file should be something like this:
"PDF document, version 1.X"

How did you generate this file, or where does it come from?

> Any inside what could go wrong here is very welcome. Also ideas on how to get
> better debug information ....

The output of

pdfinfo DKB.pdf

might help.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-18-2008, 09:30 PM
Rainer Dorsch
 
Default strange gs problem: unicode encoding problem with pdf (?)

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:
> >
> > rd@dell:/tmp$ gs DKB.pdf
> > GPL Ghostscript 8.62 (2008-02-29)
> > Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
> > This software comes with NO WARRANTY: see the file PUBLIC for details.
> > Error: /syntaxerror in -file-
>
> [...]
>
> > GPL Ghostscript 8.62: Unrecoverable error, exit code 1
> > rd@dell:/tmp$
> >
> > (I do not want to post the file, because it contains credit card data).
> >
> > - What surprises me is that acroread complains that the file is an
> > unsupported type or contains errors.
> >
> > - since the file works on windows version of acrobat (downloaded from the
> > same source), I though it has something todo with the character encoding:
> >
> > rd@dell:/tmp$ file DKB.pdf
> > DKB.pdf: ISO-8859 text, with very long lines, with CRLF, LF line
> > terminators
>
> That does not seem to be a PDF file at all, but rather a plain text
> file. The output for a PDF file should be something like this:
> "PDF document, version 1.X"
>
> How did you generate this file, or where does it come from?
>
> > Any inside what could go wrong here is very welcome. Also ideas on how to
> > get better debug information ....
>
> The output of
>
> pdfinfo DKB.pdf
>
> might help.

Florian,

thanks for your reply, you were perfectly right, I had a wrong file.

Nevertheless the correct one also does not print from kpdf:

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$ file KKA-DKB.pdf
KKA-DKB.pdf: PDF document, version 1.3
rd@blackbox:~/tmp.nobackup$


/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?


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/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-19-2008, 06:47 PM
Florian Kulzer
 
Default strange gs problem: unicode encoding problem with pdf (?)

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:

[...]

> Nevertheless the correct one also does not print from kpdf:
>
> 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$ file KKA-DKB.pdf
> KKA-DKB.pdf: PDF document, version 1.3
> rd@blackbox:~/tmp.nobackup$
>
>
> /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.)

You can also try to convert the file to postscript yourself, with pdf2ps
(from ghostscript) or with pdftops (from poppler-utils or xpdf-utils).
Maybe one of these tools can produce working postscript. (The one from
ghostscript should in principle be identical to what foomatic-rip itself
does to the PDF file, though.)

If all else fails then you can use pdftoppm (from poppler-utils or
xpdf-utils) to generate bitmap images of the pages of the PDF and print
those. (You can set an appropriate resolution with the "-r" option.)

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-20-2008, 08:41 PM
Rainer Dorsch
 
Default strange gs problem: unicode encoding problem with pdf (?)

Florian,

thanks for the quick reply.

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:
>
> [...]
>
> > Nevertheless the correct one also does not print from kpdf:
> >
> > 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$ file KKA-DKB.pdf
> > KKA-DKB.pdf: PDF document, version 1.3
> > rd@blackbox:~/tmp.nobackup$
> >
> >
> > /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"
Added option ColorSpace
Added option Resolution
Added option PageSize
Added option PageRegion
Added option Model
Added option PrintoutMode
Added option InputSlot
Added option ImageableArea
Added option PaperDimension
Added option Duplex
Added option Quality
Added option Font

Parameter Summary
-----------------

Spooler: direct
Printer:
Shell: /bin/sh
PPD file: /etc/cups/ppd/hplj6p.ppd
ATTR file:
Printer model: HP LaserJet 6P Foomatic/hpijs (recommended) - HPLIP 2.7.10
Options:
Job title: rd@blackbox
File(s) to be printed:
KKA-DKB.pdf

GhostScript extra search path ('GS_LIB'): /home/rd/.fonts

================================================

File: KKA-DKB.pdf

================================================

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!

-----------
Found: %%BeginProlog
Inserting option code into "Prolog" section.
Found: %%EndProlog

-----------
Found: %%BeginSetup
Inserting option code into "Setup" section.
Found: %%EndSetup

-----------
New page: (1) 1
Inserting option code into "PageSetup" section.

Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (2) 2
--> Output goes directly to the renderer now.


Starting renderer
JCL: <job data>


-----------
New page: (2) 2
Inserting option code into "PageSetup" section.
Found: %%Page: (2) 2
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (3) 3
--> Output goes directly to the renderer now.


-----------
New page: (3) 3
Inserting option code into "PageSetup" section.
Found: %%Page: (3) 3
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (4) 4
--> Output goes directly to the renderer now.


-----------
New page: (4) 4
Inserting option code into "PageSetup" section.
Found: %%Page: (4) 4
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (5) 5
--> Output goes directly to the renderer now.


-----------
New page: (5) 5
Inserting option code into "PageSetup" section.
Found: %%Page: (5) 5
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (6) 6
--> Output goes directly to the renderer now.


-----------
New page: (6) 6
Inserting option code into "PageSetup" section.
Found: %%Page: (6) 6
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (7) 7
--> Output goes directly to the renderer now.


-----------
New page: (7) 7
Inserting option code into "PageSetup" section.
Found: %%Page: (7) 7
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (8) 8
--> Output goes directly to the renderer now.


-----------
New page: (8) 8
Inserting option code into "PageSetup" section.
Found: %%Page: (8) 8
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (9) 9
--> Output goes directly to the renderer now.


-----------
New page: (9) 9
Inserting option code into "PageSetup" section.
renderer PID kid4=6678
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,Q uality:MediaType=0,Quality:PenSet=0,PS:MediaPositi on=7 -dIjsUseOutputFD -sOutputFile=- -
Found: %%Page: (9) 9
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (10) 10
--> Output goes directly to the renderer now.


-----------
New page: (10) 10
Inserting option code into "PageSetup" section.
Found: %%Page: (10) 10
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (11) 11
--> Output goes directly to the renderer now.

[...]

-----------
New page: (105) 105
Inserting option code into "PageSetup" section.
Found: %%Page: (105) 105
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
New page found but previous not printed, print it now.
Found: %%Page: (106) 106
--> Output goes directly to the renderer now.


-----------
New page: (106) 106
Inserting option code into "PageSetup" section.
Found: %%Page: (106) 106
--> Output goes to the FIFO buffer now.


Found: %%BeginPageSetup
Found: %%EndPageSetup
End of page header
Flushing FIFO.

Closing renderer
KID3 exited with status 0
tail process done writing data to STDOUT
KID4 finished
KID4 exited with status 0
Renderer exit stat: 0
KID3 finished
Renderer process finished

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$

> You can also try to convert the file to postscript yourself, with pdf2ps
> (from ghostscript) or with pdftops (from poppler-utils or xpdf-utils).
> Maybe one of these tools can produce working postscript. (The one from
> ghostscript should in principle be identical to what foomatic-rip itself
> does to the PDF file, though.)
>
> If all else fails then you can use pdftoppm (from poppler-utils or
> xpdf-utils) to generate bitmap images of the pages of the PDF and print
> those. (You can set an appropriate resolution with the "-r" option.)

Thanks for these workarounds. Since I have a workaround (use acrobat) my main
interest is to provide a reasonable bug report to the developers.

Any input what additional debug data I could collect and who to report the
problem are very welcome.

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/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-21-2008, 05:07 PM
Florian Kulzer
 
Default strange gs problem: unicode encoding problem with pdf (?)

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?

[ 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).

> 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.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-31-2008, 02:31 PM
Rainer Dorsch
 
Default 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,Q uality:MediaType=0,Quality:PenSet=0,PS:MediaPositi on=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,Q uality:MediaType=0,Quality:PenSet=0,PS:MediaPositi on=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/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-01-2008, 01:05 PM
Florian Kulzer
 
Default strange gs problem: unicode encoding problem with pdf (?)

On Sat, May 31, 2008 at 16:31:26 +0200, Rainer Dorsch wrote:
> > On Tue, May 20, 2008 at 22:41:26 +0200, Rainer Dorsch wrote:
> > > Am Montag, 19. 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:

[...]

> > > > 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.)

[...]

> 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,Q uality:MediaType=0,Quality:PenSet=0,PS:MediaPositi on=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,Q uality:MediaType=0,Quality:PenSet=0,PS:MediaPositi on=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?

The error messages in one of your earlier mails show that you are using
the Lenny/Sid version of ghostscript (8.62), but your PPD file seems to
be outdated (it is from HPLIP 2.7.10; the current version of hpijs-ppds
is 2.8.4 in Lenny and 2.8.5 in Sid). Maybe upgrading and/or updating to
the newest PPD in the CUPS setup will fix the problem. (Sometimes it can
necessary to remove the printer and add it again with the newest
driver.)

[...]

> 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.

I would rather not receive any sensitive information. Can you generate a
new file from the same form with bogus data filled in?

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-01-2008, 02:33 PM
Rainer Dorsch
 
Default strange gs problem: unicode encoding problem with pdf (?)

Am Sonntag, 1. Juni 2008 schrieb Florian Kulzer:
> On Sat, May 31, 2008 at 16:31:26 +0200, Rainer Dorsch wrote:
> > > On Tue, May 20, 2008 at 22:41:26 +0200, Rainer Dorsch wrote:
> > > > Am Montag, 19. 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:
>
> [...]
>
> > > > > 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.)
>
> [...]
>
> > 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,Q uality:MediaType=0,Qua
> >lity: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,Q uality:MediaType=0,Qu
> >ality: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?
>
> The error messages in one of your earlier mails show that you are using
> the Lenny/Sid version of ghostscript (8.62), but your PPD file seems to
> be outdated (it is from HPLIP 2.7.10; the current version of hpijs-ppds
> is 2.8.4 in Lenny and 2.8.5 in Sid). Maybe upgrading and/or updating to
> the newest PPD in the CUPS setup will fix the problem. (Sometimes it can
> necessary to remove the printer and add it again with the newest
> driver.)

Thanks for spotting this. This improved the situation but did not fix it yet.

A cupsys upgrade apparently does not replace the ppds for installed printers.
I "changed" the printer using the localhost:631 web interface and tried two
options (I also added a new test printer, but same result):

*NickName: "HP LaserJet 6P Foomatic/hpijs, hpijs 2.8.4.2 - HPLIP 2.8.4"
*NickName: "HP LaserJet 6P/6MP - PostScript Postscript (recommended)"


And this brought a nice improvement:

foomatic-rip -v --ppd /etc/cups/ppd/hplj6p.ppd ~/tmp.nobackup/KKA-DKB.pdf >log
2>err

generates now a ps or pcl file (depending on the selected driver) in the "log"
file.

But still it does not print and there are a lot of indications to these 106
pages!

The pcl version goes into error the ps version prints the ps source code.

Inspecting the err file, I still see the 106 pages and enscript as file
converter:

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!

And for the postscript version this is in agreement with the "log" file

rd@blackbox:~$ tail log
(32934) s
5 94 M
(%%EOF) s
_R
S
%%Trailer
%%Pages: 106
%%DocumentNeededResources: font Times-Roman Courier-Bold Courier
%%+ font Times-Bold
%%EOF

The complete outputs (STDERR) of foomatic-rip are here

http://alzental-castle.de/~rd/err.pclbackend

and

http://alzental-castle.de/~rd/err.psbackend


> [...]
>
> > 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.
>
> I would rather not receive any sensitive information. Can you generate a
> new file from the same form with bogus data filled in?
>

My bank is generating these PDFs for me. I cannot generate them with bogus
data. Not sure if there would be a save way to edit a pdf file to remove my
credit card data.

BUT, the data are not very sensitive. All web-shops I pay with the card have
the data. I just do not want to publish it on the web...

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/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-02-2008, 05:51 PM
Florian Kulzer
 
Default strange gs problem: unicode encoding problem with pdf (?)

On Sun, Jun 01, 2008 at 16:33:53 +0200, Rainer Dorsch wrote:
> Am Sonntag, 1. Juni 2008 schrieb Florian Kulzer:
> > On Sat, May 31, 2008 at 16:31:26 +0200, Rainer Dorsch wrote:
> > > > > > > > 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:

[...]

> > The error messages in one of your earlier mails show that you are using
> > the Lenny/Sid version of ghostscript (8.62), but your PPD file seems to
> > be outdated (it is from HPLIP 2.7.10; the current version of hpijs-ppds
> > is 2.8.4 in Lenny and 2.8.5 in Sid). Maybe upgrading and/or updating to
> > the newest PPD in the CUPS setup will fix the problem. (Sometimes it can
> > necessary to remove the printer and add it again with the newest
> > driver.)
>
> Thanks for spotting this. This improved the situation but did not fix it yet.
>
> A cupsys upgrade apparently does not replace the ppds for installed printers.

The relevant PPD file is copied to /etc/cups/ppd (and renamed according
to the CUPS designation for this printer) whenever a printer is
installed. This copy is not changed when the original PPD file is
subsequently updated during a package upgrade.

> I "changed" the printer using the localhost:631 web interface and tried two
> options (I also added a new test printer, but same result):
>
> *NickName: "HP LaserJet 6P Foomatic/hpijs, hpijs 2.8.4.2 - HPLIP 2.8.4"
> *NickName: "HP LaserJet 6P/6MP - PostScript Postscript (recommended)"
>
>
> And this brought a nice improvement:
>
> foomatic-rip -v --ppd /etc/cups/ppd/hplj6p.ppd ~/tmp.nobackup/KKA-DKB.pdf >log
> 2>err
>
> generates now a ps or pcl file (depending on the selected driver) in the "log"
> file.
>
> But still it does not print and there are a lot of indications to these 106
> pages!
>
> The pcl version goes into error the ps version prints the ps source code.
>
> Inspecting the err file, I still see the 106 pages and enscript as file
> converter:
>
> 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 still don't like this invocation of enscript. I now ran enscript on a
1-page PDF and it tried to send 99 pages of garbage to my printer.
AFAIK, enscript is meant for plain text input only. So there is either a
problem with the filtering setup of CUPS (maybe caused by the PPD) or a
quirk in the PDF itself.

> And for the postscript version this is in agreement with the "log" file
>
> rd@blackbox:~$ tail log
> (32934) s
> 5 94 M
> (%%EOF) s
> _R
> S
> %%Trailer
> %%Pages: 106
> %%DocumentNeededResources: font Times-Roman Courier-Bold Courier
> %%+ font Times-Bold
> %%EOF
>
> The complete outputs (STDERR) of foomatic-rip are here
>
> http://alzental-castle.de/~rd/err.pclbackend
>
> and
>
> http://alzental-castle.de/~rd/err.psbackend
>
>
> > [...]
> >
> > > 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.
> >
> > I would rather not receive any sensitive information. Can you generate a
> > new file from the same form with bogus data filled in?
> >
>
> My bank is generating these PDFs for me. I cannot generate them with bogus
> data. Not sure if there would be a save way to edit a pdf file to remove my
> credit card data.

You can try to uncompress it with pdftk:

pdftk KKA-DKB.pdf output uncompressed.pdf uncompress

It should be possible to edit uncompressed.pdf with any text editor and
remove all sensitive information (unless your bank uses an unusual
encoding or protected the content in some other way).

> BUT, the data are not very sensitive. All web-shops I pay with the card have
> the data. I just do not want to publish it on the web...

I think you also do not want to send it to somebody whom you only know
from a linux mailing list.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:26 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org