Skip to main content
Participant
December 8, 2021
Question

How to run acrobat javascript silently from another javascript?

  • December 8, 2021
  • 2 replies
  • 937 views

I am trying to run the sdkAddSignature.js java script file silently from another javascript. I don't want adobe to run on screen.

I get error saying 'app' is undefined. How to solve this?

What is the right way to call the Javascript file?

This topic has been closed for replies.

2 replies

Legend
December 8, 2021

And certainly, Acrobat must be running. And the document open. That's how it's designed. You can't run it from external JS. 

Participant
December 8, 2021

In this document (https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/pdfs/acrobatsdk_samplesguide.pdf#page=23) it says,

"It is also possible to execute the JavaScript code to sign a PDF document from another JavaScript program,
or from a plugin, Visual Basic (using interapplication communication), or Visual C++ program through the
function ExecuteThisScript."

How can I execute the JavaScript code to sign a PDF document from another JavaScript program?

Bernd Alheit
Community Expert
Community Expert
December 8, 2021

It is possible when you use the function ExecuteThisScript of Adobe Acrobat.

Bernd Alheit
Community Expert
Community Expert
December 8, 2021

You can't call this file. You can use the functions in the file. The file is a application level file for Acrobat.

Participant
December 8, 2021

How to pass the pdf document to the function? Can we pass the path of the document or memory stream? What is the type?

Bernd Alheit
Community Expert
Community Expert
December 8, 2021

Read the documentation in the file. The function uses the open document in Acrobat.