Bug 689970 - major artefacts in pdfwriter output
Summary: major artefacts in pdfwriter output
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.63
Hardware: All All
: P4 major
Assignee: Ken Sharp
URL:
Keywords:
: 690220 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-15 05:01 UTC by Bernhard Weisshuhn
Modified: 2009-01-06 07:28 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
Original file, displays fine (313.36 KB, application/pdf)
2008-07-15 05:02 UTC, Bernhard Weisshuhn
Details
file with artefacts after being processed by ps2pdf (235.92 KB, application/pdf)
2008-07-15 05:04 UTC, Bernhard Weisshuhn
Details
Another Testcase, heavily distorted by ps2pdf (36.22 KB, application/pdf)
2008-08-07 02:49 UTC, Bernhard Weisshuhn
Details
File 4259 after being processed with ps2pdf (306.88 KB, application/pdf)
2008-08-07 02:53 UTC, Bernhard Weisshuhn
Details
output with svn 9251 - still broken (209.67 KB, image/png)
2008-12-04 01:53 UTC, Bernhard Weisshuhn
Details
out.pdf (228.62 KB, application/pdf)
2008-12-05 00:28 UTC, Ken Sharp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Weisshuhn 2008-07-15 05:01:06 UTC
The attached file is damaged very badly when piped through pdfwriter (say ps2pdf).
Several readers we tried (ghostscript, poppler, Adobe Reader, Apple Preview)
render the original just fine but give very noticable artefacts when used on the
file produced by ps2pdf.
I cannot really comment on the (customer supplied) file. A preflight on Acrobat
Pro 9 did not reveal any pecularities.
Comment 1 Bernhard Weisshuhn 2008-07-15 05:02:12 UTC
Created attachment 4219 [details]
Original file, displays fine
Comment 2 Bernhard Weisshuhn 2008-07-15 05:04:42 UTC
Created attachment 4220 [details]
file with artefacts after being processed by ps2pdf

% ps2pdf input.pdf ps2pdf.pdf
% gs --version
8.63
Comment 3 Ken Sharp 2008-07-15 06:11:28 UTC
This looks like its another case of the text render mode causing problems. Much
of the text is drawn with Tr 2 (fill and then stroke), apparently to increase
the 'boldness' of the font because it uses the same colour for both operations.
If I alter that to Tr 1 or 0 and convert then the problem disappears. 

To do this, select the text in Acrobat, right-click and select properties. Note
that the stroke and fill colours are set. Alter the stroke colour to 'no
colour'. Notice that the boldness is reduced. Convert, problem disappears.


The current pdfwrite code in HEAD does a 'better' job with text rendering modes
than the old code did, but its far from perfect, and faulty line widths are a
known problem.

Hopefully I'll get round to altering the graphics state to address this soon.
See also issue #689692.

I won't mark this as a duplicate, because its not quite the same problem.
Comment 4 Bernhard Weisshuhn 2008-08-07 02:49:56 UTC
Created attachment 4259 [details]
Another Testcase, heavily distorted by ps2pdf

I supspect this the same problem.
Comment 5 Bernhard Weisshuhn 2008-08-07 02:53:01 UTC
Created attachment 4260 [details]
File 4259 after being processed with ps2pdf
Comment 6 Ken Sharp 2008-08-20 00:40:07 UTC
*** Bug 690025 has been marked as a duplicate of this bug. ***
Comment 7 Ken Sharp 2008-11-06 07:57:25 UTC
This patch:

http://ghostscript.com/pipermail/gs-cvs/2008-November/008772.html

(revision 9196) resolves the problem. There are still issues with text rendering
modes (as noted in the submission log) to be dealt with later.
Comment 8 Bernhard Weisshuhn 2008-12-04 01:53:23 UTC
Created attachment 4637 [details]
output with svn 9251 - still broken

Output with current svn (rev 9251, built on freebsd) is still severely
distorted. I strongly vote to reopen this bug.
Comment 9 Ken Sharp 2008-12-05 00:28:16 UTC
Created attachment 4638 [details]
out.pdf

The image does not match the PDF file I produce here on Windows which displays
perfectly in Acrobat. The report says 'All' for the OS, so I did not (and have
not) tested it on Linux or any other Unix.

You do not say how you achieved the output, is this also created from freeBSD ?
If so what application did you use to view the output ?

I doubt there is any point in re-opening this bug in any event, the text
rendering has been heavily revised over the last few weeks and has probably
reached the best state it is going to until a major overhaul is completed.

The file from this issue will be tested, along with all the others, as part of
the testing for that work.

For what its worth I have attached the PDF file I produced.
Comment 10 Bernhard Weisshuhn 2008-12-05 04:10:26 UTC
Sorry for having wasted your time on this. After I installed to /usr/local and
not /usr/local/ghostscript-8.64-svn (via configure --prefix), I got the same
result as You. I don't really understand why, truss did not show any open() of
old library files.

Anyway, I'm a happy camper now, thanks a bunch!
Comment 11 Till Kamppeter 2009-01-06 07:28:37 UTC
*** Bug 690220 has been marked as a duplicate of this bug. ***