1

This is my last piece of code:

var canvas = document.getElementById('my-canvas');
var ctx = canvas.getContext("2d");

// Draw the window at the top left of canvas, width=100, height=200, white background
ctx.drawWindow(window, 0,0, 100, 200, "rgb(255,255,255)");

// Open another window with the thumbnail as an image
open(canvas.toDataURL("image/png"));

html code:

<canvas id="my-canvas"/><br/>

Note: I have been trying different codes in order to take a complete web page screenshot but with this code I'm only able to take a small piece of the web page image.

Can someone help me with this? I need a simple screenshot code in order to use it with FF, Opera and Safari (I already have a specific code for Google Chrome browser working perfectly).

tshepang
  • 12,111
  • 21
  • 91
  • 136
user2364265
  • 79
  • 2
  • 6

1 Answers1

-1

I'm not sure about Canvas. But this tool might help you achieve the results you're looking for in regards to taking a screenshot of a full page on any website: http://www.thumbalizr.com . It's come in handy many times for me.

KRS77
  • 40
  • 1
  • 10
  • 1
    Thanks for the info but I don't need exactly a tool, I need a simple code (in javascript) in order to take a full screenshot of a webpage. Using HTML5/Canvas/Javascript to take screenshots... this link is not accurate in order to take screenshots, please read the following text: The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does NOT make an actual screenshot, but builds the screenshot based on the information available on the page. – user2364265 May 09 '13 at 19:43