Back to documents
{{ document.document_id }}
{% if error == "line_count_mismatch" %}
Could not save reviewed OCR because line count did not match OCR layout.
Expected {{ error_expected }}, got {{ error_actual }}.
{% elif error == "save_ocr_corrected_failed" %}
Could not save OCR-corrected PDF. Check that reviewed OCR line count matches raw OCR line count.
{% elif error == "rerun_ocr_failed" %}
OCR rerun failed.
{% elif error == "save_field_enriched_failed" %}
Could not save field-enriched PDF.
{% endif %}
Document metadata
- Type: {{ document.document_type }}
- Source path: {{ document.source_path }}
- Current path: {{ document.current_path }}
- Share path: {{ document.share_path or "" }}
- App URL: {{ app_url }}
- Original filename: {{ document.original_filename }}
- Canonical filename: {{ document.canonical_filename }}
- MIME type: {{ document.mime_type }}
- File size: {{ document.file_size }}
- Page count: {{ document.page_count }}
- Storage status: {{ document.storage_status }}
- Review status: {{ document.review_status }}
- Created at: {{ document.created_at }}
- Updated at: {{ document.updated_at }}
Saved PDF scaffolds
Document preview
{% if file_url %}
{% if document.mime_type == "application/pdf" %}
{% elif document.mime_type in ["image/jpeg", "image/png"] %}
{% else %}
Open file
{% endif %}
{% else %}
No preview available.
{% endif %}
Document versions
{% if document.versions %}
{% for version in document.versions %}
-
v{{ version.version_number }} —
{{ version.version_type }} —
{{ version.file_path }} —
{{ version.created_at }}
{% if version.notes %}
{{ version.notes }}{% endif %}
{% endfor %}
{% else %}
No versions found.
{% endif %}
Raw OCR
{% if raw_ocr %}
Text version: v{{ raw_ocr.version_number }}
OCR engine: {{ raw_ocr.ocr_engine or "unknown" }}
OCR engine version: {{ raw_ocr.ocr_engine_version or "unknown" }}
Rerun source: {{ raw_ocr.rerun_source or "unknown" }}
Quality score: {{ raw_ocr.quality_score if raw_ocr.quality_score is not none else "not scored yet" }}
Quality flags: {{ raw_ocr.quality_flags if raw_ocr.quality_flags else [] }}
Quality note: {{ raw_ocr.quality_note or "" }}
{{ raw_ocr.text_content }}
{% else %}
No raw OCR text found.
{% endif %}
Reviewed OCR
{% if reviewed_ocr %}
Current reviewed version saved at {{ reviewed_ocr.created_at }} —
v{{ reviewed_ocr.version_number }}
{% else %}
No reviewed OCR saved yet.
{% endif %}
Expected OCR lines: {{ expected_line_count }}
Current editor lines: {{ actual_line_count }}
Line count mismatch may affect corrected PDF layout.
Extracted fields
{% if current_extracted %}
Current extracted fields last updated at {{ current_extracted.updated_at }}
{% else %}
No extracted fields saved yet.
{% endif %}