Friday, February 24, 2012

[pjceijam] QR Codes on a printed page

Pack multiple square QR codes on a US Letter paper for maximum information density.

Assume quarter-inch margins, so the printable area is 8 by 10.5 inches.

The 2 by 3 packing fills 87.5% of the available area (being tight on long dimension).  The 4 by 5 fills 95.2%, being tight on the short dimension.

Nevertheless, the 2x3 packs more information than the 4x5 packing at the same pixel density, due to having less overhead for spaces between codes, and position and alignment markers.

For a certain pixel density, 2x3 packing uses codes of size 471x471 pixels (471*3/10.5 = 134.6 pixels per inch) and 4687 to 4965 decimal digits per code, so 28122 to 29790 digits per page.  4x5 packing uses 267x267 pixels (267*4/8 = 133.5 pixels per inch) and 1251 to 1408 digits per code, so 25020 to 28160 digits per page.

2x2 (76.2%) is 543x543 pixels, 25920 to 26972 digits per page.

The winner, which I didn't consider initially, is 3x4 (98.4% of printable area), 351x351 pixels (133.7 pixels per inch), 28920 to 31440 digits per page.

Used qrencode 3.1.1-1ubuntu1 (Original-Maintainer: NIIBE Yutaka) at default settings. 

No comments :