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

Spawning template specifically & buttons in chrome.

New Here ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

Im trying to make a form. I got a page with buttons to spawn extra templates when need, but cant figure out how to spawn the page at a specific point in the pdf because they have a specific order. And be able to spawn all of them this way. 

 

Heres my most recent code attempt(I know little javascript):

 

var a = this.getTemplate("TOC");

var s = 0;

if ( s<1 ){
s = 1;
var x = 2;
}

x = x + 1;

a.spawn(x,true,false);

 

 

Secondly, during testing I was opening the pdf via google and found that the buttons or spawning code wasnt working in google. Is that normal?

TOPICS
PDF forms

Views

525

Translate

Translate

Report

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

correct answers 1 Correct answer

LEGEND , Sep 18, 2020 Sep 18, 2020

Yes, that's normal. Most non-Adobe PDF viewers have no support for templates or the JavaScript methods used to manipulate them.

 

That code doesn't make a lot of sense to me, since the following is functionally equivalent:

 

// Create a new page after the 4th page of this document

this.getTemplate("TOC").spawn(3, true, false);

 

Why all the variables?

 

Votes

Translate

Translate
LEGEND ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

Yes, that's normal. Most non-Adobe PDF viewers have no support for templates or the JavaScript methods used to manipulate them.

 

That code doesn't make a lot of sense to me, since the following is functionally equivalent:

 

// Create a new page after the 4th page of this document

this.getTemplate("TOC").spawn(3, true, false);

 

Why all the variables?

 

Votes

Translate

Translate

Report

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
New Here ,
Sep 19, 2020 Sep 19, 2020

Copy link to clipboard

Copied

I was thinking the variables could be used so every time the button is pressed the nPage would increase by one.

Votes

Translate

Translate

Report

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 ,
Sep 20, 2020 Sep 20, 2020

Copy link to clipboard

Copied

LATEST

Chrome is a web browser.

Would you expect an HTML file to work in Acrobat as in a web browser?

Votes

Translate

Translate

Report

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