Skip to main content
February 27, 2020
Question

How to load programmatically a PDF file into an image form field of another PDF?

  • February 27, 2020
  • 1 reply
  • 1876 views

Hi!

 

I need to create a program, script or something similar to be able to fill many PDF files form fields on Windows.

Text fields are very easy to manage in many languages, instead an image field is more complicated when you need to put inside a PDF file and not an image (PNG, JPG and so on). I tried many third party libraries without success.

 

How can I achieve this? I can use vbs or other programming languages without problems. What I searching is an hint and some examples to find the right solution. 

 

Thank you.

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 27, 2020

You can use JavaScript to do it. Read the documentation of the buttonImportIcon method of the Field object.

February 27, 2020

But is it possibile to execute javascript from outside the document via command line? I can't find examples about this.

February 27, 2020

Are you trying to import the PDF file itself as an image, or the data from it (ie, the data in form fields)?


I'm trying to load the PDF file into another PDF with an image form field. With Adobe Acrobat DC it's very easy to do, you can simply click on the image form field and choose a pdf file.

 

What I need is to automate this process for many files running a script via command line. I can't open Acrobat, choose the file and save it, for more than 1000 PDFs. I need to do this automatically in some way.