Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Rounding Up in Acrobat javascript

Posted on 2004-09-09
1
Medium Priority
?
1,130 Views
Last Modified: 2008-01-16
Is there an equivalent of math.ceil to round up a number in Acrobat javascript?

I am multiplying .0212 by 5200, which produces 110.24

I want the result displayed in the textbox as a rounded-up whole number: 111

How would this be expressed?

Ordinarily these two numbers are variables in javascript code.

On the format tab in Text Field properties, would you set the number for 2 decimal places, so as to have something for the rounding to work on?

Thank you for your help.
0
Comment
Question by:goodmorals
[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
1 Comment
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 1000 total points
ID: 12021655
You would use the Math.ceil() function for this. Let's assume you have two variables v1 and v2 that you want to multiply, and a variable r (for result or rounded) that will store the rounded up value:

r = Math.ceil(v1 * v2);

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
PDF files have been in the limelight due to its unmatched features.  Personal documents, emails, business reports and eBooks are all converted into PDF files owing to peerless features provided by it. Adding watermark to a PDF file is a method to se…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

636 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