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

Get Qrcode with logo saved as svg #6

Closed Neofield-Dylan closed 4 years ago

Neofield-Dylan commented 4 years ago

Greetings,

Is it possible to get the generated Qrcode with logo saved as svg or get a svg string ?

To clarify my use case:

I want to merge many generated Qrcodes with logos into one svg file, so then I do not need to download each one of them, and I could print all of them at once in one A4 page, instead of having to print each one alone.

For this, I need a function to give me the svg string of the generated Qrcode with logo or save it as svg file for later parse it and try to merge all of them together into one svg file. Is it possible to do with this lib ?

Thanks in advance for the help.

ushelp commented 4 years ago

@Neofield-Dylan Sorry for replying to you so late since I have a golden week holiday. If you really need this feature, please contact me via emal inthinkcolor@gmail.com, I can customize for you.

Neofield-Dylan commented 4 years ago

Hi!

Thanks for your reply, but I already got this.

My solution was to use this lib to generate the qrcodes as svg string, then I create a svg with these qrcodes svgs to put all together in a A4 page. This lib do not generate qrcode with logos, but I found out that I could just put my logo on the middle of the qrcode with no worrying about to mess its encoding. The error correction do the job to guarantee that the qrcode is still readable. So, I load my logo as svg too, and add it to the qrcodes inside of . And its done. All of this, I done in server side. Then, the backend send this complete svg to frontend when user hit the button to download it.

Thanks for your reply again. Bye.