DynaPDF Manual - Page 128

Previous Page 127   Index   Next Page 129

Function Reference
Page 128 of 777
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);
Example 2:
root = pdfAddLayerToDisplTree(PDF, NULL, -1, NULL);
= pdfAddLayerToDisplTree(PDF, root, -1, "This is a group");
pdfAddLayerToDisplTree(PDF, grp, oc1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc2, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc3, NULL);

Previous topic: AddLayerToDisplTree

Next topic: AddMaskImage, AddObjectToLayer