Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 126

Previous Page 125   Index   Next Page 127

Function Reference
Page 126 of 766
Examples 1:
LGRP* root, *grp;
// Set the parameter DisplayInUI to false...
SI32 oc1 = pdfCreateOCG(PDF, "All", false, true, oiView);
SI32 oc2 = pdfCreateOCG(PDF, "Text", false, true, oiView);
SI32 oc3 = pdfCreateOCG(PDF, "Images", false, true, oiView);
root = pdfAddLayerToDisplTree(PDF, NULL, -1, NULL);
pdfAddLayerToDisplTree(PDF, root, oc1, "Just a title");
pdfAddLayerToDisplTree(PDF, root, oc2, NULL);
pdfAddLayerToDisplTree(PDF, root, oc3, NULL);
Result:
Example 2:
root = pdfAddLayerToDisplTree(PDF, NULL, -1, NULL);
grp
= pdfAddLayerToDisplTree(PDF, root, -1, "This is a group");
pdfAddLayerToDisplTree(PDF, grp, oc1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc2, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc3, NULL);
Result:
 

Previous topic: AddLayerToDisplTree

Next topic: AddObjectToLayer