Search code examples
iframejspdfhtml2canvas

Video screen not rendered by html2canvas and jspdf, when downloading the webppage as pdf


I tried to download the web page as pdf by using html2canvas and jspdf. All elements of page like radio button, checkbox and label are rendered well. But if I add the embedded video into the page by iframe, it doesn't render at all. Is there any way to render the embedded video into pdf by html2canvas and jspdf? Thanks.

this is the screenshot of web page to be rendered. enter image description here

And this is one of downloaded pdf.

enter image description here


Solution

  • I'm afraid html2canvas cannot render iframes. It says so clearly in the documentation:

    The script doesn't render plugin content such as Flash or Java applets. It doesn't render iframe content either.

    You could do this by other means, but not from the client, AFAIK.