[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: printing QR-codes on labels with 300dpi label printers with LaTeX



On 11/03/2024 08:06, hw wrote:
On Sun, 2024-03-10 at 09:50 +0700, Max Nikulin wrote:
On 10/03/2024 04:41, hw wrote:
\psbarcode{textblah foo}{height=0.6 width=0.6 eclevel=L}{qrcode}

That works for 600dpi laser printers.  When you print the QR-code with
a 300dpi label printer you can't reliably scan it, not even when you
make the QR-code 1x1" in size.

Perhaps that's not a reasonable size?

Perhaps height and width are chosen improperly. An image some percents
smaller may be sharper.

What size do you consider reasonable?

It seems you expect some number that you can use for any QR code. There is no size that fits for all codes.

Out of curiosity I tried to scan a QR code printed on a thermal printer (so likely having ~200dpi resolution) having size of approximately 0.8in and 50 pixels (modules) per inch. It encodes a 69 bytes long link. Likely the same code scaled to 0.4in will still work, but I would prefer to avoid it, 0.6in should be more reliable. On your 300dpi printer this particular QR code may be printed e.g. at ~(0.8/1.5)in.

Fix size of QR code pixel (module), not size of whole QR code.

- Find number of pixels in QR code in QR specs (or just calculate them)

Calculate them how or find them where?  Pdflatex somehow does it and
the QR-codes are fine when printed on a laser printer and when shown
on a 4k display.

"Modules" in Florent's message is what I referred to as QR code "pixels" and their count depends on "version".

- Specify width and height so that the ration of 2 numbers above is a
whole number.

Image may become a bit larger or a bit smaller.

The QR-code must fit on the label, plus some text.  The labels are
50x35mm in size.

It limits amount of information you may put into QR codes. You can still choose to use e.g. 4,5,6, etc. printer dots per QR code module.

When I zoom in on QR-codes in a PDF viewer, they don't get blurry.
Perhaps the pst-barcode package uses vector graphics?

Nice, however you have to adjust size to avoid blurring.



Reply to: