Skip to content
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

QR Code size is not always the one specified? #43

Open
RaileanuVlad opened this issue Jan 10, 2024 · 2 comments
Open

QR Code size is not always the one specified? #43

RaileanuVlad opened this issue Jan 10, 2024 · 2 comments

Comments

@RaileanuVlad
Copy link

I'm using the same html component/template to render different links as QR codes using this package, with a set width/height of 144, but depending on the link given the QR code is sometimes smaller than that, leaving a thick white outline. Is there any way to force/stretch out the QR code to always be the given size?

@MeriMart
Copy link

I have the same problem!
I tried to force the size using "margin", but the margins don't change.

@nicost71
Copy link

nicost71 commented May 10, 2024

@RaileanuVlad Actually I had the same issue, and it took me quite some time to figure it out, but it actually depends on the url.
If you have a long url (and e.g. many url-queries or the like) the qr-code gets more dense, thus if you set the height/width too small, it scales it, giving the (actually transparent) margin on the img.

You can try setting a higher width/height - at least this solved the issue for me..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants