Skip to main content
Participant
October 17, 2025
Question

Add a button for the person completing to add photos

  • October 17, 2025
  • 1 reply
  • 99 views

I am trying to add a button to a fillable PDF so that the person who needs to complete and return the form can add a few pictures.

Is there a way to do this?

Eg.

 

1 reply

PDF Automation Station
Community Expert
Community Expert
October 17, 2025

Are you trying to have them attach files, or embed the images into the PDF?

Participant
October 17, 2025

Just attach them. So when I receive the form back I can download and save them.

PDF Automation Station
Community Expert
Community Expert
October 17, 2025

If the end users have Acrobat you can use this script:

this.importDataObject("Attachment1")

If they only have Reader you will have to create an attachment annotation first.  The following script test the whether the viewer is Reader.  If true it creates the annotation and triggers the attachment function.  If not it reverts to the previous script:

var nm;
if(app.viewerType=="Reader")
{
var num=1;
if(this.getAnnots())
{

var anot=this.getAnnots();
for(var i=0;i<anot.length;i++)
{
if(anot[i].type=="FileAttachment")
{num++}
}
}


var annot = this.addAnnot({
page: 0,
type: "FileAttachment",
name: "Attachment."+num,
author: "Attachment "+num,
rect: [0,0,0,0],
attachIcon: "Paperclip" });
annot.cAttachmentPath;
annot.hidden=true;

}
else
{
if(!this.dataObjects){nm=1}
else{nm=this.dataObjects.length+1}

this.importDataObject("MyFile"+nm);

}