I've used various frameworks ( html2Image , iframe2image , feedback.js ... ) but without success. Does anyone have any idea of how to generate an image of a < div > with the tag within the page body ?
Asked
Active
Viewed 3,630 times
2
-
2If the iframe comes from another origin, you simply can't without modifying the browser (or proxying the iframe). See [Same Origin Policy](https://en.wikipedia.org/wiki/Same-origin_policy). – Denys Séguret Jul 22 '15 at 13:55
-
Indeed, this is a rather critical security feature of browsers. Imagine how scary it would be if I could load up your bank/insurance/mortgage/etc. sites in an iFrame and take screenshots! – jmar777 Jul 22 '15 at 14:13
-
I found a solution. I had to implement a javascript function that makes the screen shot on the server side , after the capture he sends that result to the client side. – Danilo Pádua Jul 23 '15 at 13:18
1 Answers
0
Check out this question answered here. Niklas provided solutions with HTML2Canvas, examples are here
-
It does not work with Feedback.js when they have a < iframe> tag. The iframe disappears ! – Danilo Pádua Jul 23 '15 at 13:14