Solved

ADOBE ACROBAT JAVA SCRIPT TO SUBTRACT

Posted on 2008-10-15
2
2,069 Views
Last Modified: 2010-08-05
I have a Form that I need a calculated field in, but I don't know the scripting enough to do what I want.  Here is the formula in lamans terms.

((Field 1) - (Field 2) )
Thanks
0
Comment
Question by:nursecore
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 250 total points
Comment Utility
I assume you have three fields, field1, field2 and the result field. I also assume that you created your form in Acrobat (and not in Designer, an application that comes with Acrobat).

Open the properties dialog for your result filed and go to the "Calculate" tab. On that tab select to create a custom calculation script. Click on the Edit button and paste the following one line script into the editor:

event.value = this.getField("Field1").value - this.getField("Field2").value;

Make sure that you replace the field names with the ones that you are using.
0
 

Author Comment

by:nursecore
Comment Utility
Thanks this worked great!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
*Adobe Acrobat 9 was used for this article.  Particular steps may vary depending on software versions. Adobe Acrobat has many, many variables that my be utilized to customize your forms for clarity and ease of use. The Form Editing Tool will be y…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now