Bug 690633

Summary: Ghostscript shows Hidden Layers in PDF
Product: Ghostscript Reporter: Eli Segev <esegev>
Component: ImagesAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: enhancement CC: marcos.woehrmann
Priority: P1 Keywords: bountiable
Version: 8.64   
Hardware: PC   
OS: Windows XP   
Customer: 1110 Word Size: ---
Attachments: CS3_PTC all layers 2.pdf
patch

Description Eli Segev 2009-07-16 07:20:31 UTC
When displaying a PDF file with Ghostscript 8.64, a hidden layer is showing.
Comment 1 Eli Segev 2009-07-16 07:21:18 UTC
Alex,

How do I send an example?
Comment 2 Ken Sharp 2009-07-16 07:45:37 UTC
Eli, go to the bug page and press 'Create a New Attachement'.
Comment 3 Eli Segev 2009-07-16 07:49:13 UTC
Created attachment 5213 [details]
CS3_PTC all layers 2.pdf

If you open this file with Adobe Reader, you will not see a red X.  This red X
is visible when displaying the file with Ghostscript.
Comment 4 Alex Cherepanov 2009-07-16 08:37:52 UTC
Ghostscript doesn't support optional content yet. Old versions of Acrobat
Reader(e.g AR5) also show the cross.

The problem with optional content is that Ghostscript cannot just skip
optional objects. It has to update the graphic state but not display anything.
Comment 5 Ray Johnston 2009-07-16 10:05:37 UTC
Support for optional content is an enhancement.
Comment 6 Marcos H. Woehrmann 2009-09-28 07:15:29 UTC
One of our customers has asked for this feature as well.  I've added their customer number to this bug and 
increased the priority.
Comment 7 Ray Johnston 2009-09-28 09:43:58 UTC
Actually this customer is P1.
Comment 8 Alex Cherepanov 2009-11-16 21:22:19 UTC
*** Bug 689289 has been marked as a duplicate of this bug. ***
Comment 9 Alex Cherepanov 2009-11-16 21:42:53 UTC
Created attachment 5679 [details]
patch

Handle optional content following the default viewing optional content
configuration dictionary, Skip invisible XObjects and render invisible
parts of content streams to nulldevice.

Since pdfwrite device is not yet ready for optional content,
all information about optional content is removed. Visible objects are merged
in, invisible objects and associated structures are discarded.

This patch hides invisible object in all sample files in this and duplicate bug

reports. Testing also shows progression in BFAX35P5.pdf.
Comment 10 Alex Cherepanov 2009-11-17 20:48:00 UTC
The patch has been committed as a rev. 10341.
Regression testing shows progressions in BFAX35P5.pdf and Bug689290.pdf .
Comment 11 Marcos H. Woehrmann 2011-09-18 21:46:25 UTC
Changing customer bugs that have been resolved more than a year ago to closed.