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

How to print a canvas using html2canvas

I am trying to print a div with an image inside it using html2canvas. function print_cert(){ var element = jQuery("#cert_viewer")[0]; html2canvas(element).then(function (canvas) { console.log("ready"); var…
Muhzin
  • 390
  • 6
  • 19
0
votes
0 answers

Convert html to canvas and download as zip file

I am trying to download different sections of a page as jpeg. There are two ways I'm going about it; One is to include a download button in every section and when it is clicked, the section is downloaded as jpeg; The other is to include a button…
0
votes
0 answers

How to get GIF animation to work when converting html to image/canvas

In my application, I'm trying to convert a div to image and download it. This is my usual div:
Rubioli
  • 670
  • 6
  • 21
0
votes
1 answer

JS: How to create a file of type image, from base64

I'm trying to convert png file, produced by https://html2canvas.hertzen.com/ to a blob file, that I'd send to API. Code below produces such output that API does not throw 400, however the file is somehow corrupted. Is there something wrong with the…
Albert Nemec
  • 781
  • 2
  • 9
  • 13
0
votes
1 answer

I have a bug in the library Html2Canvas - Vue

I want to make a screenshot on the google maps map. I implement the code, by default, of the library and I get the following error by console. Uncaught (in promise) Provided element is not within a Document. He tried to implement a promise with…
0
votes
1 answer

Storing html2canvas canvas object to array

I'm fairly new to React. I am playing with React and html2Canvas. What I am trying to do is use html2canvas to capture "screenshots" of my page but I would like to do so in such a way that I am storing all of my screenshots in a canvas array so I…
NoobNewb
  • 583
  • 2
  • 10
  • 21
0
votes
0 answers

Strange problem when generating pdf online

I have straange problem with jsPDF, when i test on local pc, i generate PDF good, but when i upload online and try to generate, it looks like slipped, like in the picture Here is the link to sample image i have tried just create PDF from HTML, but…
maxileft
  • 225
  • 4
  • 15
0
votes
1 answer

convert div data to image using html2canvas and php

I want to convert my div data to image and stored it in directory and db using Ajax request on button click. The code executes well and stores data both in directory and db but the problem is that when I click the button for first time it does not…
Amir Khan
  • 183
  • 2
  • 16
0
votes
1 answer

Resizing the width and height of an image using html2canvas

I am using html2canvas.js to grab an image from a webpage which the saves it to a directory in the webroot so this the image can uploaded and shared to Facebook. The problem I getting is that the image does not seem to resize and once it is uploaded…
Mauzer1970
  • 11
  • 3
0
votes
1 answer

How to Export HTML Page to a PDF File In Banana Dashboard

I am trying to generate a PDF file out of the banana dashboard. I have made the following changes to the files: Added a div id to the main div in index.html file
Added two js files necessary for PDF generation into…
raikumardipak
  • 1,461
  • 2
  • 29
  • 49
0
votes
1 answer

Is there a way to generated several PDFs from a loop and store them without saving the files to disk?

I am trying generate several individual pdfs from html in a group of elements within a node on a webpage with jsPDF. (Report cards for students). Then I need to email the individual report cards to each students parent using JavaMail. The problem…
Tony
  • 84
  • 1
  • 7
0
votes
2 answers

how can I control the font-size in html2canvas

I'm using html2pdf that creates pdf from html code. It uses html2canvas and jsPDF. The result is very good but slightly different from the original: the font-size and line-height are a little bit different so that the end of the page is not correct.…
Alessandro Dentella
  • 1,250
  • 2
  • 16
  • 30
0
votes
1 answer

html2canvas image not saving

Image is loading properly when I click the button but I am not able to download it. it's just showing on the div. Everything is working fine just image is not saving. My HTML and JS: