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

Buttons, Action Wizards, Conditional Statements

New Here ,
Mar 21, 2023 Mar 21, 2023

Hello super smart Acrobat people!

 

Here's my scenario: (I'm using T-shirts as an example to keep it simple)

 

I sell red T-shirts in S, M. and L. 

*  I created a PDF file called Purchase.pdf. This file is a form where I enter my customer's size selection from a drop-down box.

*  I also created three pdf files that summarize my customer's purchase: Red Small, Red Medium, Red Large.

*  And I created an OK button in my Purchase.pdf.

 

What I want to happen:

* When I click OK, I want the corresponding pdf (Red Small, Red Medium, or Red Large) to be launched and saved.

 

What I've done so far:

*  Not using a button or conditional operations, I created an Action in the Action Wizard that deletes one page and adds in another page. This is perfect. The only issue is that I want a button to launch the Action and the Action to depend on conditional statements.

 

So in short, here are my questions:

1.  Can I create a button that launches an Action from the Action Wizard?

2.  Can I create a conditional Action in the Action Wizard?

3.  Will I have to use JavaScript instead of the Action Wizard to make this happen?

4.  Can I attach a conditional JavaScript to a button?

 

Thank you all very much in advance!

TOPICS
JavaScript , PDF forms
801
Translate
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
New Here ,
Mar 21, 2023 Mar 21, 2023

I forgot to add that I'm using Acrobat Pro.

Translate
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 Expert ,
Mar 21, 2023 Mar 21, 2023

1. No, but you can run the same code you used in the Action (although then it won't be a privileged context, so some things might not work).

2. Yes, but only if that action is a part of a script.

3. If you want other people to be able to do it, yes, unless they also have Acrobat Pro and you share the Action with them.

4. Yes.

Translate
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
New Here ,
Mar 21, 2023 Mar 21, 2023

Thank you.

 

Is using JavaScript in Acrobat forms still a common practice? The tutorials I've found are several years old.

Translate
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 Expert ,
Mar 21, 2023 Mar 21, 2023

Yes, very much so.

Translate
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
New Here ,
Mar 21, 2023 Mar 21, 2023

Any recommendations on finding some good tutorials?

Translate
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 Expert ,
Mar 21, 2023 Mar 21, 2023

General JS tutorial (note that only the core syntax applies to Acrobat):

http://www.w3schools.com/js/default.asp

Homepage of the Acrobat SDK, including a link to the full API:

http://www.adobe.com/devnet/acrobat.html

Free tutorials about Acrobat in general, including many JS related ones:

https://acrobatusers.com/tutorials/

A paid-for website with tutorials about Acrobat JavaScript (not related to me): http://www.pdfscripting.com/

My own humble web-site with many tools for Acrobat and Reader (mostly paid-for, some free): http://www.try67.com

 

Translate
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
New Here ,
Mar 22, 2023 Mar 22, 2023
LATEST

Thank you!

Translate
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