10

I need to capture the currently active web page as a screenshot. I've already tried html2canvas & GrabzIt but the problem is that I need a precise screenshot of the page I am on currently. The reason why I don't want to use html2canvas is because it does not always return a good version of a screenshot (not rendering properly) and I don't want to use GrabzIt because it's not free.

Do any of you have an idea how to accomplish this either by using javascript/java/flash? Any option will do as long as it works...

P.S. I'm currently capturing screenshots with my addon for Firefox by using the function that firefox offers : context.drawWindow and now i want to make it available online.

Thanks a lot!

Brank
  • 131
  • 1
  • 1
  • 5
  • possible duplicate of http://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-screenshots – markusthoemmes Feb 07 '14 at 15:56
  • 1
    Hi, please always check Google first. There is a million results when searching e.g. `How to take a screenshot of a web page by using Javascript` If you can't use html2canvas, please explain why - what happens, how do the screen shots go wrong? – Pekka Feb 07 '14 at 15:56
  • Hope you are still looking for a html2canvas alternative? – Blauharley Mar 09 '15 at 18:37
  • Does this answer your question? [Using HTML5/Canvas/JavaScript to take in-browser screenshots](https://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-in-browser-screenshots) – Anderson Green Jan 08 '22 at 12:02

2 Answers2

9

Currently possible alternatives:

rasterizeHTML.js:

this tool looks to be capable to capture a while page containing sophisticated html-structure and an image as well in this demo: http://cburgmer.github.io/rasterizeHTML.js/

Lively 3D:

On the tool's website you can find a demo as well and it is still supported and developed.

http://livelygoes3d.blogspot.co.at/2011/11/rendering-html-on-canvas.html

HTML2Canvas:

Or after all HTML2Canvas because it does not look like that it is put on hold, quite the opposite there is a new release-version of it. And since I used it it might be handle rendering images onto a canvas better.

https://html2canvas.hertzen.com

Old-Answer: I used this package in one of my projects and it worked pretty well. The only complain I have to make on this package is that images are not rendered that well in the final screenshot. But may be it's improved since then.

Blauharley
  • 4,186
  • 6
  • 28
  • 47
  • As I stated before, I've already tried using html2canvas. It is still in a early development stage and it's not 100% accurate. I need something pretty much reliable. Anyways, thanks for the answer. :) – Brank Mar 21 '14 at 15:58
1

In the end, I ended up using server side generation of screenshots with phantomjs. Found it the most reliable in my scenario and it takes pretty decent screenshots.

Brank
  • 131
  • 1
  • 1
  • 5