Skip to main content
Participant
May 5, 2025 9:16 PM UTC
Question

minimize lag when page spawns and document function not calculating

Hi experts, i was working on this form and ran into issues i cannot figure out whats wrong, and i would like another opinion on it, is there a way to minimize the lag when spawning pages?, i have tried the validate tab, but it doesn't seem to make a noticible difference. Also on P2 my document function doCal(); works on all other pages but gives an error on P2, and i dont see any errors.

 

I attached the PDF below

 

thanks

4 replies

PDF Automation Station
Community Expert
Community Expert
May 6, 2025 12:19 AM UTC
Thom Parker
Community Expert
Community Expert
May 5, 2025 9:27 PM UTC

If the lag is do to calculations, then you can disable calcalculations before spawning and then reanable them afterward.  

For example,

 

this.calculate = false;

this.getTemplates(...).spawn(...);

this.calculate = true;

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Vc00Author
Participant
May 5, 2025 9:33 PM UTC

thanks i will try that, do you know why the document function might not be working on the third page?

Translate
PDF Automation Station
Community Expert
Community Expert
May 6, 2025 12:22 AM UTC

Check the console.  You have errors in the document level script with fields that don't exist.

Translate