Home › How to Import a PDF Document into Moodle
Moodle · QTI 2.1 · GIFT · XML · Tutorial

How to Import a PDF Document into Moodle

You have a PDF of questions — a scanned exam, an exported paper, a shared question set. Moodle won’t open .pdf. This guide shows the clean path: upload → extract & auto-classify every question → export Moodle-ready QTI 2.1, GIFT or XML → import, and how ExamParser does the extraction and export in one place.

By ExamParser Team Updated Sep 30, 2026 6 min read Topic: Assessment import

Why Moodle can’t read your PDF directly

Moodle has no importer for .pdf files. Its Question bank › Import flow only understands structured interchange formats — most commonly QTI 2.1, GIFT, or Moodle XML. A PDF is a fixed layout of pages, not a question model; it tells Moodle nothing about which line is the stem, which lines are the options, or which letter is correct. Worse, a PDF’s text often flows oddly — columns, page breaks and tables can scramble the reading order.

So the job is to translate your document into Moodle’s question model. The reliable way is a two-stage conversion: first extract text and parse the PDF into discrete, classified questions (number, stem, options, answer key, type), then serialize that into a Moodle-ready file. The first stage — getting clean text out of the PDF — is where almost all of the real work lives.

Bottom line: PDF is for sharing; QTI 2.1 / GIFT / XML is for Moodle. You need a converter that both extracts your document and exports a Moodle format.

The workflow at a glance

  1. PDF → classified questionsExtract the text, then break the document into one question per unit — number, stem, options and answer key — and tag each with its type (MC, MR, T/F, short answer…).
  2. Classified questions → Moodle fileSerialize the same question set into QTI 2.1, GIFT or Moodle XML — whichever your workflow prefers.
  3. Moodle file → MoodleUpload it via Question bank › Import and the questions appear in your chosen category.

Step 1 — How ExamParser reads your PDF

Before anything else, the text layer has to be recovered. A PDF exported from Word usually has selectable text and reads cleanly; a scanned image-only PDF needs OCR. Once text is available, the parser treats each question as a unit, extracting four things and classifying the type and answer from the structure:

PartWhat it capturesExample
NumberThe question reference shown in Moodle (handy for tracking).Q20
StemThe question prompt / body text.What is 7 × 8?
OptionsThe answer choices, in order (a, b, c, d…).a) 54 b) 56 c) 63 d) 49
Answer keyThe correct option(s), resolved to a 1-based index. Multiple correct answers become a multiple-response (MR) item.2 → option b; "2,4" → options b & d
TypeClassified from structure — MC, MR, T/F, short answer, etc.MC, MR
Why review before export matters: PDF text extraction is rarely perfect — hyphenation across line breaks, tables that break reading order, or options that wrap mid-choice. ExamParser shows you the classified questions so you can confirm the stem, options and answer key are right before they ever reach Moodle.

How do you actually run this conversion?

Typing hundreds of items into the Moodle editor by hand is slow and error-prone. The practical move is a tool that does both stages: extract your PDF, classify every question, and export a Moodle format. ExamParser (pdf2moodle) is built for exactly this — upload a PDF (or a PDF/DOCX pair) and it returns the classified questions you can audit and the Moodle-ready QTI 2.1 / GIFT / XML file.

Step 2 — Choose a Moodle format: QTI 2.1, GIFT or XML

Moodle imports all three cleanly; they differ mainly in readability and portability:

FormatBest forNotes
Moodle XMLFull fidelityPreserves categories, feedback and question metadata. The most complete export.
GIFTQuick reviewPlain text, the most human-readable — easy to spot-check or hand-edit before importing.
QTI 2.1Cross-LMS portabilityBest if you also move questions between Moodle and other LMS platforms.

Because all three come from the same parsed question set, you lose nothing by picking one — switch formats anytime without re-extracting the PDF. ExamParser exports the format you select in the same pass.

Step 3 — Import the file into Moodle

  1. In your course, open More › Question bank › Import.
  2. Choose the import format you exported — Moodle XML, GIFT, or QTI 2.1.
  3. Select the file from Step 2 and pick the destination category.
  4. Click Import and review the summary of questions added.
  5. Find the items under Question bank; preview, reorder, or add them to a quiz.

One tool for the whole pipeline: ExamParser (pdf2moodle)

ExamParser is built for this exact job — PDF document to Moodle. The part that makes it different is the middle step: it doesn’t just dump your PDF into an export. It first classifies every question — number, stem, options, answer key and type — and only then serializes that set into the Moodle format you choose. You can review the classified questions before exporting, so what lands in Moodle is exactly what you approved. No manual re-typing, no copy-paste, no silent mis-keying.

Turn your PDF questions into a Moodle file

Upload a PDF and get Moodle-ready QTI 2.1, GIFT or XML — with the classified questions to review first.

Try ExamParser →

Common pitfalls (and how to avoid them)

Can Moodle import a PDF file directly?

No. Moodle’s question bank imports structured interchange formats — QTI 2.1, GIFT or Moodle XML — not PDF documents. A PDF first has to be extracted into text, the questions identified (number, stem, options, answer key), and then converted into one of those formats.

Which Moodle format should I export — QTI 2.1, GIFT or XML?

All three import cleanly. Moodle XML is the most complete (it preserves categories, feedback and question metadata). GIFT is the most human-readable and easy to spot-check. QTI 2.1 is the best choice if you also work across multiple LMS platforms. ExamParser exports all three from the same parsed question set, so you can pick whichever your workflow prefers.

Do scanned / image-only PDFs work?

Only if the text can be recovered. Image-only PDFs have no selectable text, so they need OCR first. If your PDF was exported from Word or a typesetting tool it usually contains a real text layer and imports fine. When in doubt, try selecting text in the PDF — if you can, ExamParser can read it.

My PDF mixes multiple question types. Will it work?

Yes. Moodle accepts mixed question types in a single import file. ExamParser classifies each question from the extracted text and writes the correct element for each type into the exported file, so a document with MC, MR, T/F and short-answer items imports as one batch.

Where do the imported questions end up in Moodle?

They land in the question bank category you choose at import time (Question bank › Import). From there you can preview them, move them between categories, or add them to a quiz.

MoodleQTI 2.1GIFTMoodle XMLPDF to MoodleExamParser