Planet PDF Forum Archive

Planet PDF  ForumThe page you are viewing is part of our 160,000 page discussion forum archive. See below for PDF-related discussions spanning 1999-2008. To ask questions and get help, head to the live Planet PDF Forum.


How to search this archive. The quickest way is to use the filters on our Advanced Search page so that only archive pages are included in the results.


Previous | Next | (P-PDF) What's Wrong with my PDF?


Topic: PDF document not calculating all fields, 1 Attachments
Conf: (P-PDF) What's Wrong with my PDF?, Msg: 143470
From: gkaiseril
Date: 12/3/2005 03:56 AM

Acrobat recalculates when a field that is referenced in a calculation is updated and goes through the fields once. So, if one were to calculate a ratio bases on a sum not yet computed, the ratio will be computed using the prior value.

You do not need to set a field value by "event.value = " but can use 'this.getField("Ratemt.0").value = " in any other field.

The calculation for field "Ratemt.0" has unknown objects and allows for division by zero:

/*
// following code does not exist in Acrobat JavaScript
elm1=document.forms["Timestart"].elements["Timestart"].value
elm2=document.forms["Time.0"].elements["Time.0"].value
*/

var elm1=this.getField("Timestart").value
var elm2=this.getField("Time.0").value

if(elm1!=""&&elm2!=""){
var start_time = this.getField("Timestart");
var end_time = this.getField("Time.0");
var starting = start_time.value;
var ending = end_time.value;
var c_start = util.scand("dd/mm/yy HH:MM:ss", starting);
var c_end = util.scand("dd/mm/yy HH:MM:ss", ending);
var timediff = (c_end.valueOf() - c_start.valueOf()) / 1000 / 3600;
var a = this.getField("mt");
var b = this.getField("CTGmt.0");

var amountdiff = a.value - b.value;
// possible division by zero
event.value = "";
if (timediff != 0)
event.value = amountdiff / timediff;}

Click to open!040-013a-f2 revised.pdf
Partially revised form (605,256 bytes)


PDF In-Depth Free Product Trials Ubiquitous PDF

Pitstop Pro

Now graphic arts professionals have even broader and more expert control over their PDF documents. With...

Download free demo

ARTS PDF Aerialist

The ultimate plug-in for Adobe Acrobat and #1 selling product at PDF Store. Advanced splitting, merging,...

Download free demo

Ubiquitous PDF: Got holiday catering?

Bret Thompson, chef and owner of LA's Milk restaurant on Beverly, has joined forces with the California Milk Processor Board to compile a set of dairy-based recipes for the holiday season.

November 20, 2008
Search Planet PDF
more searching options...




PDF Resources
Platinum Sponsor
Create & Edit PDF - Nitro PDF Software

ARTS PDF

Silver Sponsors

PDF-Tools enfocus

FileOpen PDFNet SDK: PDF Component. Cross-platform PDF library

PDF Converter: Create, Convert PDF to Word/Excel Solid Documents - PDF to Word Converter

Debenu: Desktop Document Management, Archiving and Tagging Software Visual Integrity: Convert, Create, Extract, Merge and Modify PDF

SmartSoft

Get Nitro PDF Professional
Featured Product

NITRO PDF Professional

Built from the ground up, the perfect desktop PDF product for business and enterprise. Nitro PDF Professional has an uncompromising feature set so you can create, combine, edit, collaborate on and...

Featured Event

Adobe Acrobat & PDF Central Conference 2008

September 23 - 25, 2008 - Minneapolis, Minnesota

Dedicated exclusively to Adobe Acrobat and PDF, the 2008 Adobe Acrobat and PDF Central Conference presents a unique opportunity to broaden your understanding of how PDF technologies can positively affect your business productivity.

Discover the new features of Acrobat 9 and expand your knowledge of PDF technology. Participate in various educational seminars, such as Acrobat Form Fundamentals, Acrobat Security, Creating PDF Portfolios, Scripting with the new Flash Annotation in PDF, JavaScript for Acrobat, and much more.

PDF Store Categories