Please help in scripting buttons to add Annot file attachments and list file names in list box

New Here ,
May 05, 2022 May 05, 2022

Copy link to clipboard

Copied

Dear friends

I would love some expert to help with this personal project of mine as I trying to learn javascript (Attached). I would like to form a PDF form that has a button to annot many PDF file attachments and show them beside each other on PDF page and with each file annot addition its name is listed in a list box. When choose a file name in this list box, the corresponding file attachment annot is hilighted. Also, 2 extra buttons that one refresh the list box based on only available file attachments annots on the page. While the other gets the multiple file attachment annots multibly chosen in the list box and perform some script action on them such as (submit by email or move to another PDF page or delete). Thank you and god bless you all.

TOPICS
JavaScript , PDF forms

Views

75

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
Adobe Community Professional ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

I would suggest learning about the PDF scripting model before you get to deep into the exact details of how you want it to behave. 

 

Here's a page that expains the page coordinate system and provides examples of adding form fields to a page using JavaScript. 

https://www.pdfscripting.com/public/PDF-Page-Coordinates.cfm#FldLocate

 

The process of adding annotations through a script is slightly different. 

 

Here's a link to the "dataObjects" document property in the Acrobat JavaScript Reference.  Data object is the terminology used for file attachments in the JavaScript model.

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

You'll need to study this reference. In particular, the docuent, field, and annotation sections. 

 

 

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
Adobe Community Professional ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

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