Skip to main content
uweb40795041
Known Participant
April 8, 2020
Question

Slow template form

  • April 8, 2020
  • 2 replies
  • 861 views

Hello Community.

I have created the attached form. Here you can spawn additional pages using the three grey buttons at the bottom of the first page. There are three hidden templates.

Spawning an new page with one of the three grey buttons, takes too long time until the page is available.

Second problem is, that the page number is not displayed correctly. Third problem is, that switching language does not work on the spawned pages.

Editing the form in acrobat, with all templates are visible, problem 2 and 3 are working correctly.

Can someone help me?

Thanks ind advance.

 

 

 

 

 

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
April 9, 2020

What do you mean by switching language?

Explain in detial

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
uweb40795041
Known Participant
April 15, 2020

Hello,

at the top is my pdf file appended.

On the first page is a drop down to select the language. It works with the first page and in Acrobat Pro with all visible templates. But at runtime, after spawning a additional page, the language will be switched only at the first page. The spawned page keeps german language.

Bernd Alheit
Community Expert
Community Expert
April 15, 2020

After spawning the page you can execute this.calculateNow()

Bernd Alheit
Community Expert
Community Expert
April 8, 2020

Suspend the calculation:

 

var expTplt = getTemplate('Template1'); 
this.calculate = false;
expTplt.spawn(numPages,true,false); 
this.calculate = true;

 

May be better when you use layers for the languages.

 

uweb40795041
Known Participant
April 9, 2020

Thanks.

The tip works for the slow spawning pages.

Unfortunately there is still the problem that the page numbers are not correct and the language switching does not work.

 

Bernd Alheit
Community Expert
Community Expert
April 9, 2020

Where does you set the page numbers?