This is yet another QR Code generator.
png, svg, eps and pdf formats;npm install qr-image
Example:
var qr = require('qr-image');
var qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));
var svg_string = qr.imageSync('I love QR!', { type: 'svg' });
qr = require('qr-image')
qr.image(text, [ec_level | options]) β Readable stream with image data;qr.imageSync(text, [ec_level | options]) β string with image data. (Buffer for png);qr.svgObject(text, [ec_level | options]) β object with SVG path and size;qr.matrix(text, [ec_level]) β 2D array.text β text to encode;ec_level β error correction level. One of L, M, Q, H. Default M.options β image options object:
ec_level β default M.type β image type. Possible values png (default), svg, pdf and eps.size (png and svg only) β size of one module in pixels. Default 5 for png and undefined for svg.margin β white space around QR image in modules. Default 4 for png and 1 for others.customize (only png) β function to customize qr bitmap before encoding to PNG.parse_url (experimental, default false) β try to optimize QR-code for URLs.zlib.deflateSync instead of pako.