PDF Remediation
Transform inaccessible PDFs into WCAG-compliant documents. Aelira doesn't just scan — it fixes structure, reading order, tables, and alt text automatically.
Core Capabilities
OCR Processing
Extract text from scanned PDFs using Tesseract 5 at 300 DPI with high accuracy.
Structure Tagging
Automatically add heading hierarchy, paragraphs, lists, and semantic tags by analysing font size, weight, and spacing.
AI Alt Text Generation
AI vision analyses images, charts, and diagrams to generate context-aware descriptions. Flagged for review when confidence is low.
PDF/UA Export
Export PDF/UA-1 and PDF/UA-2 compliant documents with validated structure trees, ready for screen readers.
Advanced Pipeline
Reading Order Auto-Fix
Dual strategy for correct reading sequence. A heuristic engine handles standard layouts (single column, two-column papers) by clustering content blocks by position. For complex layouts (mixed columns, sidebars), AI vision analyses the rendered page to determine the correct reading path.
Headers and footers are automatically detected and marked as artifacts so screen readers skip them.
Table Structure Remediation
Detects tables using PyMuPDF, extracts cell structure and boundaries, and identifies header rows and columns through heuristic analysis. Optionally confirms headers with AI vision for ambiguous tables. Applies full semantic tagging: THead, TBody, TR, TH, TD with Scope attributes.
Handles merged cells, irregular grids, and nested tables. Complex tables receive lower confidence scores.
Confidence Scoring
Every fix is scored on a tiered confidence model. Rule-based fixes (document title, language tags) score ~0.95 and are applied automatically. Heuristic fixes (heading hierarchy, reading order) score ~0.70. AI-generated fixes (alt text, complex layouts) score 0.55–0.60 and are flagged for human review.
Threshold: fixes scoring below 0.85 are flagged. You review only what needs your judgment.
PDF/UA Validation
Post-remediation validation against two standards. The built-in Matterhorn Protocol validator checks 15 machine-checkable conditions (structure tree, language, alt text, headings, tables, role mappings). Optional veraPDF integration adds 108 rules for comprehensive PDF/UA-1 and PDF/UA-2 compliance checking.
Results are merged into a single compliance report with per-checkpoint pass/fail status.
AI Model Flexibility
Free and demo accounts use Google Gemini for vision and text generation. Department and institutional plans can connect custom or open-source models via Ollama (Llama, Qwen, Mistral, etc.). Self-hosted open-source deployments run any model you choose.
No vendor lock-in. Universities with data sovereignty requirements keep everything on-premises.
Technical Stack
- pikepdf — Low-level PDF structure manipulation (structure trees, tag insertion, reading order rewriting)
- PyMuPDF — Content extraction (text blocks, table detection, bounding boxes)
- Tesseract 5 — OCR for scanned documents at 300 DPI
- LuaLaTeX + tagpdf — PDF/UA-1 compliant output from LaTeX source
- Matterhorn Protocol — Native validator (15 PDF/UA conditions)
- veraPDF — Optional REST API integration (108 rules, PDF/UA-1 and PDF/UA-2)
- Gemini / Ollama — Pluggable AI provider for vision and text generation
Usage
Dashboard
Upload PDFs through the dashboard for point-and-click remediation. Review flagged fixes, accept or modify AI suggestions, and download the compliant output.
API
# Upload and process a PDF
curl -X POST https://api.aelira.ai/api/v1/scan/document \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "ocr=true" \
-F "generate_alt_text=true"
# Response includes:
# - Accessibility issues found
# - Confidence-scored fixes applied
# - Validation results (Matterhorn + veraPDF)
# - Remediated PDF download URLCLI
# Scan and remediate a single PDF
aelira scan document.pdf --fix --output fixed.pdf
# Batch process a directory
aelira scan ./course-materials/ --fix --recursiveIssues Detected and Fixed
- Missing document title and language
- Untagged content (full structure tree creation)
- Images without alt text (AI vision generation)
- Tables without headers (THead/TBody/TH/TD with Scope)
- Incorrect reading order (heuristic + AI vision dual strategy)
- Running headers/footers not marked as artifacts
- Low contrast text
- Scanned images with no searchable text (OCR)
- Missing PDF/UA identifier
- LaTeX equations (PDF/UA-1 output via LuaLaTeX + tagpdf)