I\'m printing some QR codes (from a Ruby script) writing ESC/POS commands to a Epson TM-T20 thermal printer.
BTW, I\'m writing a simple ESC/POS commands printer \"d
I'm not familiar with ESC/POS but I do have some experience with QR codes.
If you're hitting an upper limit on the number of characters you can put in a QR code, there are four things inherent in the QR code design which might be causing it:
You can control the amount of error correction data. More error correction means a bigger QR code but a more reliable scan.
QR codes must be square so you might be bumping up against your printer firmware's "maximum width" and "minimum QR code pixel size" limits.
QR codes are defined in "versions" with each version representing a range of sizes (the higher the version, the bigger the QR code). Your printer's firmware may just not support versions above a certain number.
QR codes support four different encodings with different data limits on each (Numeric, Alphanumeric, Binary, and Kanji).
This means that you should:
Check how much error correction you're putting in. (From most to least, the levels are H, Q, M, and L). You might find that a lower level of error correction still gives you enough reliability while allowing you to squeeze in more data.
Check the spec to see if you can ask for smaller QR code pixels so a wider code will fit on the paper.
Check what the highest supported QR code version for your printer is.
Check which data encoding you're using.
If you're hitting a limit around 400 characters, the maximum version should be somewhere in the 8-13 range for numeric, 11-17 for alphanumeric, and 13-21 for binary, depending on the level of error correction used. (See the reference table I linked before)