Solved

ADOBE ACROBAT JAVA SCRIPT TO SUBTRACT

Posted on 2008-10-15
2
2,387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 250 total points
ID: 22724731
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
ID: 22733230
Thanks this worked great!
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Acrobat’s JavaScript is a great tool to extend the application, or to automate recurring tasks. There are several ways a JavaScript can be added to the application or a document (e.g. folder level scripts, validation scripts, event handling scripts,…
Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe In a previous Experts Exchange article, How To Rename-Move a Batch of PDF Files Based on Contents of the Files (http://www.experts-exchan…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

623 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