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

Is there a way to get URL for the image created using canvas from html or pdf created using jspdf?

Hi I have converted my html page to canvas image and then turned that image to pdf using jspdf library. Now I want to call the ajax function POST or $.post function and send that pdf file link to backend and send it to email using our own email…
John Caverns
  • 67
  • 2
  • 11
0
votes
1 answer

PDFMake Removing border around pdf

Am generating pdf by using pdfmake. PDF generating properly the problem here is it is generating border around the content. i tried to remove them by using layout"'noBorders' and other ways also. but no luck , can anyone sort out this issue. here is…
Sujatha
  • 182
  • 2
  • 13
0
votes
0 answers

html2canvas save and name n images locally

Specifications: html2canvas v1.0.0-alpha.12 (available here) Google Chrome 66.0.3359.181 Linux Mint 18.3 Sylvia Issue: Deepest apologies if this has already been answered—I'm a total novice with JS and online solutions for saving canvasses as…
0
votes
1 answer

HTML2Canvas Save Canvas Error

Looking at using HTML2Canvas to save a HTML div, I am looking at saving the div with the id "imagesave" I have seen examples online of the following code working to do this but when I press download image nothing happens, how can I make this work?…
Curtis Boylan
  • 827
  • 1
  • 7
  • 23
0
votes
1 answer

html2canvas option type: 'view' still render full body

I would like to get only viewport screenshot from the library html2canvas.js, set option type to 'view' should do the trick but i'm still getting the entire body. Don't really get why this is not working actually. Here is the code i'm currently…
fr2Dev
  • 3
  • 2
0
votes
0 answers

html2Canvas query with multiple elements

Would be possible to define multiple elements with a single html2canvas call in order to retrieve multiple pictures to be inserted into a single PDF page? Something like this: html2canvas(document.querySelector("#id1, #id2, #id3,…
Riccardo
  • 1
  • 2
0
votes
1 answer

jsPDF+html2canvas aw snap on chrome, not on firefox

I'm coding a pdf generator with html2canvas + jsPDF. I use a recursive method for this. When I launch it on chrome, it make the 'Aw snap!' exception about the 25th iteration. On Mozilla, I can go over 30 and it won't crash. I don't understand why.…
Bibimission
  • 317
  • 5
  • 17
0
votes
1 answer

JS - Method executes last even though it's invoked first

I have these two functions, where "form" is the name of the Vue object: form.sizeChartAsImage(); form.setSizeChart(); This is the code of said functions: setSizeChart: function () { for (i = 0; i < this.columns.length; i++) { …
NoviceMav
  • 49
  • 2
  • 11
0
votes
1 answer

what to do for the bad quality of jspdf?

I used Html2canvas and jspdf to make a pdf of a webpage. why jspdf make bad quality pdf how can i fix it ? It's so important for me ! is there some options to add to addImage() to fix it ? or something else ... !
0
votes
1 answer

html2canvas toDataURL(image/png") return poor image quality

I tried to use html2canvas to get image screenshot byte from website. However, the screenshot result ended with poor resolution. Looking for advice to improve screenshot quality. Thanks.
vincent
  • 15
  • 1
  • 3
0
votes
2 answers

converting from html to png image on initial button click

I am converting part of the html elements into canvas and converting that into png image. It is working fine but the problem is at the first click it is not converting the html to convas and canvas to png. //HTML To Image on button…
htoniv
  • 1,658
  • 21
  • 40
0
votes
1 answer

Convert node elements to image

I'm looking for library or code snippet which will help me to convert HTML DOM node element to image/png file. I tried to use html2canvas library but it does not render svg nodes, and in my current project i have a lot of them. Also i tried to use…
Vlad Morzhanov
  • 1,260
  • 3
  • 14
  • 29
0
votes
2 answers

Canvas2Image not working in IE11

Canvas2Image giving error in IE11. I am getting an error as Object doesn't support this action in Canvas2Image.js at line var event = new MouseEvent('click',{"bubbles":false, "cancelable":false});
0
votes
2 answers

html2canvas image issue on firefox While working fine on chrome

I am using html2canvas.js and it's working 100% fine in chrome while in firefox it's not showing some div's which are arrows inside my target div am just converting image to base64 and sending it through ajax to server where I save image and…
Aneeq Azam Khan
  • 992
  • 1
  • 10
  • 23
0
votes
2 answers

Get value of the pending Promise

I work on create PDF with pdfmake and i get images of many charts with html2canvas. How i can get the value of the Promise of html2canvas return? CODE var img = { token: html2canvas(document.getElementById("chartContainer")).then(canvas => { …
stefo91
  • 618
  • 6
  • 16