Questions tagged [dom-to-image]

Use this tag for questions relating to issues using the dom-to-image JavaScript (https://www.npmjs.com/package/dom-to-image) library. DO NOT use this tag for reporting bugs in the library, instead raise an issue to the open-source repository: https://github.com/tsayen/dom-to-image/issues.

40 questions
2
votes
1 answer

Node.CloneNode() not a function -dom-to-image.js

I want to create a .png file of a HTML page in angularjs and download it. For this I'm currently using dom-to-image.js and using the domToImage.toBlob function and passing the node element to it. But internally when it goes to dom-to-image.js it…
1
vote
0 answers

dom-to-image is not working in safari when trying to convert more than one image to JPEG

I want to create a website where the user can customize t-shirts. The user can upload a picture which is then added to a canvas (user can resize and move the picture on the canvas, this is done with fabric canvas). Link to the Website Before…
tims
  • 512
  • 3
  • 14
1
vote
0 answers

leafletjs easyPrint Plugin Tainted canvases may not be exported

I'd like to use the easyPrint leaflet plugin (from here: http://rowanwins.github.io/leaflet-easyPrint/) to export a map to image. All says this is best and will work but I have to struggle with following error message: Failed to execute 'toDataURL'…
Ole_S
  • 356
  • 1
  • 3
  • 21
1
vote
0 answers

html to image for more than 100 divs fails

I am using html-to-image library to convert div element to image, which is working fine for single div, but if i use it for divs in for loop then it breaks
y2358
  • 50
  • 1
  • 7
1
vote
1 answer

Convert SVG with image not working in safari

i want to convert a SVG with an image inside into a png. In Firefox and Chrome everything works perfect, but in Safari the conversion is ignoring the image inside the SVG. The library i am using is html-to-image (html2canvas gave me the same…
Martin P
  • 13
  • 4
1
vote
1 answer

Angular 12 : c.getComputedStyle is not a function

I'm using the new dom-to-image lib and I'm facing this error when I try to call the toPng method inside of a component. import domtoimage from 'dom-to-image-more'; export class MyComponent { @ViewChild('leafletMap') leafletMap: ElementRef; …
tbarbot
  • 225
  • 1
  • 4
  • 18
1
vote
0 answers

How to generate an image from a leaflet map (with a webGL Heatmap layer) using JavaScript?

I have a functionality where I need to render a leaflet map with some Polygons and Markers. I was able to use domtoimage and was able to extract the entire map as an image using the following code await new Promise(resolve => tileLayer.on("load", ()…
Navaneeth
  • 190
  • 1
  • 1
  • 16
1
vote
1 answer

How to add filter for div elements by class/id for dom-to-image library?

can someone help me ? i will use dom-to-image library, but i can't write filter for div classes or div id's. I tried to google, but I didn't learn anything more about filtering. here is my code. : function filter (node) { return (node.tagName…
Števo Kelbel
  • 75
  • 1
  • 6
1
vote
0 answers

couldn't get a good image quality when used DOM to Image

I'm working on a meme editor web app using DOM to image library and FileSaver.JS to save the image. Saving the image using the PC screen is somewhat good, but when it's saved using the phone screen the image that shows up is a pixelated image. Here…
1
vote
0 answers

Converting dom to svg image and displaying it in pdf file

I am using a dom-to-image library for converting an HTML table to an SVG image and displaying that image in the pdf file using MPDF library later on. HTML This table is an example
1row1column
Mohammed Ali
  • 140
  • 2
  • 10
1
vote
0 answers

Error when converting image using domtoimage library

I am using domtoimage library to convert SVG element to blob. I am getting the below error. How to troubleshoot what is the error. function download1(){ alert('one'); console.log('Inside Image Blob Creation Flow'); …
Arul
  • 143
  • 3
  • 12
1
vote
0 answers

esc/pos printing image with angular and ionic cordova

Im creating a div with my data and with the help of domttoimage getting image element and trying to send result to encoder! domtoimage.toSvg(container, { width: 400, height: 240 }).then((dataUrl) => { let img = new Image(); img.src =…
Danyl
  • 61
  • 4
1
vote
0 answers

Dom to Image plugin not capturing proper dropdown value

I'm using dom-to-image plugin in my angular app to capture the pic of a div. I'm able to capture the div in everyplace except when there is a dropdown in the div. I do not get the selected dropdown value captured when capturing the image. I have a…
Jijo Robin
  • 365
  • 9
  • 27
0
votes
0 answers

dom-to-image resize the blob

This vue with dom-to-image the blob created before going the the method resizeBlob has high quality but the image is so big, after being pass to the method resizeBlob it makes the blob low quality. the reason i did not change the size at first its…
RedBlue
  • 41
  • 5
0
votes
0 answers

how to erase background color when using domtoimage

i wanna make dom to image for posting the image on instagram story. so i use dom-to-image library and file saver. domtoimage .toBlob(card, { width: card.clientWidth * scale, height: card.clientHeight * scale, …
1
2 3