[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 10/3/24 00:20, Max Nikulin wrote:

Looking at a QR code likely having ~75 pixels per inch I find it unreasonably small for delivery labels. I am in doubts if its redundancy is high enough to reliably recognize it if it would be scratched during delivery. Another limitation may be stability of optics in scanners in respect to labels. This one is printed using a laser printer with resolution at least 600 dpi. Each QR code pixel has still 4x4 printer dots in the case of 300dpi, so when image is properly aligned, printer quality is not an issue.

Standard thermal label printers are 203DPI (8 dots per mm).

The problem with printing QR codes and bar codes is not the resolution of the printer but getting the the software drivers to produce a bitmap that is the same resolution as the printer resolution and aligned at the pixel level when it goes to the printer

I have written a CUPS driver for a thermal printer and routinely print labels with barcodes and QR style codes. I have immense problems with PDF labels generated by my local postal service which are generated for a 300 DPI printer. The barcodes especially end up with too thick or too thin bars where the pixel mapping doesn't align. These will not scan.

I have asked the postal service to generate labels at 203dpi which will print just fine at 600 dpi and so work with laser and thermal printers, but they will not cooperate.

I am in the process of developing software to take the issued labels, extract the barcode and QR fields, decode them, and then generate new bitmaps at 203 dpi to replace  the misaligned bitmaps. This is not straight forward as the postal service does not fully comply with the coding rules.

In the meantime I have to extract the QR and bar code fields, enlarge them, and print on separate labels.

As far as printer drivers work, CUPS typically generates a bitmap from a source document such as PDF or postscript, and passes that to a raster printer. This in itself can be a problem as any stage of the process of generation of pdf, 'printing', and rasterisation can misalign and distort pixels. To be absolutely sure of clean output you need a custom program directly driving the printer.



Reply to: