EasyQRCodeJS-NodeJS is a NodeJS server side javascript QRCode image(PNG/JPEG/SVG/Base64 data url) generator. Support setting Dot style, Logo, Background image, Colorful, Title and more. Support binary(hex) data mode.
// New instance with options
var qrcode = new QRCode(options);
qrcode.saveSVG({
path: 'qrcode.svg' // file path
}).then(data=>{
console.log("qrcode.svg has been Created!");
});`
Result:
But if I use the saveImage() method and save in png format, then everything is fine. That is, the url of the picture is correct.
Code:
`const QRCode = require("easyqrcodejs-nodejs")
Hi, saveSVG() method doesn't work correctly. Code: `const QRCode = require("easyqrcodejs-nodejs")
// Options var options = { text: "www.easyproject.cn/donation", logo: 'https://image.flaticon.com/icons/svg/32/32441.svg', };
// New instance with options var qrcode = new QRCode(options);
qrcode.saveSVG({ path: 'qrcode.svg' // file path }).then(data=>{ console.log("
qrcode.svg
has been Created!"); });`Result:
But if I use the saveImage() method and save in png format, then everything is fine. That is, the url of the picture is correct. Code: `const QRCode = require("easyqrcodejs-nodejs")
// Options var options = { text: "www.easyproject.cn/donation", logo: 'https://image.flaticon.com/icons/svg/32/32441.svg', };
// New instance with options var qrcode = new QRCode(options);
qrcode.saveImage({ path: 'qrcode.png' // file path }).then(data=>{ console.log("
qrcode.png
has been Created!"); });`Result:
Thanks in advance for the help.