Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

minimize lag when page spawns and document function not calculating

Community Beginner ,
May 05, 2025 May 05, 2025

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

TOPICS
General troubleshooting , JavaScript , PDF , PDF forms
190
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2025 May 05, 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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 05, 2025 May 05, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2025 May 05, 2025
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2025 May 05, 2025
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines