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
3 answers

Html2pf/html2canvas/jsPDF not showing borders using bootstrap modal

I'm not sure which of the required libraries is raising this issue, or if it has something to do with Bootstrap, but I can't get the output PDF to show borders. I've tried increasing the width of the border but it just gets ignored, not sure what to…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
0
votes
1 answer

Working with jsPDF and html2canvas in a Vuejs project (without webpack)

I am working on a functionality in a Vuejs project, by which by clicking on a button, the user can export a pdf which will contain certain Vuejs components. All went smooth up to a point. I npm installed the 2 packages, jsPDF and html2canvas (which…
Iulia Mihet
  • 650
  • 1
  • 10
  • 34
0
votes
3 answers

Need two clicks to download image from browser

I am creating an image using html2canvas on a button click event. But I have to click the button twice to get the image to download to my system. Is it possible for me to do this on the first click? I am new to javascript/jquery and so any pointers…
0
votes
1 answer

how to print tag image in html for html2canvas

html2canvas($('#head'), { allowTaint: true, onrendered: function (canvas) { var base64image = canvas.toDataURL("image/png"); console.log(base64image); } }); example
Rufio Rocco
  • 121
  • 1
  • 6
0
votes
0 answers

Using cors-anywhere.herokuapp to download image

I have this code below that consist of a image and a download button. The problem is that by using the library HTML2Canvas to download external image causes CORS issue thats why im using this https://cors-anywhere.herokuapp.com/ to solve the CORS…
Best Jeanist
  • 1,109
  • 4
  • 14
  • 34
0
votes
1 answer

Give space to element if it does not fit within A4 size

I aim to export a long div that has images to PDF format. I am using the Html2Canvas and JSPDF library. I have managed to take a snapshot and export it to JS in different pages as well. However, the issue I face is that the images of the original…
The Doctor
  • 486
  • 1
  • 6
  • 16
0
votes
1 answer

How to Save do an callback/action when all divs are rendered using html2canvas

I am iterating through list of divs,converting them to canvas and then adding them to jspdf. After doing all these I am saving them to disk. function exportDataTablesAsPDF() { var dataTablesToBeExported = $('.js-exportdiv'); …
Simsons
  • 12,295
  • 42
  • 153
  • 269
0
votes
1 answer

HTML2Canvas not rendering D3 font and font size

I have this code below that consist of 2 buttons one for opening the modal that consist of my D3 Force graph and the other for capturing and downloading an image of my modal. The problem is that my graph is set with the Raleway font but when I…
Best Jeanist
  • 1,109
  • 4
  • 14
  • 34
0
votes
0 answers

Generate jsPDF from html2canvas: work around security error? Or force download html2canvas screenshot?

I am trying to generate a PDF that features a screenshot of my wrapper element, using jsPDF and html2canvas. See code below: function printMe() { html2canvas(document.querySelector("#wrapper")).then(canvas => { var dataURL = canvas.toDataURL();…
user10135866
0
votes
2 answers

How can I make PDF from div HTML using html2pdf in javascript, but the same for mobile and pc views

I need export a div tag as PDF, and I am using html2pdf, but when I export from mobile devices the view is different that when export pc (in mobile devices is smaller). My Code HTML y JS:
Darío
  • 1
  • 1
  • 2
0
votes
0 answers

html2canvas combined with watermarkjs

currently I am making a download button on my page via html2canvas, which I successfully got working. But now I want to add a watermark to it before I download it. After a quick google search the watermarkjs library popup, which adds a watermark to…
Tajlang
  • 41
  • 1
  • 5
0
votes
1 answer

Html2canvas are not working on Google line chart in angular.js

Please help me. I am trying to convert a line chart to canvas image. $scope.export = function() { html2canvas($('#div'), { useCORS: true, onrendered: function(canvas) { document.body.appendChild(canvas) } …
Sourav Golui
  • 583
  • 1
  • 6
  • 13
0
votes
2 answers

Html2Canvas and google maps api v3.33 polylines do not appear in image

I am trying to export a google map that includes a route (using polylines) to an image, but in the result the line does not appear. With some css transformation, it worked fine with the google maps api v3.31, but since this version is no longer…
devBre
  • 13
  • 2
0
votes
0 answers

Saving a div as image(images not rendering) with html2canvas

I have made a div with three images(all from external server) and I am trying to save these images as a png image.However when I do this, only the div background and not the images appear on the generated png by the html2canvas library. Is it some…
Anchal S.
  • 1
  • 1
0
votes
0 answers

Html2Canvas is not converting svg image tag into canvas

I would like to create a pdf with dynamic content for that i am using JsPDF and Html2Canvas libraries. Every thing is working fine except the script is unable to convert image tag between svg.
Abdul Qadir R.
  • 1,059
  • 3
  • 9
  • 26