Bug 27294 - Illegal ASCII85 string in PostScript output
Summary: Illegal ASCII85 string in PostScript output
Status: RESOLVED WORKSFORME
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-24 09:24 UTC by Anders Blomdell
Modified: 2010-03-24 16:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Bad PostScript (18.33 KB, text/plain)
2010-03-24 09:24 UTC, Anders Blomdell
Details
The ppd file for the printer used (98.90 KB, text/plain)
2010-03-24 13:44 UTC, Anders Blomdell
Details

Description Anders Blomdell 2010-03-24 09:24:53 UTC
Created attachment 34415 [details]
Bad PostScript

When generating PostScript output (printing) from the following pdf:
 
http://www.yokogawa.com/ddm/catalog/bu/BU71M01A00-01E.pdf

poppler? generates the the PostScript that contains the fragment in the attachment. The problem is that the line 'dup 76 <~>~> put' is not well handled by PostScript (the printer aborts the job), since ASCII85 strings of length 1 are illegal. The entire PS file (5 MB) is available on request.
Comment 1 Anders Blomdell 2010-03-24 09:43:32 UTC
Shouldn't all the loops that looks like:

  for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {

be:

  for (i = 1; i <= (useASCIIHex ? 1 : 5); ++i) {

since ASCII85 is a 4->(1/5) byte encoding, which means that each 32 bits gives either 1 (all zeroes -> z) or 5 bytes of output. 
Comment 2 Albert Astals Cid 2010-03-24 13:16:45 UTC
How did you generate that ps? Because pdftops generates a completely different one
Comment 3 Anders Blomdell 2010-03-24 13:44:34 UTC
Created attachment 34421 [details]
The ppd file for the printer used
Comment 4 Anders Blomdell 2010-03-24 13:45:39 UTC
Printing from evince on a Ubuntu 9.10 via cups to a printer with attached ppd file.
Comment 5 Albert Astals Cid 2010-03-24 13:47:26 UTC
I'm going to blame it on the glib frontend then.
Comment 6 Anders Blomdell 2010-03-24 13:55:49 UTC
You can most probably pinpoint it to this file/function:

poppler/PSOutputDev.cc: PSOutputDev::setupImage
Comment 7 Albert Astals Cid 2010-03-24 13:59:15 UTC
No, if you were using PSOutputDev you would not get that ps, if you want to try PSOutputDev use pdftops and you'll see how different the file generated is.
Comment 8 Anders Blomdell 2010-03-24 15:12:43 UTC
'pstopdf -preload' gives very similar output.
Comment 9 Anders Blomdell 2010-03-24 15:23:14 UTC
Think I found the bug, the cups server was running 'pdftops version 0.10.7', which exhibited the problem. I have not been able to reproduce the bug with 0.12.4.
Comment 10 Albert Astals Cid 2010-03-24 16:22:39 UTC
Closing as worksforme then, thanks for the investigation.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.