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

New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

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.

 

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, PDF forms

Views

124

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

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.

 

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, PDF forms

Views

125

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 27, 2020 0
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

I checked very quickly the doc, you are right, it seems interesting.

I'll do some experiments

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

No, not possible.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

mmm ok, so basically this is not what I need.

 

I'm searching a way to do this running Acrobat or everthing else from the command line.

 

I can't find any solution. Do you have other suggestions?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

You can use an Action in Acrobat to do it for multiple files, but it's not as robust as a command-line utility. I can't help you with the latter, I'm afraid.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
New Here ,
Feb 27, 2020

Copy link to clipboard

Copied

Do you know if there is someone able to help me about this topic? For instance an expert in the Adobe Support Community about Adobe Acrobat automation via command line?

Because, I really don't know where I can find this information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

Acrobat can't be automated via the command-line. The solution you need is a stand-alone tool.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0
try67 LATEST
Most Valuable Participant ,
Feb 27, 2020

Copy link to clipboard

Copied

Contact me privately via [try6767 at gmail.com]. I might be able to help you with this privately (for a fee, of course).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 27, 2020 0