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

JavaScript help

New Here ,
Jan 27, 2020 Jan 27, 2020

Copy link to clipboard

Copied

I am creating an inventory document for internal company use. How much can JavaScript automate within a document? As an example: An employee selects a number of storage racks by either entering text or selecting from a drop-down option. Based on the answer to that field, the JavaScript code can create a page with a table of field entries (current table desing is 46 rows by 5 columns; of those, 1 row/column for titles; 45 rows and 4 columns have text entry fields in each cell) - basically pasting an entire page that includes the table and a text entry above the table to title the table. Is there a JavaScript coding capable of doing this? If so, any examples? Thanks!

TOPICS
Acrobat SDK and JavaScript

Views

174

Likes

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 , Jan 27, 2020 Jan 27, 2020

There are a couple of different options here. 

1.  A script inside a document cannot create new pages or content. But it can add new fields to an existing page. And Page Templates provide a way to effectively add new pages. Look up "Page Template"

 

2. If this is for an internal office tool, then you could use a folder level. These scripts have special privileges that allow for creating new pages, fields, and content. As well as many other advanced operations not allowed in form/document scripts

...

Likes

Translate

Translate
Community Expert ,
Jan 27, 2020 Jan 27, 2020

Copy link to clipboard

Copied

There are a couple of different options here. 

1.  A script inside a document cannot create new pages or content. But it can add new fields to an existing page. And Page Templates provide a way to effectively add new pages. Look up "Page Template"

 

2. If this is for an internal office tool, then you could use a folder level. These scripts have special privileges that allow for creating new pages, fields, and content. As well as many other advanced operations not allowed in form/document scripts. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

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 ,
Jan 27, 2020 Jan 27, 2020

Copy link to clipboard

Copied

LATEST

Page Template - exactly what I was looking for! And an old JavaScript how-to (https://acrobatusers.com/tutorials/how-to-build-a-button-that-creates-a-new-page/). Thanks!

Likes

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