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
1
vote
0 answers

leaflet+canvg+html2canvas = MyImage.png

Good day my dear friends. I want to create png file from lealfet map. I use html2canvas library, and leaflet map tiles and other elemets converts to png greatfully, but not svg-elements(offsets). I know, that there is some code to redraw all svg…
Triple -B
  • 261
  • 2
  • 12
1
vote
0 answers

Three.js - setting background color of side with SVG texture applied using canvg

I'm using r71 of three.js and canvg library. I'm using canvg to display the SVG but it comes up with the following error. Failed to load resource: the server responded with a status of 404 (Not Found) Here is the following code in question: var…
ACoder
  • 107
  • 1
  • 11
1
vote
1 answer

Drawing a SVG file on a HTML5 canvas at a specific time

I found the topic Drawing an SVG file on a HTML5 canvas about rendering SVG. Is there a way to draw SVG animated file at specific moment of time? I mean, how to change the code var img = new Image(); img.onload = function() { ctx.drawImage(img,…
Maksim Surov
  • 603
  • 6
  • 22
1
vote
2 answers

Export Highcharts to jsPDF - canvg error

I'm looking for a solution about highcharts export to PDF with jsPDF. I used this solution to export my graph as image to my pdf -> Export Highcharts to PDF (using javascript and local server - no internet connection) It's working fine, but for…
abenevaut
  • 768
  • 1
  • 9
  • 23
1
vote
2 answers

Exporting Google Charts with jsPDF working on Chrome, but not on Firefox (blank image in document)

var doc = new jsPDF(); doc.setFontSize(30); doc.setTextColor(244, 070, 017); doc.setFont("courier"); …
user4362504
1
vote
0 answers

canvg nested and floated SVG element does not appear in canvas output

I'm having an issue with canvg. I can't get it to render a right-floated element. The trick I'm using to float elements on the right side of this d3 plot (svg elements do not actually support css float) is to create a nested svg with x=100%, then…
111
  • 1,788
  • 1
  • 23
  • 38
1
vote
0 answers

d3 generated SVG not converting via canvg correctly

I'm running into problems when attempting to convert a d3-generated line scatterplot graph into canvas via canvg. My graph originally looks like this: imgur link Which, when printing the svg via svg.html().trim(), prints this HTML:
ink
  • 101
  • 1
  • 6
1
vote
1 answer

Javascript: How to Save Image with a particular filename instead of download.png

I am trying to download the file as helloWorld.png but it always saves as download.png. Can you help me identify what i am missing? var $container = $('#svg-container'), // Canvg requires trimmed content content =…
1
vote
1 answer

Apply transformation matrix around the center of an element

I am using Raphael to make some manipulations in SVG. In order to save the SVG as image i use Canvg to render the SVG in canvas. But the transformations of images inside the SVG rendered in canvas is not right. Canvg uses native transform() method…
John
  • 1,489
  • 9
  • 17
1
vote
0 answers

create a custom js library, analyzing a personal js file

I would like to know if there is an automated way to analyze my javascript code in search of functions taken from a js library (like jquery and canvg ) and automatically create a minimal version of the library that contains only the features used on…
1
vote
2 answers

How to show multiple external svg graphics in a html5 canvas

I have created a html 5 canvas and added some shapes using ctx.fillRect(X,Y,W,H); and some other javascript functions. Now i want to add a svg graphic in multiple places of that canvas. The reason i want to use a svg is the sharpness & quality of…
direndd
  • 642
  • 2
  • 16
  • 47
1
vote
1 answer

canvg and highcharts how to include chart legend and keep the chart size?

I'm trying to use canvg to draw a highchart inside a canvas. the problem I have is that the chart legends dont appear in the canvas and also the size and quality is reduced. $('#container').highcharts({ credits: { …
Farhad-Taran
  • 6,282
  • 15
  • 67
  • 121
1
vote
0 answers

Rendering SVG images everywhere with Modernizr, CanVG and ExCanvas

The website I'm making (here) has all its images as SVG. But since SVGs aren't compatible everywhere (notably IE <9 and Android browser on versions 2.x), I needed to find a workaround. That couldn't be SVGweb, since that uses Flash, and Flash…
Ariane
  • 393
  • 4
  • 14
1
vote
1 answer

How to export rendered Highchart chart as a pdf/png/jpeg in a Phonegap application?

I am trying to use chart.exportChart({ type: 'application/pdf', filename: 'my-pdf' }); in a Phonegap application with no success, although all is working fine in the browser. My Problem: I want to attach the rendered chart as a pdf/png/jpeg in…
Ishank
  • 2,860
  • 32
  • 43
0
votes
1 answer

Upload an image from a canva javascript to an SVG

Here's the beginning of my codeI made some plots in a javascript canvas and I would like to be able to download them in svg format directly to my computer's hard drive. So I made a button, and a function in javascript, however I must have made a…
1 2 3
8 9