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
0
votes
0 answers

Download div containing PHP as image

I'm making an application that renders a collage of images and then allows the user to download the collage. The PHP portion is contained within an html div whose id = 'chart'. My problem is that I'm unable to download the div contents. I tried…
0
votes
1 answer

overflow issues in html2canvas

I am working with ag-grid and I need to make a screenshot using html2canvas. When the table has vertical overflow it exceeds the container. I tried changing the overflow property to hidden before exporting and still it fails. Do we have any…
dharanbro
  • 1,327
  • 4
  • 17
  • 40
0
votes
2 answers

Are there any browser provided APIs to capture a screenshot of the dom of a page directly?

I do not find any APIs to directly support the dom capture. But the html2canvas and kendo.drawing.drawDom libraries take a lot of resources which potentially impacts the performance of my application. I am not able to run these in the Worker since…
0
votes
1 answer

Unable to create pdf from image using jspdf and html2canvas

I am trying to create the pdf file from an image file, but getting the blank pdf file. I draw an image file into the canvas and then trying to create the pdf file. I am using html2canvas and jspdf here is my jsfiddle
Kaustubh Khare
  • 3,280
  • 2
  • 32
  • 48
0
votes
1 answer

svg convert to canvas - can't generate multi pages pdf

I have 12 graphs and I want to generate pdf with 2 pages each page has 6 graphs. However, when I convert svg to canvas, then the jspdf can only see part of both sub-dives. $('#downloadx2').click(function() { var svgElements =…
Hana90
  • 943
  • 5
  • 17
  • 37
0
votes
0 answers

printing only the contents of an div at specific size onto a wireless label printer

I've spent a lot of hours trying to search and fix the problem without success. I need help with my piece of code as I'm not experienced at JavaScript. What I want to achieve is to print only the content of one div directly onto my wireless label…
Gino
  • 40
  • 7
0
votes
1 answer

PDF's generated using jsPDF showing black background issues

I am using jsPDF with HTML2Canvas to generate the PDF and below is my code ts: import * as jsPDF from 'jspdf'; .... exportHTML2() { const options = { background: '#000', }; const pdf = new jsPDF('p', 'cm', [3, 5]); …
VIK6Galado
  • 650
  • 14
  • 32
0
votes
1 answer

Save every x minutes with html2canvas

I want to make a badge from a div like a game badge, I got html2canvas to save to my server by click a button, how ever I want it so I don't need to press a button every time I want a updated image. The script i'm using is function capture() { …
Max
  • 1
0
votes
0 answers

HtmltoCanvas Failed to execute Tainted canvases may not be exported Chrome browser

Throws error when setting a background image. Firefox working perfect but not in chrome $(document).ready(function(){ var element = $("#html-content-holder"); // global variable var getCanvas; // global variable …
0
votes
1 answer

Html2Canvas and Save it with only one click

I have a web form that creates a mail signature according to the datas from the form.And i get screenshot of that signature with "html2canvas" and download that image to my computer. But i can do that with two buttons(btnPreview and btnExport) and…
Hasan Veli
  • 11
  • 3
0
votes
1 answer

Why is the image is not part of the div ? How to add it to DOM?

I have only a button and an image inside the "rightcontainer" div. When I click on the button, it should take a screenshot to the div. It does but the image is not showing only the words. I read about that, and I think because the image is not in…
codeDojo
  • 359
  • 3
  • 16
0
votes
1 answer

html2canvas saving canvas images with extension

I have a web page with button onclick on that button a screenshot of this page should be taken and downloaded with (.jpg) extension. to do that I use the following code: $("#Finish").on('click', function () { // take a screenshot and save…
Noor Allan
  • 421
  • 2
  • 7
  • 17
0
votes
1 answer

html2canvas and Angular4 how to modify options

I am trying to create a download function for my Angular application. I have managed to get this working, but I am having an issue described here: https://github.com/niklasvh/html2canvas/issues/722 The images are from an external source, so are…
r3plica
  • 13,017
  • 23
  • 128
  • 290
0
votes
2 answers

Converting a table to canvas and then downloading the canvas as image using jQuery

I'm using HTML2Canvas to convert a table to canvas and then I try to download the image using a download button. My code is as below: $("input[alt='save-image']").click(function() { html2canvas($("table"), { onrendered: function(canvas) { …
Andrew Fakhry
  • 70
  • 1
  • 1
  • 11
0
votes
2 answers

How do I take a screenshot using HTML2Canvas for a jQuery element?

I'd like to use HTML2Canvas to take a screenshot (base64 representation) of a jQuery selectable list. However, it seems to be unable to interpret the jQuery element. This is how I'm taking the screenshot. …
Eric
  • 3
  • 2
1 2 3
99
100