-
1. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
MichaelN Nov 4, 2014 8:50 PM (in response to C_D_F)This may help:
Button with JavaScript Action crashes Acrobat
You can turn off the Edit > Preferences > Forms > Automatically adjust tab order when modifying fields.
-
2. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
C_D_F Nov 4, 2014 9:11 PM (in response to MichaelN)Thanks for the suggestion Michael, but that didn't help either.
And this is a local setting, not a setting that saves with the document, which means - if it worked - you would have to tell every person you sent the form to, to go into their settings and turn this feature on/off before filling in the document.
Cheers
-
3. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
Gilad D (try67) Nov 5, 2014 1:27 AM (in response to C_D_F)From my personal experience it's possible to have that many fields, but
you're testing the limits of the application, really.
I don't know if the issue is the poor memory handling process of Acrobat or
what, but working with files with a lot of form fields (especially on a few
pages and with a lot of calculations) can be very frustrating and
time-consuming.
One thing that you can try is to move all the calculations to a single
location, ie not have a custom calculation script for each field that
calculates its value but a single script (for example, the calculation
script of the total), that first calculates the values of each row, assigns
it, and then does the total calculation.
Remember that each time you make a change in *any *field in the file you're
triggering all of the calculation scripts in all of the fields, which can
take a while.
-
4. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
C_D_F Nov 5, 2014 3:32 AM (in response to Gilad D (try67))Thanks for your input Gilad.
Gilad D (try67) wrote:
From my personal experience it's possible to have that many fields, but
you're testing the limits of the application, really.
8 pages is testing the limits? What am I paying for then??
I don't know if the issue is the poor memory handling process of Acrobat or
what, but working with files with a lot of form fields (especially on a few
pages and with a lot of calculations) can be very frustrating and
time-consuming.
Yes to both but that's what the form needs. What's frustrating is paying for something that doesn't do what it advertises.
One thing that you can try is to move all the calculations to a single
location, ie not have a custom calculation script for each field that
calculates its value but a single script (for example, the calculation
script of the total), that first calculates the values of each row, assigns
it, and then does the total calculation.
Not sure what you mean by this. First I'm not using custom calculation scripts. I'm using the inbuilt 'Value is the...' section on the Calculate tab on each line. I'm only using Custom Calc Script in the one field, the GST field, to do a division calculation as 'Value is the...' doesn't do division.
Secondly, I'm having to do a calculation on each line as it shows the total for that line, eg 2 of a $5 item shows total of $10, then next line could be 3 of a $10 item to show $30 etc, so I don't understand what you mean by 'move all calculations to a single location'. How can a single script show individual lines? Can you explain this a bit further or give me an example? What I tried changing just now was to do a hidden sub total at the bottom of each page, then have the actual Sub Total field at the end do a sum on those 7 fields instead of all 185 fields at once. This didn't help either.
Remember that each time you make a change in *any *field in the file you're
triggering all of the calculation scripts in all of the fields, which can
take a while.
Yes I know but like I said this form requires a total on each line, all 185 of them. Can Acrobat not handle this??? And when you say "calculation scripts', do you actually think I'm using individual Calc scripts are you putting 'Value is the...' in the same 'basket' as a Calc script?
Cheers
-
5. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
Gilad D (try67) Nov 5, 2014 4:37 AM (in response to C_D_F)The issue is not with the amount of pages, but with the amount of fields, and mostly, calculated fields.
And it doesn't matter if you use a custom calculation or the built-in command. Finally they're all scripts that have to be executed each time a change is made to any field.
The single-script suggestion basically means you will have one field that has a custom calculation script associated in it. You can use that script to calculate the values of other fields as well. This makes it easier to make more efficient code and to control the field calculation order directly.
It's not a very simple task, though, if you don't know how to write JS code for PDF files.
-
6. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
GKaiseril Nov 5, 2014 11:19 AM (in response to C_D_F)The JavaScript in the PDF is not complied into machine code like a computer language is but the code is read and processed each time the script is called. Also each time a field has to be opened and processed there is some overhead processing the array of fields with calculations and opening each field. As suggested putting all the code in on field removes this overhead. Also using functions to perform a repeated task also requires less process and if the function is at the document level, there is some preprocessing that is not repeated the next time the function is called.
Sometimes processing can be improved by locating some code in the actions for a field, especially is this code only needs to be processed when one exits the field, a validation is an example of this type of action.
You really need to study the JS API reference to learn how the various actions are triggered and the MDS JavaScript reference to learn about the features of JavaScript that can help avoid some coding. For example there is a filter feature for arrays than can quickly remove values from an array without having to process the array through a for loop.
-
7. Re: Calculation Lag - Can't Acrobrat Pro handle 500 fields??
C_D_F Nov 5, 2014 5:53 PM (in response to C_D_F)Thanks for the detailed explanations on how it works/calculates in the background. Looks like I have to learn javascript now. I wish the adobe rep told me this when I rang and asked if this was the right s/ware to do this type of job. They told me sure it has inbuilt functions that help you do this easily...




