2

This similar question was asked a long time a ago (4 years ago). I was wondering if there are any new advancements in the library ecosystem.

My use case is quite simple, I have a styled DIV and some elements within - I'd like to create a screenshot of that DIV.

Takes this:                                            Into this:
----------------------------                           ------------------------
<div class="potrait">
    <img src="sergio.jpg" />   --> Turns it into -->   sergio.png
    <h1>Sergio tapia</h1>
</div>

Is there anything out there that can help me achieve this?

Community
  • 1
  • 1
sergserg
  • 21,716
  • 41
  • 129
  • 182
  • Is your use case client side? – Bruno Nov 22 '12 at 21:53
  • What for a server technology? – Boris Gappov Nov 22 '12 at 21:53
  • I'm using C# and ASP.Net MVC3. I understand it may not be possible to do it 100% client side (in fact I'm 99.9% sure) but I'd be happy with something that packages the info cleanly and send it to my server for processing. – sergserg Nov 22 '12 at 21:56
  • I don't know of any new technologies. See the lots of related question in the right column, their answer still apply. – Bergi Nov 22 '12 at 22:34

1 Answers1

3

You have two possibilities:

  1. rerender the div with a lib like html2canvas
  2. Render it on a server

Taking a real screenshot from js is not possible.

Andreas
  • 492
  • 5
  • 16