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

Adobe PDF validation slowing pdf

New Here ,
May 02, 2023 May 02, 2023

Hi ! I'm having issues with my PDF scripting ..
I'm creating a PDF with a lot of fields (around 450) 

Around 150 of them are Calculation field 

Around 50 of them are actually scripted dropdown that can affect 4-5 other dropdown
EX:  If Dropdown1 = EXCLUSIVE   then
Dropdown2 = someArray1

Dropdown3 = someArray2

Dropdown4 = someArray3...

These are the 20 first line of it

Capture d’écran 2023-05-02 111851.png

Now my PDF run slow ... like 1 selection can take up to 10-15 sec
I'm quite new to work with PDF and i see there is a lot of place where you can imbed your code (Validation, calculate, custom format script, Document Level script, etc ... )

 

My question is ... is this normal that it take that much time if not is there a method or good behavior I should follow to get better ...


TOPICS
Create PDFs , JavaScript , PDF forms
1.4K
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 02, 2023 May 02, 2023

This happens when you use many calculation scripts. 

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 02, 2023 May 02, 2023

That is not a normal time for 150 calculated fields, which is not that many... I've worked with files that had hundreds of calculated fields and it took less than that. Maybe your code is not efficient, or you're doing things in it that can be moved to other events, such as Validation scripts of drop-downs (which only execute when the value of that field is changed, not the value of any field in the file).

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 02, 2023 May 02, 2023

At a more advanced level you could adjust your code to check which field triggered the calculation event (via event.source) and then only update those fields that depend on it. To do that I would recommend combining all the code into a single script, though.

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 03, 2023 May 03, 2023
LATEST

Make sure that the debugger is not enabled, it slows down the forms containing many scripts.

 

Capture_2305031045.png


Acrobate du PDF, InDesigner et Photoshoptographe
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