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

Run Java script in Adobe InDesign

Explorer ,
Dec 17, 2023 Dec 17, 2023

Hi,

I converted all the forms from Word to PDF and customized them based on the requirement to have a digital signature (Using Acrobat Pro DC).

 

Some of these tables need to add/delete rows button. The IT department suggested the Indesign and provided me with the subscription. 

 

Unfortunately, I can not find a solution for running any Java Script to add a row to a table created in InDesign. (No name for the table that I can consider as an object).

 

please help me with the JS code, how can I run it in Indesign without knowing the table name?

 

Where I can run JS in Adobe Indesin tool?

 

Thanks in advance,

 

 

TOPICS
Acrobat SDK and JavaScript
748
Translate
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 ,
Dec 18, 2023 Dec 18, 2023

Try the forum for InDesign.

Translate
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 ,
Dec 19, 2023 Dec 19, 2023

You cannot edit a PDF form with InDesign.

You can redesign a new layout with InDesign and export to PDF.

Then with Acrobat Pro you can import the new PDF layout into your form (Page panel : Replace page), the fields will remain in place.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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
Explorer ,
Dec 19, 2023 Dec 19, 2023

Thank you. Is it possible to have a dynamic form in InDesign? I mean create a button to add/delete the row of a table? and also move the extra rows to another page and change the page number?  Most of the examples that I watched on YouTube are for designing the ebooks, and book coverage pages.

Translate
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 ,
Jan 01, 2024 Jan 01, 2024
LATEST

A regular PDF form has a static layout, just like if it was paper. There is a lot that can be done with JavaScript to dynamically add fields, move them around, and delete fields. But this can get to be a monumental managment task. And it will only work when the form is viewed in Acrobat, or another really good compliant viewer. 

A simpler solution is to use Page Templates to add a sheet of fields for expanding the table, again, much like paper documents. 

And since you are talking about tables, an important consideration is naming. Field names directly affect the scripting. A good naming scheme can significantly simplify scripting. 

Take a look at this article, especially the bit about field names:

https://www.pdfscripting.com/public/PDF-Form-Scripting.cfm

 

   

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

Translate
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 ,
Jan 01, 2024 Jan 01, 2024

This can be done with Acrobat Pro, but the form fields do not have the concept of a table, you have to manage fields placed in a grid individually.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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