I'm looking for strategies to speed up the time it takes for an interactive PDF form to update. As I added more interactive elements it takes longer for the form to update if something is changed.
For example, the "keyboard" wait icon is now on for about 3-5 seconds everytime make an update to a field.
I'm wondering if working on calculation order will improve this, but figure it would be more efficient to see if anyone else has had to address this before diving in and playing with calculation order.
I am having the same issue with one of my PDFs. I about 20 pages, most of them with custom calculating spreadhseets.
Most definitely you want to set the calculating order, not necessarily to speed up but also to avoid getting any funky results in any of the calculations.
As an additional work around , I read here in the forums, how to use :
I distributed the methods above throughout different sections of my PDF.
Using conditional statements in such section, like for example, when the user types in a text fiel, I've included "this.calculate = false" as a custom format script ) which will stop all the resource intensive calculations. This allow the users to fill in and continue to select items from dropdowns and such without the experienced delay(s).
And then setup the calcutions again in another area later in that form, either by use of a button with mouse actions or as a condition that will trigger from another field object.
I agree with you on calcualtion order, think I have that figured out after some wonky updating. By the way I am using v8.1 of the API reference, so calculateNow is on page 277 for me. 🙂
I've been using many hidden value holding text fields instead of more extensive custom claculation scripts as it helps me better track the calculations, making sure various fields are sending the right values, etc. That is Field1A sends a value to Text1 which is then used by Field1B, where I could also have Field1B take the value from Field1A via a custom calcuation script. I wonder if that is part of the issue, I have well over a hundred such text fields to hold values.
A more specific example, is FieldFinal may = x + y + z, and a Field1 priveds x but this value is output to Text1, and FieldFinal would then get the value for x from Text1, likewise with y, and z....now imagine 50 FinalFields and each getting 4-6 variables. 🙂 Elegant it is not.
I beleive all my user interactive fields do some sort of calculation or populate another field.
Could this halting calculation be changed into a global (whole document) command?
I'm thinking of a drop down or button, where the user could select to turn all calculations off docuemnt wide. Make their 3 priamry slections then turn calculations on and force them to run.
Yes that what I did in my form I used a button with this.calculateNow() method.
Thanks again ls_rbls!
Will give this a try.
pdfscritping.com has some very good stuff, it seems though a lot of times it is behind the pay wall...maybe someday I will join but not yet.