• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Get Page Number Field Exists Within Using Javascript

New Here ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Is it possible to get the page number that a field exists within using javascript?  I have a 5 page form with 205 fields and I have built the code to export the field property values, for each field.  I would now like to add code to include the page the field exists within.  I have searched and cannot find anything that states anything regarding form pages.  Below is my code to write to the console the form properties.  Once I get it the way I want, I will have it write to an array instead of to the console and then export the array values to a csv file.

for (var i = 0; i < this.numFields; i++) {

   var f = this. getField(this.getNthFieldName(i));

   console.println(i + " | " + (f.type) + " | " + (f.name) + " | " + (f.readonly) + " | " + (f.required));

}

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 06, 2018 Apr 06, 2018

Each field has a property called page that returns that information as a

zero-based number or array of numbers.

Votes

Translate

Translate
Community Expert ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Each field has a property called page that returns that information as a

zero-based number or array of numbers.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

Thank you! That was exactly what I needed.  Where can I get a reference guide to all the properties available to all objects in a pdf form?  Thank you in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

You need to get the "JavaScript for Acrobat API Reference": Adobe - Acrobat Developer Center | Adobe Developer Connection

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2018 Apr 06, 2018

Copy link to clipboard

Copied

LATEST

Thank you.  I downloaded it and will use that to review. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines