Bug 690395 - Hidden PDF path visible
Summary: Hidden PDF path visible
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-09 11:12 UTC by Marcos H. Woehrmann
Modified: 2009-04-30 05:53 UTC (History)
0 users

See Also:
Customer: 330
Word Size: ---


Attachments
i9pv.pdf - simplified sample file (1.67 KB, application/pdf)
2009-04-11 22:24 UTC, Alex Cherepanov
Details
patch (661 bytes, patch)
2009-04-13 12:31 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2009-04-09 11:12:34 UTC
When the attached PDF file is rendered by Ghostscript a portion of a hidden path is visible (see attached 
screenshot.png).  This path is correctly hidden when the file is opened by Adobe Acrobat 9 Pro.

The command line I'm using for testing:

  bin/gs -r200 -sDEVICE=tiff24nc -o test.tif ./fiets_ned.pdf
Comment 1 Marcos H. Woehrmann 2009-04-09 11:31:32 UTC
Created attachment 4912 [details]
fiets_ned.pdf
Comment 2 Marcos H. Woehrmann 2009-04-09 11:32:05 UTC
Created attachment 4913 [details]
screenshot.png
Comment 3 Alex Cherepanov 2009-04-10 18:38:44 UTC
The bug was introduced in rev. 8770.

r8770 | leonardo | 2008-05-22 14:06:22 -0400 (Thu, 22 May 2008) | 25 lines

Enhancement (graphics) : Delay applying type 1 raster patterns until clist
interpretation (continued 4).

The old code assumes that a pattern always fits into the clist writer buffer.
However ppmraw -r400 176-01.ps violates this assumption.
This patch implements a subdivision of a pattern into slices,
each of which is smaller than the buffer size.

1. The new function cmd_get_buffer_space retrives maximal available space
   in the clist writer buffer (gxclutil.c).

2. cmd_put_drawing_color now implements a cycle for slicing big patterns.
   Each slice writes to clist as a separate clist instruction (gxclpath.c).

3. gx_dc_pattern_write_raster drops the constraint that the pattern
   fits into a single buffer (gsptype1.c).

4. The clist interpreter is enhanced with composing a pattern from slices
Comment 4 Alex Cherepanov 2009-04-11 22:24:42 UTC
Created attachment 4920 [details]
i9pv.pdf - simplified sample file

[/Separation/None ...] is visible in the clip list rendering.
Comment 5 Alex Cherepanov 2009-04-13 12:31:58 UTC
Created attachment 4926 [details]
patch

Write color to the clip list even when it has no variable data, as
in [/Separation/None ...]. Fix a bug introduce by rev. 8770.
Comment 6 Alex Cherepanov 2009-04-13 21:59:25 UTC
The patch is committed as a rev. 9634.
There are progressions in Testform.v1.0.2.pdf and z400454b01d4-1.pdf .
Comment 7 Alex Cherepanov 2009-04-14 14:40:02 UTC
The difference in 09-34.ps on page 6 is also progression.