Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Hi All,

If you are a regular visitor of Adobe Forums thread, you might have seen a question raised on resetting the page numbering in master pages.

Well, while working on one of the requirement myself and my team at igate came across a very challenging requirement. We had 3 master pages, out of which we knew that the pages which belonged to 3rd master page are fix. But pages which belonged to 1st and 2nd master page were dependent on some conditions, hence total page count could increase or decrease wrt conditions. We had a scenario, where we had a Bank copy, client copy and T&C block. So when we execute our form, it should print all the three copies in the same document. Lets say our Bank Copy has 30 pages, Client Copy has 30 pages, t&c copy has 10 pages so in all total pages were 70. In our case it was printing page numbering as Pg 1 of 70 till Pg 70 of 70.

But we wanted it to print

Bank Copy: Pg 1 of 30  till Pg 30 of 30

Client Copy: Pg 1 of 30 till Pg 30 of 30

T & C Block: Pg 1 of 10 till Pg 10 of 10

in same document.

After doing a lot of brain storming, we thought of calling the Adobe Form twice from our driver program. Here is what we did,

We defined 2 more variables in our interface:

1. Display Type Char1

2. Pgcnt Type Pages (FPFORMOUTPUT)

Then we used these variables in our form. We will call the form and send X as an input value to Display field. In form calc, we wrote a script that when ever Display.rawvalue is X then hide T & C Block. Hence we will get the total number of pages from the Bank and Client Copy in our return FPFORMOUTPUT-PAGES. As they will always be equal, so if we gets lets say 60 as a return value, this automatically means that Bank Copy has 30 pages and Client Copy as 30 pages. Then we will close the JOB. NOTE: When we call the form for very first time, make sure you suppress everydialog and suppress the print preview also. Then we call the form again, now passing the value we received as 60 into Pgcnt vaiable defined above. Using this 60 and collecting it inside the form in a variable or hidden textfield, we can write our own custom Page {floatingfield1} of {floatingfield2} numbering. Floating field 1 should be a numeric value starting with 1 and incremented by 1, while floating field 2 is our value (60) which we colleceted divided by 2 for Bank Copy and Client Copy.

Please let me know if you all need more details.

Rgds,

Nitin.

3 Comments
Labels in this area