I need a QR code generator that generates 21500 unique serial number with a QR stamp, and export every 1000 code on a one PDF file, so we’ll have 22 PDF file.
How can I do that?
I need a QR code generator that generates 21500 unique serial number with a
Share
Some time ago I’ve done a similar thing using Python, qrencode and LaTeX. I’ve modified my old code to fit your needs. I assumed you want A4 pages. The contents of the QR Codes are the PMY00001 to PMY22000 ASCII strings.
To use it, write it as e.g.
qrgen.py, add execution permissionschmod +x qrgen.py, createcodesdirectory:mkdir codesand run./qrgen.py 0 >codes.texto generate thecodes.texdocument and thenpdflatex codes.texto generatecodes.pdffile. The 0 argument is the starting serial number.To get 22 such sheets it’s best to use a loop:
Of course this is not the optimal solution – you can probably get a much faster one using Python qrencode library bindings instead of launching external
qrencodeprogram and some library for generating PDFs from Python directly instead of usingpdflatex.