Cordobo / angularx-qrcode

A fast and easy-to-use Angular QR Code Generator library with Ivy support
https://cordobo.github.io/angularx-qrcode/
MIT License
465 stars 126 forks source link

Create qr code programmatically #111

Closed ArkasDev closed 3 years ago

ArkasDev commented 3 years ago

So far i only found the possibility to show the qr code via html. To download the qr-code, the generated image must be accessed and saved after rendering the qr-code. In large scale webapps that are use case driven there should be the possibility to generate the qr code programmatically, so that you can generate the qr code so that components can access it via the service e.g. for a download.

Is there already a suitable option for this use case?

KBeDevel commented 3 years ago

I'm not totally sure, but there should be a way to generate a base64 data URI and then allow a download of the file/content (as an alternative to write a file in the server). You will be able to save these data URIs using LocalStorage.

Cordobo commented 3 years ago

Hi @ArkasDev

the underlying lib node-qrcode is capable of creating dataURIs and other "raw" formats like SVG and PNG. From my perspective, this could/should be achieved with a node.js service in the back-end.

I'm closing this issue for now, please feel free to re-open if you think I got you wrong