Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Are you trying to have them attach files, or embed the images into the PDF?
Copy link to clipboard
Copied
Just attach them. So when I receive the form back I can download and save them.
Copy link to clipboard
Copied
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);
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now