title: how to make pdf layers(optional content group) in tree structure
body: <p>I have not long ago post a quesion about how to use the optional content group in pdf. But now I have a new question. How to make these optional content group in a tree structure.</p>
  
  <p>For example. I have 4 different layers. these layers are all OCG layer. 3 layers is text labels, 1 layer have veccotr graphic. So i want it shown as this:</p>
  
  <pre><code>Alllayers
     ---labels
         --layer1
         --layer2
         --layer3
     ---layer4
  </code></pre>
  
  <p>I use a pdf doc as an example
  <img src="https://i.stack.imgur.com/PqXE0.png" alt="enter image description here"></p>
  
  <p>this is in chinese, the chinses character is the name of the layer. Just this meaning.</p>