JavaScript help

New Here ,
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!

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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. 

TOPICS
Acrobat SDK and JavaScript, Create PDFs, How to, PDF forms

Views

140

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

JavaScript help

New Here ,
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!

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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. 

TOPICS
Acrobat SDK and JavaScript, Create PDFs, How to, PDF forms

Views

141

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
Jan 27, 2020 0
Adobe Community Professional ,
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. 

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
Reply
Loading...
Jan 27, 2020 1
ejgreco LATEST
New Here ,
Jan 27, 2020

Copy link to clipboard

Copied

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
Reply
Loading...
Jan 27, 2020 0