Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8389711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:48:02+00:00 2026-06-09T18:48:02+00:00

I need a QR code generator that generates 21500 unique serial number with a

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:48:03+00:00Added an answer on June 9, 2026 at 6:48 pm

    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.

    #!/usr/bin/env python
    import random, base64, string, os, sys
    
    width=7.7
    height=7
    
    print "\\documentclass[a4paper,10pt]{report}"
    print "\\usepackage[absolute]{textpos}"
    print "\\usepackage{nopageno}"
    print "\\usepackage{graphicx}"
    print "\\setlength{\\TPHorizModule}{1mm}"
    print "\\setlength{\\TPVertModule}{1mm}"
    print "\\textblockorigin{10mm}{10mm}"
    print "\\setlength{\\parskip}{0pt}"
    print "\\setlength{\\parindent}{0pt}"
    print "\\setlength{\\fboxsep}{0pt}"
    print "\\setlength{\\tabcolsep}{0pt}"
    print "\\renewcommand{\\baselinestretch}{0.8}"
    print ""
    print "\\begin{document}"
    
    idx=int(sys.argv[1])
    
    for i in range(0,25):
        for j in range(0,40):
            b = 'PMY%05d' % idx
            f = os.path.join("codes", b + ".png")
            ff = os.popen("qrencode -lH -o " + f, "w")
            ff.write(b)
            ff.close()
            print "\\begin{textblock}{" + str(width) + "}(" + str(width * i) + "," + str(height * j) + ")"
            print "\\includegraphics[height="+str(height)+"mm]{" + f + "}"
            print "\\end{textblock}"
            idx=idx+1
    print "\\end{document}"
    

    To use it, write it as e.g. qrgen.py, add execution permissions chmod +x qrgen.py, create codes directory: mkdir codes and run ./qrgen.py 0 >codes.tex to generate the codes.tex document and then pdflatex codes.tex to generate codes.pdf file. The 0 argument is the starting serial number.

    To get 22 such sheets it’s best to use a loop:

    for ((i=0;i<22;i++)); do ../qrgen.py $((i*1000+1)) >$i.tex; pdflatex $i.tex; done
    

    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 qrencode program and some library for generating PDFs from Python directly instead of using pdflatex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to verify that a code generated in one class is same as
I've written a code generator, that generates C# files. If the file being generated
I badly need a random file generator that generates a truly random, non-compressible dummy
The following code generates a MS Word document in portrait format. But I need
I need to code certain Dialogs as Activities that look like dialogs. For this
I need your help. I have a C executable called generator.out that is a
I need a 'good' way to initialize the pseudo-random number generator in C++. I've
I want to build a simple code generator in java that can take database
I need a byte generator that would generate values from Byte.MIN_VALUE to Byte.MAX_VALUE. When
I want to work out a bit of code that generates the oscillator wave-type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.