2

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 ?

Danilo Pádua
  • 398
  • 4
  • 17
  • 2
    If 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 Answers1

0

Check out this question answered here. Niklas provided solutions with HTML2Canvas, examples are here

Community
  • 1
  • 1
daxeh
  • 1,083
  • 8
  • 12