Please give a brief summary of your issue:
I am creating OCGs following PDFTron Systems Inc. | Documentation but I am looking for a submenu to turn on and off these ocg(s). Thanks.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Please provide a link to a minimal sample where the issue is reproducible:
Could you please elaborate on what you mean exactly by “submenu”?
Sounds like you are using a PDF viewer? If so, which one exactly? Screenshots help a lot.
For example, I can not create a pdf with toggleable layers only on the server.
Yes, you can using our SDK.
For the PDF file itself there is an entry that a conforming PDF Reader is supposed to parse to display the layers.
// Add the new OCG to the list of layers that should appear in PDF viewer GUI.
Obj layer_order_array = cfg.GetOrder();
if (layer_order_array == null)
{
layer_order_array = doc.CreateIndirectArray();
cfg.SetOrder(layer_order_array);
}
layer_order_array.PushBack(grp.GetSDFObj());
See this sample
However, it is still up to each individual PDF Reader software to display and process the layers or not. Many PDF Readers do not offer Layer support.
If you are looking for more assistance, then please elaborate on what exactly you are trying to do.