Page 1 of 1

How exactly are layers / optional content groups meant to work?

Posted: Mon Jan 08, 2018 3:33 pm
by floele
Hi,

GdPicture v12 has added support for PDF layers AKA optional content groups but I can't really get it to work.
My first try was using the sample code from https://guides.gdpicture.com/content/Gd ... ewOCG.html

My expectation is a PDF file containing an additional layer "Image layer" which contains an image. The result, however, is the attached PDF. No image, no layer.

My second try was the sample code from https://guides.gdpicture.com/content/Gd ... ntent.html.
This time there is some content visible, but still no layers.

For reference, I also attached a PDF file that actually contains layers. How would I create a PDF file with GdPicture that works like the attached PDF?

Best regards,
Florian

Re: How exactly are layers / optional content groups meant to work?

Posted: Wed Feb 07, 2018 8:23 pm
by Gabriela
Hi,
Unfortunately, we do not support the complete functionality of OCG's, so the newly created layers using GdPicturePDF are not presented in any user interface. For that reason you can't view the layers in the PDF viewers.
Please read the documentation here:
http://guides.gdpicture.com/content/web ... ewOCG.html
Specifically the Remarks section.
Regards,
Gabriela