Bug 690179 - PDF-file not converted or converted with wrong extent
Summary: PDF-file not converted or converted with wrong extent
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.63
Hardware: PC Windows XP
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-21 04:31 UTC by artifex
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 870
Word Size: ---


Attachments
Sample command lines for GhostScript-call (1.63 KB, application/octet-stream)
2008-11-21 04:33 UTC, artifex
Details
patch (1.10 KB, patch)
2008-11-23 16:28 UTC, Marcos H. Woehrmann
Details | Diff
patch (3.08 KB, patch)
2008-11-23 17:03 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description artifex 2008-11-21 04:31:47 UTC
Depending on how the resolution for rendering is set and how -dBufferSpace is
set, the attached PDF-file is correctly converted, converted with a wrong extent
or not converted. The different command lines used can you see in the attached
Batch-file. The comment says id the file can be converted, not converted or
converted with wrong extent.
Comment 1 artifex 2008-11-21 04:32:34 UTC
Created attachment 4615 [details]
Sample PDF-file
Comment 2 artifex 2008-11-21 04:33:20 UTC
Created attachment 4616 [details]
Sample command lines for GhostScript-call
Comment 3 Marcos H. Woehrmann 2008-11-23 16:28:35 UTC
Created attachment 4620 [details]
patch

The attached patch fixes the the problem with the command line:

  bin/gs -sDEVICE=pngmono -dBufferSpace=200000
-sOutputFile="out_buffer200000_600DPI.png" -r600 -dBATCH -dNOPAUSE -q
-f"input.pdf" -c quit

I've verified that the other problem reported still occur with gshead (r9236).
Also, the problem is not confined to pngmono, any 1bpp output format fails with
this command line:

  bin/gs -sDEVICE=pbmraw -dBufferSpace=100000000 -sOutputFile=/dev/null
input.pdf
Comment 4 Alex Cherepanov 2008-11-23 17:03:32 UTC
Created attachment 4621 [details]
patch

The sample file installs singular text matrix 0 0 0.99 0 3059 569 Tm.

The patch adds special, tolerant to singular matrix processing, to the case
when
ImageMatrix is derived from the CTM, which happens in cached character
rendering.

Local regression testing shows no differences. Minor differences are possible
at higher resolutions because of the difference in rounding errors.

Testing on "GPL Ghostscript SVN PRE-RELEASE 8.64" shows that there's no
difference between runs and -dBufferSpace=100000000 is OK.

>md5sum *.png
63f3187d71dc9173ce030bd62ad5fd3f *out_buffer100000000_400DPI.png
d5044057d3899e7a823462a385717755 *out_buffer100000000_600DPI.png
63f3187d71dc9173ce030bd62ad5fd3f *out_buffer20000000_400DPI.png
d5044057d3899e7a823462a385717755 *out_buffer20000000_600DPI.png
63f3187d71dc9173ce030bd62ad5fd3f *out_buffer200000_400DPI.png
d5044057d3899e7a823462a385717755 *out_buffer200000_600DPI.png
63f3187d71dc9173ce030bd62ad5fd3f *out_noBuffer_400DPI.png
d5044057d3899e7a823462a385717755 *out_noBuffer_600DPI.png
Comment 5 Ray Johnston 2008-12-04 10:01:58 UTC
Please commit the patch so we can update the customer.
Comment 6 Alex Cherepanov 2008-12-04 20:45:51 UTC
The patch is committed as a rev. 9253.
Regression testing shows no differences.