cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe form with 2 copies, different headers

Former Member
0 Kudos

Hi gurus,

I've created a form that needs to be printed in two copies. I want the header data (a simple text field) to be different each time. I wanted to see if this is possible with the following restrictions:

  • The printing program cannot be changed (so no calling of the adobe form FM twice)
  • Accomplish this without having to create a second master page (a copy of the first)

I was wondering if this can be done thru scripting, or that there's a variable that may tell how many copies have already been printed so an Alternative can be used...

Cheers,

Marc

Accepted Solutions (0)

Answers (2)

Answers (2)

nsikka
Active Participant
0 Kudos

Hi Marc,

Please check out my blog, Point 1 to fulfill your requirement :

Here, you can put different headers one over the other and hide/display 1 out them conditionally.

Thanks,

Nitin

pavan_prabhu
Active Participant
0 Kudos

Hello Marc,

     Yes, you can do it. The below method will not call the adobe form FM twice and you don't even need to create a new master page.

If the value of header field in Master page changes each time, You need to JavaScript for this.

So you will be having some dynamic data in design view based on which the header will be changing. So fill the value of header in the design view. And write the JavasScript code on the Header Text field of Master page in Ready Layout event as below.

var currpage = xfa.layout.page(this);

var fields = 0;

fields = xfa.layout.pageContent(currpage-1, "field", 0);

for ( i=0; i<= fields.length-1; i++ )

     {

          if ( fields.item(i).name == "HEADER" )

           

              {

                    this.rawValue = fields.item(i).rawValue;

              }

     }

Here HEADER is the field in the design view which contains the value of Header. So whenever the same master page is triggered each time, the Header in the Master page is filled using this HEADER field from design view.