Invisible layers showing when rasterizing multilayer document

May 11, 2014 at 5:24 PM
Hi,

Hidden layers (OCG) are shown when rasterizing a memory stream into an PNG file.


Regards,
Alex
Coordinator
May 12, 2014 at 6:58 AM
Hi Alex,

Couple of questions.

What version of Ghostscript.NET do you use?
What version of native Ghostscript library do you use?
Can you attach sample problematic PDF so I can try to reproduce u problem?

Cheers,
Josip
May 12, 2014 at 5:31 PM
Thanks for the quick response,

Versions are as follows:
Ghostscript.Net: 1.1.8.0
Ghostscript: 9.14
This is the file: http://filepost.com/files/552e1ebc/House_Plan_Final.pdf/

Tnx,
Alex
Coordinator
May 14, 2014 at 3:25 AM
By default I only see 'Guides' layer set as hidden and it doesn't display.

Are you saying that if you (let's say) hide layer 'Foreground', save PDF and try to rasterize it via Ghostscript, the 'Foreground' will be shown?

Cheers,
Josip
May 14, 2014 at 5:49 PM
Well yes,
what I'm trying to do is iterate over a list of bye arrays in which each one has only one of the layers set to visible (others invisible),
and rasterize each item into an PNG file with only that layer visible.

Tnx,
Alex
Coordinator
May 21, 2014 at 7:28 AM
I think this has nothing to do with Ghostscript.NET ( wrapper ) and it's more native Ghostscript question. If that's a case, I would suggest you to ask this question on the Ghostscript IRC channel. (http://ghostscript.com/irclogs/current.html) (server: irc.freenode.net , room: #ghostscript )

Cheers,
Josip
May 25, 2014 at 7:00 PM
It was a bug in Ghostscript, but it was fixed I think in v8, but I can't seem to find the exact link to the bug.

That's what led me to ask the question here as that one seamed to have been resolved a while ago.

Tnx,
Alex
Coordinator
May 27, 2014 at 9:51 AM
Hi Alex,

I managed to find out what the problem with the invisible layers is and how to fix it.

You can get the changes from the: https://github.com/jhabjan/Ghostscript.NET/commit/000f9c1fdcfbb4fb42dbbe5da98ad2c5486f86ca

This will be included into the next release.

Cheers,
Josip
May 28, 2014 at 8:54 PM
Hey,

Great, I tried it and it works.

Thanks a lot,
Alex