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

Page Template Issue

New Here ,
Feb 16, 2018 Feb 16, 2018

So I am working on spawing a page template when a button in my PDF is clicked, then destroying it when the page is left. The page template has a video embedded that gets lost each time I spawn the template. All of the other items on the page show up, (text and button) but the video gets stripped. What am I doing wrong here?

Any help would be greatly appreciated!

because someone is bound to ask. Windows 10, Acrobat Pro DC

TOPICS
Acrobat SDK and JavaScript , Windows
1.0K
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

correct answers 1 Correct answer

Community Expert , Feb 16, 2018 Feb 16, 2018

Ok - First... Never, never, NEVER.... build interactive PDF in InDesign if you are planning on automating it using scripts. Put the pages together in InDesign and then add the interactive components in Acrobat. I'll spare you the details; just trust me on this one.

You seem to know how to create a template so I won't go into that. Hiding and showing it uses the hidden property. So to show a hidden template use...

this.getTemplate("Resources").hidden = false;

To hide it use true instead of false.

If

...
Translate
Community Expert ,
Feb 16, 2018 Feb 16, 2018

Is the video just gone and the annotation still there or is the whole thing gone?

J-

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
New Here ,
Feb 16, 2018 Feb 16, 2018

I believe the whole video is gone. How do I check to see if its leaving an annotation from the video on the 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 ,
Feb 16, 2018 Feb 16, 2018

Use the Multimedia tool again and see if the rectangle is still there. Also did you spawn the page or unhide the template?

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
New Here ,
Feb 16, 2018 Feb 16, 2018

So its stripping the video completely. It would be preferable to unhide the template instead of spawn one. Is that possible?

I am currently using the following code to spawn the template:

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

a.spawn ();

A little more detailed info: I build this .PDF in InDesign and need to "hide" and "show" these pages when a user clicks on certain buttons.

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 ,
Feb 16, 2018 Feb 16, 2018

Ok - First... Never, never, NEVER.... build interactive PDF in InDesign if you are planning on automating it using scripts. Put the pages together in InDesign and then add the interactive components in Acrobat. I'll spare you the details; just trust me on this one.

You seem to know how to create a template so I won't go into that. Hiding and showing it uses the hidden property. So to show a hidden template use...

this.getTemplate("Resources").hidden = false;

To hide it use true instead of false.

If that doesn't fix the issue, file a bug report. The entire page content should still be there between hides and shows. I imagine that a rich media annotation maybe shouldn't survive a page spawn because a page can be spawned multiple times; while unexpected, that might actually be the correct and desired behavior.

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
New Here ,
Feb 16, 2018 Feb 16, 2018

Joel,

That was the solution! THANK YOU!!!!! I have been trying to figure that issue out all day! THANK YOU! THANK YOU! THANK YOU!

I will be sure to do all interaction in Acrobat from now on! You saved me a huge night of frustration and drinking!

Again thank you so much man!

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 ,
Feb 16, 2018 Feb 16, 2018
LATEST

Solving a problem should never be an excuse for not drinking... go have a martini

Thanks

J-

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