Bug 697425 - GS erasing the transparency of the annotation
Summary: GS erasing the transparency of the annotation
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 9.19
Hardware: Macintosh MacOS X
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 22:48 UTC by Dellu
Modified: 2016-12-07 00:35 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
annotations are flattened (turn intrasparent) (191.45 KB, application/pdf)
2016-12-06 22:48 UTC, Dellu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dellu 2016-12-06 22:48:33 UTC
Created attachment 13221 [details]
annotations are flattened (turn intrasparent)

The annotations (highlights) of the PDF files I annotated become intransparent (black out the text) when I split the PDF using GS. 

I have a discussion with KenS at Stackoverflow about this: http://stackoverflow.com/questions/39649746/splitting-pdf-files-in-50-pages-interval

Some of my observations about this bug: 

The bug is system wide: not specific to a mac application (Preview). 

All the native mac applications fail to display the annotations. Only windows based (Adobe reader; and, PDF studio) applications can display the annotation. 

Mac native applications I tried include
- Preview
- Skim
- PDFPen
- PDF expert
- PDF outliner




Note, if the splitting is done by another application, PDF studio, for example, it correctly displays with all the applications. That made me to conclude that gs is changing something on the transparency of the annotation which turns it into invisible under the native Mac system. 

I have attached a sample file: open and read it on your mac; on any of the above readers.
Comment 1 Ken Sharp 2016-12-07 00:35:22 UTC
(In reply to Dellu from comment #0)

> The annotations (highlights) of the PDF files I annotated become
> intransparent (black out the text) when I split the PDF using GS. 

Ghostscript does not 'split' (or merge, or any other 'manipulation) PDF files, please read the documentation in vectordevices.htm to see how it does process the input and output.

Note that as per bug 697309 we already know that simple annotations are not preserved as annotations, but become part of the page content.


> The bug is system wide: not specific to a mac application (Preview). 
> 
> All the native mac applications fail to display the annotations. Only
> windows based (Adobe reader; and, PDF studio) applications can display the
> annotation. 
> 
> Mac native applications I tried include
> - Preview
> - Skim
> - PDFPen
> - PDF expert
> - PDF outliner

As a general rule Mac applications use the Quartz native operating system rendering of PDF, if there is a bug in Quartz it will therefore most likely affect all PDF rendering on Macintosh.

You don't appear to have tried Acrobat on the Mac, perhaps you should try that. I just did and it renders the page as expected.

So 3 applications which I know do not use Quartz (Acrobat, Ghostscript and MuPDF) when running on a Mac all render the page correctly. Preview (which does use Quartz, obviously) and a bunch of software which almost certainly does use Quartz, though I can't be certain, get it wrong, and all in the same way.....

As I've said before, if Acrobat can render the content, then we are likely to conclude that the problem is with the viewer, not with the Ghostscript output.


> Note, if the splitting is done by another application, PDF studio, for
> example, it correctly displays with all the applications. That made me to
> conclude that gs is changing something on the transparency of the annotation
> which turns it into invisible under the native Mac system. 
> 
> I have attached a sample file: open and read it on your mac; on any of the
> above readers.

We need an input file, not an output file, and a command line to reproduce a problem. Then we can produce the output ourselves. We also prefer smaller simpler files.

All the highlights in this file render correctly using Adobe Acrobat, MuPDF,  Ghostscript and a third party PDF interpreter. So that's 4 different implementations of the PDF specification from three different suppliers. On the Mac Acrobat Reader also renders the file correctly.

If there is a problem with another viewer then I'm forced to conclude that this is a problem with that viewer. If, as you say, this is a general problem on Macs (which it clearly isn't, since other non-Quartz applications work), then the problem is most likely to do with the MacOS system (specifically the Quartz PDF rendering), and you should report it to Apple. Congratulations, seems like you've found an Apple bug.