2 Replies Latest reply on Jun 15, 2017 8:14 PM by JR_Boulay

    Spawning pages with OCGs

    JR_Boulay Adobe Community Professional



      I have a PDF form (a contract) with 4 pages and 5 OCGs/layers (1 background and 4 layers for 4 differents contracts).

      Page 3 need to be hidden when one of the four contract is selected (in a combobox).


      Since Reader can only delete pages spawned from a template, I created a template from page 3, I hidden it and spawned a new page as page 3.

      Layers are OK in the new spawned page.

      This is something I use to do with not-layered PDFs, it's OK until now.

      I used this script into the JS Console to spawn the page:

      this.getTemplate("P3.allianz").spawn({nPage: 2, bRename: false, bOverlay: false});

      I did this yesterday.



      Issue is: from now, using this script from the combobox or from the Console spawn the page but the four layers are flattened on page 3.

      When I clic the 5 layers icons to show/hide them: nothing change and all layers are displayed one over the other.


      How did I do to spawn a page with its layers yesterday and why can not I do it anymore today?
      What did I miss?

      Is spawning layered pages supported?


      Thank you.


      (I cannot share this PDF form)