Dynamic Section Headings with Spawned pages
- November 5, 2019
- 1 reply
- 1724 views
Hi,
I have a built a PDF document in acrobat, where i have spawned pages included. I have achieved dynamic section headings (3.1, 3.2, 3.3 etc.) for the document using the following script for a first in line of spawn pages
event.value = "3." + ((event.target.page - 5) * 2);
this.calculateNow();
The problem that i am having is that using this style of code then also modifies section headings after where the spawn page is placed. I have 4 different spawn pages that slot in as additional test pages if needed. I need some help to be able to set a field to start from 1 and then subsequent add fields to find that field and add .1 to it, this needs to work across the spawned pages too.
I have attached a redacted version of the document, if you navigate to page 8 and use the button the add calibrations it works nicely, but then it changes the validation section headings and subsequent add on pages for validations too.
Any help would be appreciated, i have been trying to wrap my head around how to make it work. I thought about using this.numpages() but the total amount of the pages is always changing too.
P.S. Damn my boss for throwing this spanner into the works of an almost completed document!
