Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
I forgot to add that I'm using Acrobat Pro.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you.
Is using JavaScript in Acrobat forms still a common practice? The tutorials I've found are several years old.
Copy link to clipboard
Copied
Yes, very much so.
Copy link to clipboard
Copied
Any recommendations on finding some good tutorials?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thank you!