Wiki › Project

Thai OMR answer sheet generator

Project · tool · 2026

Thai OMR answer sheet generator is a Python library that creates printable answer sheets for optical mark recognition (OMR) in Thai and English. He first wrote it so that a teacher could grade homework without checking every answer by hand, then rewrote and published it for others to use.

What it generates

  • Answer sheets with the exam title, subject, date and student details, and a QR code identifying the student.
  • Blank sheets for students to fill in themselves.
  • True/false tests, essay sections and sections with their own scores.
  • Answer keys.
  • Batches of sheets, from a list in code or from a CSV file of students.

Choices come in presets: Thai letters (ก ข ค ง, with or without จ), Thai true/false (ถูก/ผิด), English letters or numbers. Custom labels such as α β γ δ also work.

How it's built

It draws the PDFs with ReportLab, makes the QR codes with the qrcode package and bundles a Thai font, so the sheets look the same on any machine. An example run takes a few lines:

python
generator = OMRGenerator()
exam = ExamConfig(exam_title="สอบปลายภาคเรียนที่ 2", subject_name="วิทยาศาสตร์ (ป.4)")

The README's disclaimer is candid. The original code was messy, the published version was rewritten with an AI assistant, and some parts may still behave oddly.

See also

In the knowledge graph

Thai OMR answer sheet generator and the 8 things it is linked to. Open any dot for its page, or explore it in the full graph.

When
2023202420252026
Mar 2026 · 3 commits

As data

Everything on this page is read from triples in the knowledge graph. These are the 20 it states about Thai OMR answer sheet generator, and 5 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.

Download
@prefix id: <https://ask.chaipat.cc/id/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cj: <https://ask.chaipat.cc/ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

id:OMRGenerator
    a cj:Project ;
    rdfs:label "Thai OMR answer sheet generator" ;
    cj:description "Generates Thai and English OMR answer sheets; first built so a teacher could grade homework without checking every answer." ;
    cj:context id:OpenSource ;
    cj:repository "https://github.com/AppleBoiy/omr-answer-sheet-gen"^^xsd:anyURI ;
    cj:firstCommit "2026-03-19"^^xsd:date ;
    cj:lastCommit "2026-03-19"^^xsd:date ;
    cj:commitCount 3 ;
    cj:kind "tool" ;
    cj:license "MIT" ;
    cj:theme id:ThemeML ;
    cj:uses id:Python , id:ReportLab ;
    cj:tier 2 ;
    cj:implements id:OMR ;
    cj:handles id:PDFFormat , id:CSVFormat ;
    cj:article "https://ask.chaipat.cc/wiki/OMRGenerator"^^xsd:anyURI ;
    cj:activeIn id:Y2026 ;
    cj:activity _:b113 .