QMap is a MERN-based web application that analyzes exam PDFs and generates a clean, structured summary of printed page numbers and question distributions. It is designed to work generically on different PDF formats without hardcoding rules for a single document.
-
📑 Total PDF Pages Detection Accurately counts the real number of pages in the uploaded PDF.
-
🔢 Printed Page Number Extraction Detects original printed page numbers from headers or footers, including:
- Top / Bottom
- Top Left / Top Right
- Bottom Left / Bottom Right Supports formats like:
1Page 1(5)Page 10 of 90- 7 -
-
❓ Question Mapping Identifies where questions start in the document using patterns like:
Q1,Q.1Q (1)Question 1
-
📊 Per-Page Summary
- Shows question start–end range per printed page
- Clearly marks pages with no questions
- Handles empty pages gracefully
-
🧠 Generic & Robust Logic
- Works on hidden and unseen PDFs
- Handles missing printed pages
- Does not rely on hardcoded positions or formats
- React (Vite)
- Tailwind CSS
- Axios
- Node.js
- Express.js
- pdfjs-dist (PDF.js)
- Multer (file uploads)
User uploads one or multiple exam PDFs from the frontend.
For each PDF:
- Reads total number of pages
- Extracts text with x/y coordinates
- Detects printed page numbers from header/footer regions
- Detects question starts using regex patterns
- Builds a structured summary per page
Backend returns structured metadata including:
- Total pages
- Printed page sequence
- Page-wise question summary
Frontend displays:
- Overall summary
- Printed page sequence
- Page-by-page question details
{
"fileName": "exam.pdf",
"totalPages": 10,
"printedPageSequence": [1, 2, 4, 5, 6],
"pageSummary": [
{ "printedPage": 1, "summaryLabel": "No questions on this page" },
{ "printedPage": 2, "summaryLabel": "Question 1-5" },
{ "printedPage": 4, "summaryLabel": "Question 6-10" }
]
}💻 GitHub Repo: https://github.com/FaiqaN27/QMap
- ✔ PDFs with missing printed pages
- ✔ Printed page numbers in any corner
- ✔ Empty pages
- ✔ Pages with headers/footers only
- ✔ Different question numbering styles
- ✔ Generic solution (no hardcoding)
cd api
npm install
npm run devcd frontend
npm install
npm run devMake sure to set the backend URL in your frontend .env file.
QMap is ideal for:
- Exam paper analysis
- Academic content review
- Automated document indexing
- Assessment and evaluation tools
QMap Built as part of a MERN assessment focusing on PDF parsing and analysis.