[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 13/03/2024 12:25, hw wrote:
On Mon, 2024-03-11 at 23:45 +0700, Max Nikulin wrote:
It seems you expect some number that you can use for any QR code. There
is no size that fits for all codes.

It's because you said: "I believed that 300dpi is high enough
resolution for QR-codes of reasonable size if source image has proper
quality." that I keep asking what you consider a reasonable size.

QR codes with more modules must be printed at larger size. Isn't it obvious?

By the way, is 300dpi real resolution of your printer or it is over-resolution achieved with overstrike with some offset? If so, does the printer driver take it into account?

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.

Did you successfully scan it?

Instantly, no trouble at all.

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.

How can I choose that?  I don't know that there would be an option
with pdflatex or pdf or the printer driver that would let me choose
how many dots per module the printer puts onto the label.

When a code is generated you can look at it and count its modules. The next step is simple math. You have resolution, dots per module and number of modules, so you can get size and rerun LaTeX.

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.

How do you mean?  I thought vector graphics don't blur when scaled.

When vector graphics, that does not match device resolution, is rasterized, the result is either non-even sizes of similar elements or fuzzy lines due to dithering.

If a few multiplications and divisions is so hard problem and each QR code module occupy at least 3x3=9 printer dots then I would try to rotate the code by e.g. 30 or 45 degrees before printing.



Reply to: