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 and jsPDF, css styling rendered incorrectly in pdf

Below is the image of my website and here's the image of html2canvas and jspdf rendered pdf image HTML:
User123
  • 343
  • 2
  • 7
  • 22
0
votes
1 answer

How to add canvas image in between the other jsPdf elements

I have converted the particular
tag into using html2canvas and I need to add this converted canvas image with other JsPdf elements like Autotables and texts. Thanks.
0
votes
1 answer

Angular 7 and html2Canvas iterating an array using foreach always download the last found index

I am iterating over an array in typescript to take a snapshot of a div having id equal to the index of the array and download an image file. If the array was having 2 rows, 2 images should be downloaded. Here is the script: public toCanvas() { …
alim1990
  • 4,656
  • 12
  • 67
  • 130
0
votes
1 answer

html2canvas download image with background image on SVG

Hi html2canvas & SVG masters maybe you can help me, im trying to download an image from a SVG where the user sets images on the SVG areas, but when i generate the image with html2canvas the background images appears strange and to download the…
Enrique
  • 18
  • 2
  • 6
0
votes
0 answers

Capture nested tags with HTML2Canvas

I'm wondering - using Html2Canvas if I capture a containing
then is there a way to also include a nested tag within said div? I have my capture working but there is essentially a gap where the nested canvas sits on-screen.
scgough
  • 5,099
  • 3
  • 30
  • 48
0
votes
0 answers

Downloading multiple screenshots in one zip file angular

Is it possible to download a collection of screenshots in one zip file using angular html2canvas ?
0
votes
0 answers

HTML5 get base64 code of image created in canvas

var ctx; function roundedImage() { var img = new Image(); img.onload = function() { ctx.beginPath(); ctx.arc(160, 150, 75, 0, Math.PI * 2, true); //draw the circle ctx.lineWidth = 5; ctx.strokeStyle =…
0
votes
1 answer

Drawing on using different coloured markers html2canvas.js

I have been fiddling with this bit of code for hrs now and going round in circles and would like to ask for some pointers please. The code below lets me place as many red dots as possible on a canvas with a bgd image, now what I am looking to do is…
Isitabird
  • 71
  • 9
0
votes
1 answer

Ruby on Rails -- html2canvas not working with wicked_pdf

So I'm trying to capture a morris.js graph using html2canvas and it works fine in html but when I use wicked_pdf for pdf.erb it doesnt work My pdf.erb: <%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"…
0
votes
1 answer

how to convert virtual DOM to an real DOM Element without render?

I use html2canvas to take a screen shot of my page.however html2canvas need an element as a param, but I have a react app and I use a template to get the virtual DOMs.the template need to be reused many times (so I don't want to render them then get…
John
  • 645
  • 1
  • 8
  • 23
0
votes
0 answers

Html2Canvas image (PNG) not downloading in IOS and Android WebView

I am using html2canvas to convert html to image (PNG file) and trigger download in user's device. I have tested the code, works well in all desktop browser but not working in IOS and android webview. Below is the code I am…
Lily.T
  • 123
  • 3
  • 14
0
votes
1 answer

generate images by looping using html2canvas

In my page i have a multiple div blocks. When i generate image with html2canvas I need to know each element id, but console return every time the last block id. Can i get correct id? for example
Lola_Padilya
  • 107
  • 1
  • 7
0
votes
1 answer

Download html and svg to pdf Client SIde

I have used jspdf and html2canvas for downloading Multiple svg into pdf format. It is working fine in Chrome/Edge but not in Internet explorer as it shows Promise is undefined. $("#dwnlPdf").click(function () { …
karun
  • 66
  • 8
0
votes
1 answer

Image created from html is not placed properly on canvas

I am using html2canvas.js to make screenshot from html and jspdf.js to make pdf. My html is like below
{{--some html with image--}} …
Mithu A Quayium
  • 729
  • 5
  • 14
0
votes
1 answer

How to optimize A-Frame html shader text to VR visualization?

Hello everyone so I've been trying to render a book page that is attached to your hand in VR (testing on oculus-go) using A-FRAME. Initially I tried using a plane and applying the text to it using the text attribute and then defining its value,…
João Moreira
  • 99
  • 1
  • 5