cancel
Showing results for 
Search instead for 
Did you mean: 

Page number printing based on body pages

Former Member
0 Kudos

Hi all,

I have a requirement to print page number as mentioned below. Please let me know your ideas.

My adobe form consists of two master pages and a body page for each master page.Body pages contents are flowed, meaning data will get flowed based on the number of items.

Say if the first page is getting printed for 2 pages, then the page number for each page should be 1/2,2/2.

if the second page content is getting printed for 2 pages , then the page number for each page should be 1/2 and 2/2.

If I use Page n of m option, then the numbering is continuous, 1/4,2/4,3/4,4/4.

I want each page and its body page to be treated as separate set.

Is it possible to number the pages separately based on each master page and flow of body pages?

Regards,

Kothand

Accepted Solutions (0)

Answers (2)

Answers (2)

vaibhav_tiwari
Contributor
0 Kudos

Hi Kothand,

I am assuming you have two master pages P1 and P2, two body pages BP1 and BP2.

BP1 is assigned with master page P1 and BP2 with P2. You can show the page numbers separately for two master pages by using below java script:

for page UI element of master page P1:

this.rawValue = P1.index + 1;

for page UI element of master page P2:

this.rawValue = P2.index + 1;

You have to compromise a little bit while displaying the page numbers because using this you can display the pages in format:

"Page #" instead of "Page # of ##".

Suppose you form output is of 5 pages. 3 belongs to Master page 1, P1 and rest 2 are for master page P2, then the actual output will be:

on master page P1, BP1:

Page 1

Page 2

Page 3

and for other pages belonging to P2, BP2:

Page 1

Page 2.

Regards,

Vaibhav

Former Member
0 Kudos

Hi,

Thanks for the suggestions. Our business dont accept numbering as 'page 1, page 2' instead of '1/2 , 2/2.'.

So we used numbering for Body page 1 and calculated the possible number of pages in Body page 2 based on number of items. Though it may not be accurate, business is ok with that. Crazy!!!

Anyway your suggestions are great! and i think SAP should have some solution for this simple problem.

Cheers,

Kothand

Former Member
0 Kudos

Hello,

i think the best way ist to create a 2 variables and add at every master page 1 to var1 or var2 .

At every following site of the first master pages add "1" to var1 .

At every following site of the second master pages add "1" to var2 .

With this coding you can fill your var1 and var2 i think

Put this on every site then i think you can fill var1 and var2 different.

If not you must make a simple coding var1 = var1 + 1 at site1 and var2 = var2 + 1 at site2

// data.#pageSet[0].Seite1.AktuelleSeite::ready:layout - (JavaScript, client)
this.rawValue = xfa.layout.page(this);

Regards

Edited by: Florian Martin on Jun 28, 2011 10:51 AM