A lightweight desktop application for academics to grade PDF assignments with styled text annotations.
- Batch Processing: Recursively load all PDFs from a folder
- Moodle Folder Support: Detect Moodle-style submission folders and label PDFs by student name
- Non-Destructive Editing: Annotations saved in separate
.mlatfiles, original PDFs remain untouched - Custom Styled Text: Add annotations with custom fonts, sizes, and text wrapping
- LaTeX Support: Render mathematical formulas using Matplotlib
- Smart Export: Automatically expand PDF canvas if annotations go out of bounds
- Export All: Batch-export all PDFs and warn about unmarked files
- Undo: Ctrl+Z and toolbar undo button for per-PDF edits (max depth 20)
- Enhanced Navigation: Use Page Up/Down keys for easy page switching
- High DPI Rendering: Sharp annotations at 300 DPI
- Remarks Tree: Sidebar shows remark subitems under each PDF for quick jumping
-
Install Dependencies
pip install PyQt6 PyMuPDF matplotlib
-
Run the Application
python main.py
-
Open a Folder
- Click "Open Folder" in the toolbar
- Select a folder containing PDF files, or a Moodle-unzipped submission folder
- The application will load all PDFs recursively or map Moodle submissions by student
-
Add Annotations
- Double-click on any PDF page to add a new annotation
- Customize font, size, and text wrapping in the dialog
- Drag annotations to reposition them
- Double-click existing annotations to edit them
-
Export Marked PDFs
- Click "Export PDF" to save a new PDF with all annotations
- Click "Export All" to export every PDF in the list (warnings shown for unmarked files)
- Exported files use the
_marked.pdfsuffix
- Left Sidebar: Tree of PDFs with remark subitems (click a remark to jump to its page)
- Main Area: PDF page display with annotations
- Toolbar: Navigation buttons, Moodle mode indicator, export tools, and undo
- Keyboard Shortcuts:
Page Up/Down: Navigate between pagesDelete: Remove selected annotationsCtrl+Z: Undo last change (per PDF)Ctrl + Mouse Wheel: Zoom in/outShift + Mouse Wheel: Horizontal scrolling
- Main Application:
main.py - Developer Documentation:
DEVELOPER.md - Dependencies: Listed in
requirements.txt
When exporting, the application:
- Renders each annotation as a transparent PNG
- Places annotations at their specified coordinates
- Expands the PDF canvas if annotations extend beyond page boundaries
- Saves the result as a new PDF file
- Python 3.7+
- PyQt6
- PyMuPDF (fitz)
- Matplotlib
- Memory usage increases with large numbers of PDFs
- Stylus support is limited
This project is open source. Feel free to contribute or modify for your needs.