PenWork
HomeBlogOCR Question Extraction

Tutorial · 5 min read

How to Use OCR to Extract Questions from a Question Paper

Upload any question paper photo or scan, extract the questions with free browser-based OCR, and generate full handwritten answers with AI — all without leaving your browser.

Got a question paper and need handwritten answers fast? Penwork's OCR feature lets you photograph or scan your question paper, extract the questions automatically, and then generate structured, detailed handwritten answers using AI — all in your browser for free.

This guide walks you through the complete workflow from upload to PDF download in 7 simple steps.

Privacy note: The OCR step runs 100% in your browser — your question paper image never leaves your device.

Step-by-step: question paper to handwritten PDF

Step 1: Open the "Upload Questions" tab

On the main Penwork page, look for the three tabs below the text area: "Type / Paste", "AI Generate", and "Upload Questions". Click the "Upload Questions" (📷) tab to activate the OCR mode.

Step 2: Upload your question paper photo or scan

Click the upload area or drag and drop your file. Penwork accepts JPG, PNG, WEBP, BMP, GIF, and PDF files. For best results, use a well-lit, high-contrast photo or a flat scan. Multi-page PDFs will show a page picker so you can select the right page.

Step 3: Crop to the question area

After uploading, a crop tool appears with your image. Drag to draw a rectangle around just the questions — this helps the OCR ignore logos, headers, watermarks, and any non-question content. Click "Reset" to return to a full-image selection.

Step 4: Extract the questions

Click "Extract Questions from Selection". Penwork runs free, browser-based OCR (powered by Tesseract.js) entirely in your browser — nothing is uploaded to any server. Extraction typically takes 10–30 seconds depending on image size and quality.

Step 5: Review and correct the extracted text

The extracted text appears in an editable text area. Check for OCR errors — especially in maths equations, special characters, or unclear handwriting. Correct any mistakes before proceeding. The cleaner your input, the better the AI-generated answers.

Step 6: Generate handwritten answers

Click "Generate Handwritten Assignment". Penwork sends your questions to the AI and formats the answers as structured notebook text — with question markers (Q-1, Q-2, etc.), answer markers (A:), and bullet points (1) 2) 3) and -). The result is placed in the text editor automatically.

Step 7: Download your PDF

Click "Generate Pages", check the preview, then click "Download PDF". Your complete handwritten assignment — with AI-generated answers for every question — downloads as a print-ready A4 PDF. No signup, no watermark.

💡 Tips for better OCR accuracy

  • Use a flat, well-lit scan rather than a photo taken at an angle
  • Ensure the paper is not wrinkled or has shadows across it
  • Crop tightly around just the text — exclude logos, borders, and headers
  • Printed question papers produce much better results than handwritten ones
  • For low-quality images, increase brightness/contrast in any photo editor before uploading
  • After extraction, always review and correct the text before generating answers

Frequently asked questions

What image formats does the OCR feature support?

Penwork's OCR supports JPG, PNG, WEBP, BMP, GIF, and PDF files. Multi-page PDFs show a page picker so you can choose which page to extract questions from.

Does my question paper get uploaded to a server?

No. The OCR (text extraction) step runs entirely in your browser using Tesseract.js. Your image never leaves your device. The AI answer generation does send the extracted text to the AI service, but not the original image.

The OCR extracted incorrect text — what should I do?

This is normal, especially for handwritten question papers, low-resolution photos, or papers with complex formatting. Use the review step to manually correct the text before generating answers. Cropping tightly around just the questions significantly improves accuracy.

Can I extract questions from a handwritten question paper?

Yes, but accuracy depends on the handwriting clarity. Printed question papers give much better OCR results than handwritten ones. For handwritten papers, take a high-contrast photo in good lighting and crop tightly around the text.

How many questions can I extract at once?

There is no strict limit — you can crop a large area covering many questions. However, very long extraction regions may take longer to process. For best results, crop to one full page of questions at a time.

Can I edit the AI-generated answers before downloading?

Yes. After generation, the answers appear in the main text editor where you can edit, add, or remove content. You have full control over the final text before generating the PDF.

Ready to try the OCR feature?

Upload your question paper now and generate a full handwritten assignment in minutes. Free, no signup, works in any browser.