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
1 answer

html2canvas only renders the same image

ticket_list = [0, 1, 2]; function genPDF(){ var deferreds = []; var doc = new jsPDF(); for (let i = 0; i < ticket_list.length; i++) { var deferred = $.Deferred(); deferreds.push(deferred.promise()); …
황준필
  • 135
  • 1
  • 2
  • 15
0
votes
1 answer

Why is html2canvas capturing a smaller byte array canvas for tables on MS Edge than Chrome

Out of curiosity, when capturing the following table using html2canvas, why does MS Edge generate a ~2.5 times smaller image (in terms of byte array length) than Chrome does? Is it due to different APIs provided by the browsers or implementation…
Ryan Chu
  • 1,381
  • 13
  • 20
0
votes
0 answers

How to POST file in a FormData Object from AngularJS to ASP.NET

I'm trying to screenshot an invoice page in html as canvas with HTML2CANVAS, then create a pdf with pdfmake, I need to send the pdf file to the backend via http post, I have this function : $scope.createPdf = function () { …
Ayoub Salhi
  • 312
  • 1
  • 4
  • 19
0
votes
1 answer

Best way to create a PDF with angular 2

what is the best way to create a pdf with angular 2? I tried with pdfmake and html2canvas but I have some problems with rendering charts in IE (ngx-charts). So, do you think that another plugin is better? Thanks
Jamil89
  • 165
  • 3
  • 14
0
votes
1 answer

image get downloaded multiple times

I am trying to download some area of the page as an image. for that, I have used html2canvas.js. that thing is working perfectly but my problem is when i click on download link image is get downloaded multiple times and it won't stop unless i close…
rsp
  • 13
  • 6
0
votes
2 answers

For html2canvas font-family is not working

While converting png using html2canvas and later on I will draw that image on canvas. And I am using multiple font in html. But while converting font is not apply. So it looks different font function getCanvas() { …
Nikhil Arote
  • 11
  • 1
  • 3
0
votes
0 answers

Access control allow origin request blocked error while Convert HTML to Image using html2canvas

I have an image and some text ('p' tags) inside an html tag. Using html2canvas I can convert that html element to image. But When i use an image from server , it say Access control allow origin request blocked error. I also added allowTaint:true,…
AmiLinn
  • 344
  • 1
  • 11
0
votes
0 answers

JSPDF + HTML2CANVAS + Wordpress + Trying to save PDF to folder on server.

I have been using JSPDF and HTML2CANVAS to create a PDF file which has been working great to save the file locally on my machine, however, I've been having trouble getting that file to save to a folder on the server instead of downloading it…
0
votes
0 answers

html2canvas, works in local but not in production

I'm working with html2canvas for a project. I dynamically build some images for some kind of products and then I use html2canvas to save them. This works fine on my local server, but when I submitted everything in production, the code didn't…
A.lberto
  • 1
  • 2
0
votes
0 answers

html2canvas 1.0.0-alpha.12 getting snapshot without background styling

I have object(chair) in .png file and I am changing its color on browser from jquery by changing background color and it is working fine. My question is now I am trying to save this change colored chair image by using html2canvas js library, but…
Aashir Haque
  • 153
  • 1
  • 2
  • 12
0
votes
1 answer

Error when using canvas as texture with HTML2CANVAS in ThreeJS , but WHY ????

CANVAS- to TEXTURE - THREE.WebGLState: DOMException: "The operation is insecure." Why? Try to use existed canvas as texture for object but have error about I think ThreeJS lost context or something other ... : Here is example: jsfiddle code…
den.ts
  • 103
  • 1
  • 8
0
votes
0 answers

Html2canvas color change and zoom

I've added a print functionality in a web page I designed. I used the html2canvas script. However somehow the structure of the page is altered. The web page looks like this: opened in Google Chrome but when the print button clicked it turns to…
user8400716
0
votes
1 answer

Div Screenshot with Javascript and html2canvas.js partially working

Am trying to capture screenshot of an image inside div elements and everything works fine as long as there is static image inside the div elements as per code below. it displays the right base64 image conversion
chinazaike
  • 517
  • 6
  • 19
0
votes
0 answers

Convert Part of HTML code to svg using fabricjs

Can I use fabricjs to convert part of Html code directly to svg file (without convert the HTML to canvas (using html2canvas) then canvas to svg) ?
egmine
  • 1
  • 1
0
votes
1 answer

Unable to set height of html2canvas

Configure the height of the generated canvas as follows , but the height of the actual generated canvas is the pixel height of the screen. I don't know why. Width also does not take effect var opts = { logging: true, useCORS: true, …
Roderic
  • 11
  • 4