Q:

Which barcode encoding will be best for a very area?

I have to display barcodes on a mobile screen which can only be within 72x28 pixels (in an area of around 1.5cmx0.5cm). I then have to scan those barcodes using a smartphone. I don't have to encode a lot of information - only enough that can be efficiently decoded in this scenario. What is the best poosible barcode encoding to use? I think given that the vertical is very small, 1D barcodes would be better, but I am not bale to figure out the encoding out of all the available options.  

A:

The smallest QR code, Version 1, takes 21x21 pixels. Really, the QR codes are supposed to have a 4-module border on all sides, which would technically make it 29x29 at least. However in practice, leaving one pixel off will probably be just fine, letting you fit into 29x28.
Version 1 can encode up to 41 digits in numeric mode, with the lowest EC level, L.
For 5 digits, a simple Code 128 1D barcode is perhaps an even better choice.

