How to Print a Hidden Page TWICE in a PDF using LiveCycle Designer

393 views Asked by At

I'm developing forms with LiveCycle Designer and my colleague at work asked me this question.

I only could think of making a page visible in the prePrint - Event and hide it in the postPrint - Event. But I don't know how to multiply it during runtime.

Does anyone know of cool ways to do this with Javascript (Adobe JS)?

1

There are 1 answers

3
ph6 On BEST ANSWER

It depend on how you print- by using a button build in the PDF and print call in the onClick event or "normal" print.

If you use normal print you can affect the PDF by prePrint and postPrint events, like changing presence of the hidden objects. The easiest way would be here to duplicate the hidden page and make both pages visible in the prePrint event and hide them in the postPrint event.

Second way:

  • Set you hidden page text flow.
  • Select every object on hidden page and enclose with a subform.
  • In the binding option of the subform "Min count" under "Repeat Subform for Each Data Item" set to 1.
  • In the rpePrint after you set visibility of the page to true add "PageName.SubformName.instanceManager.addInstance(1)"
  • In the postPrint event remove add "PageName.SubformName.instanceManager.removeInstance(0)" and set visibility of the page to false.

But if you have a button inside the PDF-Document then you have could call print function. You will have to call the function 2 times with different page-range depending on where the hidden page is