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