pdf_validate
Audit PDF quality and compliance by checking PDF/A, structure, accessibility, integrity, and comparing two files.
Instructions
Audit PDF quality and compliance.
PDF/A, structure, accessibility, integrity, and comparison checks.
Return Format
A dict with keys:
success: bool - whether the operation succeeded
message: str - human-readable summary
operation-specific keys:
pdfa: {is_pdfa, details}
structure: {has_tags, headings, paragraphs, issues}
accessibility: {score (0-100), issues}
integrity: {intact, pages_readable, warnings}
compare: {same_page_count, text_similarity, diffs} On failure: {success: False, error, error_type}.
Examples
await pdf_validate(operation="accessibility", path="report.pdf") {"success": true, "score": 75, "issues": [...], "message": "Accessibility score: 75/100 for report.pdf. 0 errors, 1 warnings."}
await pdf_validate(operation="compare", path_a="a.pdf", path_b="b.pdf") {"success": true, "same_page_count": true, "text_similarity": 0.98, "diffs": [], "message": "Comparison: same page count, 98.0% text similarity between a.pdf and b.pdf."}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the PDF file. Ignored for compare. | |
| path_a | No | First PDF path for compare operation. | |
| path_b | No | Second PDF path for compare operation. | |
| operation | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Human-readable summary | |
| success | No | Whether the operation succeeded |