Skip to main content
Participant
May 5, 2025
Question

minimize lag when page spawns and document function not calculating

  • May 5, 2025
  • 2 replies
  • 485 views

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

2 replies

PDF Automation Station
Community Expert
Community Expert
May 6, 2025
Thom Parker
Community Expert
Community Expert
May 5, 2025

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;

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Vc00Author
Participant
May 5, 2025

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

PDF Automation Station
Community Expert
Community Expert
May 6, 2025

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