I use Youtube and Vimeo videos. Both companies use iframes to show videos. Whenever I generate a PDF using Prince there is either an empty box or a black box where the video should be. is there a way to just display the first frame of the video or include an alternative image where the video would be?
Forum › How do I...?
Is there a way to include an iframe video on a PDF created by Prince
Prince cannot load videos, so you would need to replace the element with an alternative image before running Prince, or using JavaScript.
Interesting - how do you embed those videos? Do you use a VIDEO element in the HTML itself, or an IFRAME referencing URLs on their sites - or perhaps a javascript library to insert them?
The video element has a poster attribute typically referencing a screenshot or some other presentational graphic. Perhaps some CSS like (untested)
might work?
The video element has a poster attribute typically referencing a screenshot or some other presentational graphic. Perhaps some CSS like (untested)
video{
background-image: url(attr(poster));
}
might work?