Copy link to clipboard
Copied
I want to attach files to a PDF document using a "attach files" button (script works fine—all is well on this end).
Once files are attached, I would like a total of files attached to show in a form field on the PDF itself. So if there are two files attached, then the field reads "2". If there is one, then the field reads "1".
Thank you in advance!
Copy link to clipboard
Copied
Are you attaching the files as comments or as data objects?
Copy link to clipboard
Copied
Hi, I have the same request 4 years later : )
Attachments are added via
this.importDataObject command.
Thank you in advance again!
Copy link to clipboard
Copied
In that case you can use the dataObjects array to know how many attachments there are:
app.alert("There are " + (this.dataObjects==null ? 0 : this.dataObjects.length) + " attachments in this file.",3);
Copy link to clipboard
Copied
Hey, I ended up not using it, but this was a helpful answer nonetheless! Thx!