Html2canvas: is there a way to capture iframe content ?

Created on 16 Dec 2014  ·  5Comments  ·  Source: niklasvh/html2canvas

i saw in the limitation that we can't capture iframe of html. but i wonder is there a way to overcome this issue in any other way .

thanks, Avi

Most helpful comment

0.5 will support rendering same origin iframes, example:
https://github.com/niklasvh/html2canvas/blob/master/tests/cases/iframe.html

All 5 comments

See:
https://github.com/niklasvh/html2canvas/issues/376
http://html2canvas.hertzen.com/documentation.html

You could theoretically capture the contents of a local iframe, but not a window with an iframe embedded. It's non-trivial to add, but imagine the feature will be re-integrated at some point.

0.5 will support rendering same origin iframes, example:
https://github.com/niklasvh/html2canvas/blob/master/tests/cases/iframe.html

Is there any cross origin iframe capture?

We are having the same problem that we would like to capture the image inside an iframe from different domains. We tried the subdomain and it is not working :( so any cross origin iframe capture solution?

Cross origin iframes are not possible due to browser security restrictions. You will need a proxy to download the get the contents to the same origin.

Was this page helpful?
0 / 5 - 0 ratings