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

SVG stroke width is messy on a html 5 canvas

I am trying to bind an SVG to a canvas. The SVG has a stroke width setup and it seems to be thicker than what it needs to be when bound to the canvas. What could be causing this and how to fix this? The library that I use to bind svg to the html5…
Abishek
  • 11,191
  • 19
  • 72
  • 111
0
votes
1 answer

Issue with canvas to URL function when converting SVG to Image

I am working on a requirement where I need to export google chart as JPEG/PNG image. The below code is working fine in other browsers except Internet Explorer.
Kiran
  • 921
  • 1
  • 11
  • 23
0
votes
1 answer

Save svg as png where svg contains images with external reference

I have an SVG with many image tags referring to external image sources(Say from amazon s3 bucket) . I am trying to convert it into png like this canvg(document.getElementById('myCanvas'), svg); var imgData =…
Jerry
  • 987
  • 4
  • 16
  • 46
0
votes
4 answers

Jquery: convert SVG to PNG with new size

I´m using the following function to transform an SVG into a PNG and offer it as a download: ...some contenthere function() { var svg = $("#chart")[0], bBox = $('#chart')[0].getBBox(); var…
flixe
  • 626
  • 1
  • 11
  • 36
0
votes
1 answer

Canvg | How can I style canvas elements during creation from SVG?

I have an SVG graphic drawn dynamically from data. It looks like this: I am using Canvg to create a (hidden) canvas element and allow the user to save SVG as image or pdf. The Canvas looks like this: The styling is wrong (!) and some paths appear…
emma
  • 784
  • 2
  • 9
  • 23
0
votes
2 answers

Canvg | Converting SVG to Canvas to output as image

I have a complex interactive graphic within an SVG. I want to turn the SVG into a hidden canvas so I can allow the user to output as png/pdf. test111.js creates div#forSVG and then svg#svg within it (plus circles, paths, text). …
emma
  • 784
  • 2
  • 9
  • 23
0
votes
1 answer

canvg toDataURL not returning full image with large chart

I have chart with 4000 x 10000(+). While converting the image it is returning 4000 x 8000 image which is not full image. Code : var canvas = document.createElement('canvas'); canvg(canvas, this.canvas.toSVG()); // this : rapheal object var img =…
0
votes
1 answer

Take snapshot of HighChart with render.text.css

I have a simple highChart with x-axis label disabled. Later I am adding text in chart using the following code function populateDateOnChart(chartID,minRange,maxRange) { var chart = graphChart; if(chart) { var panelPlyGraph =…
Stu
  • 157
  • 3
  • 18
0
votes
1 answer

Try find best solution to make OpenLayers map screenshot using html2canvas. The map elements losing css classes, images don't viewed

So, i know about bad work html2canvas with css. Maybe somebody can help me find best solution. I need make map screenshot with elements. After screenshot i'll getting an image, looks pretty good, but in html all elements(panels, buttons) of map…
John Taylor
  • 131
  • 2
  • 3
  • 16
0
votes
0 answers

canvg does not convert svg text properly

I'm utilizing canvg to convert my d3 generated svg graph into different download formats. All of my data is contained in rectangle nodes and wrapped to fit the specified width. In SVG, the text looks perfect with the wrapping code. Here's how the…
David Ma
  • 59
  • 11
0
votes
1 answer

Capture a DIV with svg

I need to take a snapshot of a div. I used html2canvas and it worked okay. But when I add SVG into the same div it ignores the svg. I also tried drawImage() which did not work either. I read that clone() could do this but did not work.
Fergoso
  • 1,584
  • 3
  • 21
  • 44
0
votes
1 answer

image rendered on canvas converted from svg using canvg is blurry

I'm using canvg to render svg elements onto a canvas and download it using jspdf. below is my code: svgElement = jQuery('#svg'); canvas = jQuery('').attr({ width: svgElement.width(), height: svgElement.height() }).get(0); ctx =…
Aaron Shen
  • 8,124
  • 10
  • 44
  • 86
0
votes
0 answers

Download an SVG image

we are trying to download the svg image as the png and using canvg to convert it into the canvas object.But after download we dont see the image and see the wierd black image and not displayed properly. can u pls fix the fiddle ? …
user3496151
  • 181
  • 1
  • 13
0
votes
1 answer

Convert Raphael canvas inside div to PNG

I've created an SVG using Raphael that I want to capture and convert to PNG and then display in the open window. I have looked at some other stack overflow answers like this one. I implemented ollieg's answer to that question. Here's an example of…
AustinC
  • 826
  • 1
  • 8
  • 23
0
votes
2 answers

SVG Image not converted properly to Canvas using canvg

Original SVG Chart Rendered Canvas Chart This is the code I am using to convert to canvas svg = $('svg').parent().html() canvg('canvas', svg) canvas = document.getElementById("canvas") img_PNG = "
Kiran Kumar
  • 1,610
  • 3
  • 16
  • 22
1 2 3
8
9