QR Print size

10 views
Skip to first unread message

Simon Villaverde

unread,
Apr 5, 2024, 1:00:57 PMApr 5
to qz-print
Hi, maybe this has more to do with ecs/pos than qz-tray but maybe someone can help me.

In my code I have followed exactly the same logic as in this example  Raw · qzind/tray Wiki (github.com).
When I print a QR its size depends on the length of the url, if the url is shorter the QR is smaller and if the url is bigger the QR is bigger. This should not be like this right?
If I use this tool  QR.io: QR Code Generator | Create QR Codes the size is always the same with different urls, the only change is that the QR is more complex.
From what I have researched the vars size0 and size1 should not be changed as they are needed to calculate the url size and the printer needs that, so it has nothing to do with the QR size. Then we have the variable dots, I have noticed that if you change that, the QR size changes, but it is still tied to the QR size and the url length, isn't there some way to make the QR size always the same?

And another question I have is, what does the + 3 in "qr.length + 3" mean?

Thanks and sorry if I'm wrong on something, I'm new to this topic.

Tres Finocchiaro

unread,
Apr 7, 2024, 11:02:29 AMApr 7
to Simon Villaverde, qz-print
I don't think this is possible. If acceptable, you could pad the shorter URL, e.g. https://qz.io?EXTRA_PADDING.

The other option would be to try to use a dynamic CSS scale factor when the element is too large.

--
You received this message because you are subscribed to the Google Groups "qz-print" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qz-print+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qz-print/0eaaa566-486f-4de4-aa64-18cdb69b0bean%40googlegroups.com.

Tres Finocchiaro

unread,
Apr 7, 2024, 11:04:22 AMApr 7
to Simon Villaverde, qz-print
I re-read the question... Assuming it's for ESC/POS, padding the URL would likely be the only option, since you're relying on the printer's firmware to generate the 2D barcode.
Reply all
Reply to author
Forward
0 new messages