Questions tagged [html2canvas]

html2canvas is a JavaScript HTML-rendering library that lets you take "screenshots" of webpages based on the DOM.

From the official site:

This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. 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.

1794 questions
6
votes
1 answer

html2canvas, jsPDF - how scale/size the page for a "legal letter" PDF page?

I'm creating a PDF by using the entire document.body, turning it into a canvas and passing that to jsPDF. But the image/canvas is too wide. I want to scale it for the page, but jsPDF doesn't have pixel size as a measurement. The options are: pt,…
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
6
votes
3 answers

Capture only current viewport not whole body as screenshot

I'm using html2canvas to capture a screenshot of a site on different devices and send them to a storage via a XMLHTTPRequest. Especially on sites with a lot of content the resulting screenshots tend to be very high and large, although most of the…
user4924966
  • 61
  • 1
  • 3
6
votes
2 answers

html2canvas screenshot capturing current window, not entire body

Trying to capture a screenshot of the entire body of a page (including the fields filled in by user) in javascript, but html2canvas only captures the current window, even when I set the height to a huge number. The html2canvas website examples…
user2657795
  • 79
  • 1
  • 1
  • 4
6
votes
0 answers

HTML2canvas on a scrollable div on Modal dialog

Hi Am using HTML2canvas plugin for converting a DIV inside a modal dialog. The conversion works fine. But that div is having vertical scroll. So on the final image there is nothing was converted after the scrolled hidden area. Only the visible top…
Sandeep Thomas
  • 4,303
  • 14
  • 61
  • 132
6
votes
1 answer

HTML2Canvas combine 2 captured canvases into one

Using HTML2Canvas I'm trying to take a capture of a googleMap (Which works fine) then take a capture of an #overlay div that is over the top of it (Which is there to allow people to place images over the googleMap in specific places)(Works…
Mallander
  • 336
  • 3
  • 16
6
votes
1 answer

change transparent color into white in html2canvas

I am using javascript library html2canvas to save the table of my project. It works fine but when I save the image it shows transparent background color for PNG and background color black for jpeg. Here is what I did: