Copy link to clipboard
Copied
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
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
...Copy link to clipboard
Copied
Is the video just gone and the annotation still there or is the whole thing gone?
J-
Copy link to clipboard
Copied
I believe the whole video is gone. How do I check to see if its leaving an annotation from the video on the page?
Copy link to clipboard
Copied
Use the Multimedia tool again and see if the rectangle is still there. Also did you spawn the page or unhide the template?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Solving a problem should never be an excuse for not drinking... go have a martini
Thanks
J-