ushelp / EasyQRCodeJS-NodeJS

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.
https://easyproject.cn/easyqrcode
MIT License
103 stars 53 forks source link

saveSVG() method doesn't work correctly #18

Closed rprokopenko closed 3 years ago

rprokopenko commented 3 years ago

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: Screenshot_4

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: qrcode

Thanks in advance for the help.

ushelp commented 3 years ago

Duplicate of #19

rprokopenko commented 3 years ago

Also this problem occurs when using the method toSVGText()

ushelp commented 3 years ago

We have release a new version 4.3.4 fixed the issue, please upgrade to the latest version. Thank you.