-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement : Add borders to produced QR codes pictures #44
Comments
Sorry, but I'm not sure that I fully understand the issue that you're facing that requires this change? It seems to me that the limitation you're facing is not unique to this library but instead to any image at all, in your environment, which I feel is out-of-scope for this library. I'm open to discussion on this but I simply don't understand why this is specific to qr.js. |
Hello, Yes, it is probably out of range, it just add the ability to add white borders to the produced code. As it is only a suggestion, I didn't made a pull request. You're certainly right, it is out of scope of this lib.
|
I hope you'll be happy to know that this feature has been added in the latest version. If you're still using qr.js you'll have to upgrade to QRious >= 2.1.0 to get this feature. I intend on documenting this migration soon here but I'm hoping it won't be too complicated if you look at the README. By default, QRious will continue to attempt to determine the best padding automatically but now you can also use the new |
Some printing solution (kiosk / thermal printers like Micronics) doesn't allow to add border styles to pictures.
The result is that the printed QR code is always left aligned.
The only solution was to add "leftBorder" and "topBorder" settings.
Usage :
var qr_data = qr.toDataURL({ value: 'my value', size: 7, leftBorder: 160 // in pixels })
I modified the function canvas() to achieve this.
The text was updated successfully, but these errors were encountered: