• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Community Beginner ,
Jan 02, 2019 Jan 02, 2019

Copy link to clipboard

Copied

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!

TOPICS
Acrobat SDK and JavaScript

Views

1.3K

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
community guidelines
Adobe Employee ,
Jan 02, 2019 Jan 02, 2019

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Beginner ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

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

Votes

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
community guidelines
LEGEND ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Beginner ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

I have attempted to do this, it fails while opening in acrobat reader. If it's now too much trouble can you give an example (code snippet) ?

Votes

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
community guidelines
Adobe Employee ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

LATEST

A quick web search turned up a nice page about document level (document opening) scripting from our friends at PDFScripting.com

https://www.pdfscripting.com/public/Basic-Document-Level-Scripts.cfm

Votes

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
community guidelines
Community Beginner ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

Can you tell me how? An example would be appreciated

Votes

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
community guidelines