[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 14/3/24 06:59, hw wrote:
Manufacturers can provide CUPS drivers as well, but the barcode
application is usually only windows.

In my case I had to write my own CUPS driver as the manufacturer does
not provide one.
How did you do that?

It is simply a C program that gets given some parameters and a bitmap by CUPS

The program processes the bitmap and frames it with printer commands to place the bitmap on the printer page.

CUPS abstracts the actual device interface (in my case USB). But in development I wrote the code to send commands directly to the USB device


Getting back to pixel registration, the latex CUPS route is very
unlikely to work well.
It's working great here since years.  Barcodes are no problem, only qr
codes can't be scanned.


This surprises me greatly. 2D codes have very large features compared to barcodes. They should be relatively immune to pixel quantization.

For reference on a 203 DPI (8 dots per mm) printer, a GS1-128 barcode takes up 12 modules per character. The minimum size of a module is 1 pixel so 1 character is 12 pixels wide or 1.2mm on a 203 dpi printer.

Assuming a 40 character barcode at 1 pixel per module, it will span 48mm.

However it is very unusual to have 1 pixel per module. Instead at 2 pixels per module the barcode is 96mm and at 3 pixels it will be 144mm

With the barcode you have no leeway in the pixel sizes. You must have it exact to scan.

In comparison, a QR code typically will have modules 8 pixels square and typically is 26x26 or 32x32 pixels. At 26x26  the printed code is 26mm square at 203dpi. You can afford to be out by a pixel at those dimensions.

If you have problems scanning QR codes at those sizes perhaps your QR codes are invalid to start with? If you print them out really large will they scan?


Reply to: