11 Replies Latest reply on Sep 30, 2011 12:23 AM by try67

    How to print only pages with selected checkboxes

    FrankyP_Holland

      Hi

       

      Here is what I've got:

      - a PDF with 101 pages

      - page 1 is a form

      - end-user fills in his logo (image-field)

      - this is placed on all the following pages

      - end-user fills in price of all 100 products and

      - decides if he wants this item (page) to be printed by checking a check-box

      - end-user hits a buton and voila; only the checked items print-out

       

      Problem is with this last item; I can not get it right.

      I implemented a script (see below) but it does not work.

      Maybe because I am so not used to this, I putted it in the wrong place?

       

      I know the script works without a Print-Dialog-Box; I could always first present a message or so with instructions or what the pressed button is about to do.

       

      Please help? Thank you very much

       

       

      ------------------------------------------------

      if (getField("Check Box1").value !== "Off") {

      print({

      bUI: false,

      nStart : 1, nEnd : 1});

      }

       

      if (getField("Check Box2").value !== "Off") {

      print({

      bUI: false,

      nStart : 2, nEnd : 2});

      }

       

      if (getField("Check Box3").value !== "Off") {

      print({

      bUI: false,

      nStart : 3, nEnd : 3});

      }

      ------------------------------------------------