Questions tagged [canvg]

canvg is an SVG parser and renderer. It takes a URL to an SVG file or the text of an SVG file, parses it in JavaScript, and renders the result on a Canvas element. The rendering speed of the examples is about as fast as native SVG.

From http://code.google.com/p/canvg/

canvg is an SVG parser and renderer. It takes a URL to an SVG file or the text of an SVG file, parses it in JavaScript, and renders the result on a Canvas element. The rendering speed of the examples is about as fast as native SVG.

131 questions
0
votes
1 answer

canvg SVG rendering to wrong format

I have a piechart with labels and legend which looks fine in SVG but as soon as I use canvg to transform it to canvas some formats are missing / get wrong. SVG: Canvas: I already inline the CSS to apply all CSS settings but still the format does…
gothmogg
  • 72
  • 11
0
votes
1 answer

SVG to Image export performance issues (using canvg / XMLSerializer / getComputedStyle)

I am using canvg to convert a chart svg to an image. We have the issue that by default not all CSS attributes are applied to the image so we ended up using getComputedStyle in a loop. This is a total mess under performance aspects if we have 10 or…
gothmogg
  • 72
  • 11
0
votes
0 answers

Not able to export Highchart "SVG" image in microsoft edge using canvg library

Following code i tried to render and export Highchart SVG Image. I am able to get image downloaded while I Haven't hovered over my image(while there was no tooltip got added) But when i hover over image there is a new element get added which…
Dhawal
  • 84
  • 15
0
votes
1 answer

canvg is returning white screen with base64 string with angular5

I am trying to get a snapshot of svg present on a webpage in IE11. But, every time I am getting only white screen. I have done till now: let targetElem = document.getElementById('body'); let nodesToRecover = []; let…
ngWolf
  • 307
  • 1
  • 6
  • 21
0
votes
0 answers

Why when i use canvg ie throw exception Security error?

I have this code,but when i try to use canvas.toDataUrl i have exception "Security error" in ie 11,how i can resolve this problem? var svg = document.querySelector("svg");//get svg var img = document.createElement("img");//create img var canvas…
StackMan
  • 1
  • 1
0
votes
0 answers

Using html2Canvas to capture SVG image

I'm using html2Canvas library and trying to make a screenshot of a SVG with this code: var svgElements= $container.find('svg'); svgElements.each(function (){ var canvas, xml; canvas = document.createElement("canvas"); canvas.className =…
kari29
  • 1
  • 2
0
votes
1 answer

unable to save chart as image

I have written a function to save the chart as image.Below i have mentioned code which i have written : HTML:
comment
sam140
  • 219
  • 1
  • 5
  • 27
0
votes
1 answer

canvg drawSvg() cannot position svg correctly

I have this svg
0
votes
1 answer

canvg() issue with overlapping tspan

I need to convert an svg element to png. while converting to png the text is getting overlapped and not aligning properly. The actual image is like this: enter image description here The Image after conversion is like this: enter image…
ACHU
  • 11
  • 3
0
votes
0 answers

Issue with canvas.toDataUrl: error when the canvas contains a tag image with base64 data

i'm using this function to convert an svg to a jpeg (it includes canvg): svgToDataUrl(svg, format = 'jpeg') { var id = new Date(); var canvasElement = $(`
Daniele
  • 71
  • 1
  • 2
  • 5
0
votes
1 answer

canvg fails on svg with xmlns

I am using canvg to render the following svg to the canvas however it fails. I am not sure why
Gagan
  • 305
  • 1
  • 13
0
votes
0 answers

What is this strange canvas behaviour

I'm currently trying to create a "screenshot" of a on a website. For this purpose I use html2canvas. The problem is that with html2canvas svg images are not rendered in the resulting canvas. As a work around I'm currently trying to use canvg to…
flamel
  • 1
  • 2
0
votes
0 answers

Not able to convert internal svgs in an svg to canvas with canvg

I have an SVG which embeds other SVG's with . When I use canvg as described here , only the components on the original SVG are converted to canvas and the linked ones are omitted. Any solution?
ManishKG
  • 570
  • 5
  • 18
0
votes
1 answer

Trying to convert an SVG to PNG Image

I have been dealing with this for a bit but I can't seem to get it to work. Onclick to resulting png image is empty. See the code below.... function svgToCanvas (targetElem,fileName) { var nodesToRecover = []; var nodesToRemove = []; …
0
votes
0 answers

Dotted line in pdf file with IE 10

The graph is the same and correct on browser, Chorme, IE11, IE10, etc.... In IE 11, I press a button to create png file, the result is correct. In IE 10, I press a button to create png file, the result is incorrect, the dotted line of graph change…
Kai
  • 345
  • 1
  • 2
  • 11
1 2 3
8 9