convert_to_pdfa
Create a PDF/A-2b archival copy for long-term compliance by adding sRGB metadata, removing forbidden actions, and preserving page appearance; validate with veraPDF when available.
Instructions
Write a PDF/A-2b copy (default "_pdfa.pdf") for long-term archiving, as courts, governments and archives often require. Pages are never redrawn: it adds an sRGB colour profile and PDF/A metadata, and removes what PDF/A forbids (scripts and other actions, attached files, encryption, annotations that are hidden or have no appearance; form fields lose their actions). changes lists what it changed.
If veraPDF is installed, the copy is checked against PDF/A-2b and written only if it passes (validated=true); without it, the copy is written unchecked (validated=false: it may not fully conform) unless a problem is found. It can't fix what would change how pages look: text in fonts that aren't embedded (common in files from simple PDF generators; re-export with fonts embedded), CMYK colour, pages larger than 200 inches; such PDFs are refused with the reasons and nothing is written. The copy has no password: a protected PDF needs its owner password if it restricts anything. Signed PDFs are refused.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>"
},
"name": "convert_to_pdfa"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | ||
| changes | Yes | ||
| standard | Yes | ||
| validated | Yes | ||
| validator | Yes | ||
| protection_removed | Yes |