Bug 688641 - pdfwrite is_in_page is broken, leads to spurious transparency
Summary: pdfwrite is_in_page is broken, leads to spurious transparency
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 8.15
Hardware: PC Linux
: P4 normal
Assignee: leonardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-10 04:18 UTC by Ian Jackson
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Handover.ps (222.55 KB, application/postscript)
2006-08-11 08:27 UTC, leonardo
Details
bad_patch.txt (3.16 KB, patch)
2006-08-11 08:38 UTC, leonardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Jackson 2006-04-10 04:18:45 UTC
At https://launchpad.net/distros/ubuntu/+source/gs-gpl/+bug/33255 an ubuntu user
reports that a particular eps, when converted to pdf with gs pdfwrite,
erroneously leaves a particular rectangle transparent rather than filling it
with white.

The cause is the definition of is_in_page and the code which uses it. 
is_in_page is tested by gdev_pdf_fill_rectangle and prepare_fill_with_clip, with
the intent of suppressing the initial fill of the entire page with white.

However, this approach is incorrect, because it suppresses _any number_ of
initial white fills.  In particular, if the first drawing operation on a page is
a white fill, it is suppressed.  This is the case in the test file attached to
the Ubuntu bug report, above.

I'm not sure how best to fix this because I'm not sufficiently familiar with the
innards of gs, so I don't know what the right approach is and I'm afraid I
haven't supplied a patch.

Thanks.
Comment 1 leonardo 2006-08-11 08:27:06 UTC
Created attachment 2413 [details]
Handover.ps

A local copy of the test file.
Comment 2 leonardo 2006-08-11 08:38:46 UTC
Created attachment 2414 [details]
bad_patch.txt

A patch which implements exactly what suggested. It appears not good because
enlarges the re-distilled 0.pdf .
Comment 3 leonardo 2006-08-11 10:52:24 UTC
Patch to HEAD :
http://ghostscript.com/pipermail/gs-cvs/2006-August/006746.html