Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ADOBE ACROBAT JAVA SCRIPT TO SUBTRACT

Posted on 2008-10-15
2
Medium Priority
?
2,485 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Can Be Caused By Disabled Services I have encountered a problem viewing PDF files using Adobe Acrobat Reader.  For the longest time, PDFs might launch or might not.  Sometimes they took about 15 minutes to appear after launching them. After som…
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 first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
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…

660 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