These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Time Use in a Large Spreadsheet-pdf file

billycar
Registered: Aug 23 2007
Posts: 25

Acrobat 6 Pro on a Dual 1GHz Quicksilver, Under OS X 10.3.9

I'm calculating the difference between start and end times, for many tasks, for all days of the week. Is there a way to speed this up? Imagine 20 tasks on a page, with 7 days ... giving 140 start/end times ... 140 calculations of Time Differences ... hopefully, only when called upon? Then imagine 3 pages of tasks in the document.

My spreadsheet-pdf form takes a relatively long real-time to operate. I have a Dual 1GHz Quicksilver, and it takes ~8 seconds to retrieve a time, with a Form Field running a JavaScript:

var fld = this.getField("PartI.Mon.StartTime");

fld.value = util.printd("m/d/yy HH:MM",new Date());

What is taking so long? The 8 second delay when asking for a time is somewhat maddening. To calculate the difference in start and stop times for a task, I use a call to the following Document Function:

function TimeDiff(strStart,strEnd) {

var diff = 0;
//
// get date time objects
//
var timeStart = util.scand("m/dd/yy hh:mm",strStart);
var timeEnd = util.scand("m/dd/yy hh:mm",strEnd);
//
// compute difference of the values for the date time objects in minutes
//
diff = Math.floor((timeEnd.getTime() - timeStart.getTime()) / 60000);
//
// return result
//
return diff;
//
// end function
//
}

Here is the JavaScript that calls the function:

var strStart = this.getField("PartI.Mon.StartTime").value;

var strEnd = this.getField("PartI.Mon.EndTime").value;

event.value = 0;

if (strStart != "" & strEnd != "")

{

event.value = TimeDiff(strStart, strEnd);

}

Is there a way to speed this up?

billycar
Registered: Aug 23 2007
Posts: 25
Could it just be the Refresh rate of an over-stuffed pdf file? I turned off Enable Print Preview, but no change there.

The response for a single line (One Task line of Start/Stop and Difference for 7 Days), is almost immediate. My actual file has 20 tasks, 2 Boxes per (start, stop) two more for Text, and 1 more for Difference). So for 1 task, 7 days ... 35 boxes to refresh ... for 20 tasks, 7 days ... 700 boxes to refresh (every time you change one entry).

Possibly its just the refresh rate for so many Boxes?

Whatdoyouthink?
billycar
Registered: Aug 23 2007
Posts: 25
See also
http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=1048

where I determine that local calculations are better than global in a spreadsheet-like pdf form, where applicable.