DynaPDF Manual - Page 148
Previous Page 147 Index Next Page 149
Function Reference
Page 148 of 839
Result:
Example 3:
The following two versions are a bit confusing, I know...
root = pdfAddLayerToDisplTree(PDF, NULL, oc1, NULL);
grp
= pdfAddLayerToDisplTree(PDF, root, -1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc2, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc3, NULL);
Result:
Example 4:
root = pdfAddLayerToDisplTree(PDF, NULL,oc1,"A layer group with a title");
grp
= pdfAddLayerToDisplTree(PDF, root, -1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc2, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc3, NULL);
Result:
There is a special case that produces the same result in Acrobat but certain viewers have problems
to display the layer tree depending on the used syntax. Compare the following two versions:
root = pdfAddLayerToDisplTree(PDF, NULL, -1, "This is a group");
grp
= pdfAddLayerToDisplTree(PDF, root, -1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc1, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc2, NULL);
pdfAddLayerToDisplTree(PDF, grp, oc3, NULL);
root = pdfAddLayerToDisplTree(PDF, NULL, -1, NULL);
Previous topic: AddLayerToDisplTree
Next topic: AddMaskImage