Update PDF processing functions

This commit is contained in:
Aaron Roberts
2026-07-03 12:11:54 +01:00
parent bcd8960ea9
commit 6a5558cf4a
4 changed files with 121 additions and 316 deletions

View File

@@ -96,36 +96,29 @@ Export your OCR results in the format you need:
5. View results with bounding boxes (if enabled)
6. Copy or download the extracted text
### Processing PDFs (Multi-Page Documents) - NEW!
### Processing PDFs (Multi-Page Documents)
1. Select **"PDF Processing"** mode in the toggle
Processing a PDF is just another way to create an OCR Job — it produces plain,
editable text exactly like single-image OCR, so it flows into the same review and
commit workflow.
1. Select **"PDF Processing"** in the file-type toggle
2. Upload a PDF file (up to 100MB)
3. Choose your OCR mode (same as above)
4. Select **output format**:
- 📝 **Markdown** - For documentation, wikis, GitHub
- 🌐 **HTML** - For web publishing, styled viewing
- 📄 **DOCX** - For Word editing, professional documents
- 📊 **JSON** - For programmatic access, data extraction
5. Click **"Process PDF"**
6. Watch the progress bar as pages are processed
7. Your file downloads automatically when complete!
3. Pick a **Model** and **Mode** (same as image OCR)
4. Click **"Process PDF"**
5. All pages are OCR'd and concatenated into one plain-text result
6. Edit the text, fill in metadata, and **Commit Job** — the PDF is stored as the
job's source document (shown alongside the text in Browse Jobs)
> The `/api/process-pdf` endpoint still supports Markdown / HTML / DOCX / JSON
> exports for programmatic use (see the API reference below); the UI uses the
> plain-text (JSON) path to drive the job workflow.
### Tips for Best Results
- **For scanned documents**: Use higher DPI (144-300) in advanced settings
- **For tables**: The model excels at extracting structured data
- **For formulas**: Mathematical notation is preserved in output
- **For images in PDFs**: Enable "Extract Images" to include them in output
- **For large PDFs**: JSON format is fastest, DOCX takes longer due to formatting
### Output Format Comparison
| Format | Best For | Features | File Size |
|--------|----------|----------|-----------|
| **Markdown** | Documentation, GitHub, wikis | Clean text, tables, code blocks | Smallest |
| **HTML** | Web viewing, sharing | Styled output, embedded images, tables | Medium |
| **DOCX** | Editing, professional docs | Full formatting, images, tables | Largest |
| **JSON** | Data processing, APIs | Structured data, metadata, page info | Small |
## Features