-
1. Re: How do i dynamically update table of content page numbers as user inputs data and PDF gets larger?
radzmar Nov 4, 2014 12:54 PM (in response to tjolaoso)Hi,
you can use the page() Method to retrieve the current page number of an object.
Calculate script for a text field:
Returns the page number of the subform 'Chapter2' located on the page named "Page".
this.rawValue = "Chapter 2 - Lorem Ipsum Dolor \t\tPage " + xfa.layout.page(Page.Chapter2);
-
2. Re: How do i dynamically update table of content page numbers as user inputs data and PDF gets larger?
tjolaoso Nov 5, 2014 6:44 AM (in response to radzmar)I'm not able to get this to work yet. I'll explain what i'm currently doing and how i understand the script. (keep in mind still kinda new at this) It might be a bit confusing because you're using a "Page() method" and the page is named "page" so i'm not sure what part of the method is referring to the textfield. Also, i only have two "actual" pages in my PDF. The subforms span pages and create new ones dynamically. Below are the minimized and expanded screenshots of what my document currently looks like. The textfields for the table of contents will be placed on the TOC subform.
I hope that helps. Could you let me know what each part of the method is doing so i know how to manipulate it for each table of contents item? Thanks.
-
3. Re: Re: How do i dynamically update table of content page numbers as user inputs data and PDF gets larger?
radzmar Nov 5, 2014 10:27 AM (in response to tjolaoso)Hi,
if you want to get the page number of the the text field "Structure_Field" on Page 2 you use:
xfa.layout.page(Page2.StructureOfDistrict.Structure_Field);



