Skip to main content
rayclank
Participant
January 2, 2019
Question

How to click a button on PDF open using Acrobat SDK Javascript / Any other library

  • January 2, 2019
  • 1 reply
  • 1876 views

Generate a pdf using acrobat sdk javascript which does the following things:

  • - It should contain a form with two input fields alpha and beta.
  • - The form has a submit button.
  • - I want to **submit** this form (click the submit button) **on document load** (trigger of the button) of the pdf **without** any prompts or user interaction.
  • - This should submit the form data to a remote url.

The biggest challenge I am facing is:

I am unable to find a way to click a button on load of the document without any user interaction

Action: Click a button

(Can't find the button in the doc let's say using button id or button name)

Trigger: On document load

Any help/ideas are appreciated, thanks!

This topic has been closed for replies.

1 reply

lrosenth
Adobe Employee
Adobe Employee
January 2, 2019

You don’t need to click the button on document load – you can simply execute the Submit action on document load.

rayclank
rayclankAuthor
Participant
January 3, 2019

How to assign an action on document onload? I can't find the option to execute an action on document on load.

Legend
January 3, 2019

Create document level JavaScript. That is executed on load. Mostly it defines functions, but code outside a function is executed at that time.