Copy link to clipboard
Copied
Hi,
I am trying to implement a delete button in which attached files can be removed from the current document. I need to create a dialog box that lists all the attached files in which the user can choose to delete, and then have the dialog box refresh the list with whatever files are left. I have been looking into the execDialog and Dialog objects as a solution, but I am not sure if this is the best approach. Are there better solutions?
Also, the users will be using Adobe Reader, which is why I am trying to implement a delete button because it does not exist. Is this possible to do in Reader?
I am new to Javascript, so if you know any good resources that will speed up my learning process using it to interact with Acrobat, I would appreciate it.
Thanks.
Copy link to clipboard
Copied
You can't delete file attachments from the PDF using Reader when they are added via the attachments panel. That's not one of the editing functions that Reader can perform.
However, file attachments can be added as annotations attached to a particular page. You can delete these because they are annotations. You won't need a dialog to delete them either, you can just select the annotation and delete it.
Copy link to clipboard
Copied
Thank you for the help.
Would it be possible to do if I were requested to create three buttons that would allow users to attach files as annotations, view them in a separate window, and delete them? If so, any suggestions on resources I can use to accomplish the tasks?
Copy link to clipboard
Copied
Why spend a lot of time and effort on creating something that already exists and is easy to use? The file attachment annotations can be viewed (and edited) in both the Comment panel and the Attachments panel... There's really no need to create another panel to do so using a script.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now