Returns the SVG representation of the barcode. The returned string is a self-contained SVG document that can be used as is or converted to other formats using tools like Inkscape and ImageMagick. Both programs provide command-line interface suitable for server-side processing.

This method is obsoleted by exportSVG, but will remain fully functional.


String the SVG representation of the barcode.

Example - get the SVG representation of the barcode

<div id="barcode"></div>
  value: "FOO",
  width: 300
var barcode = $("#barcode").data("kendoBarcode");
var svg = barcode.svg();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(svg); // displays the SVG string
In this article
Not finding the help you need? Improve this article