Utilizes OpenAI models (cloud-based) to describe images and formulas. Requires an OpenAI API key. For PDF output without watermarks, a PDFix SDK license is required.
You need Docker installed. The first run downloads the image and may take longer than later runs.
Mount a folder into the container and run a subcommand:
docker run --rm -v "$(pwd)":/data -w /data pdfix/pdf-accessibility-openai:latest <command> [options]generate-alt-text: Alternate text for images (PDF → PDF; image/XML → TXT)generate-table-summary: Table summaries (PDF → PDF; image → TXT)generate-mathml: MathML for formulas (PDF → PDF; image → TXT)
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--openai-key |
yes | String (OpenAI API key) | OpenAI API key |
--input, -i |
yes | Path to .pdf, image, or .xml as supported by the command |
Input file |
--output, -o |
yes | Path to output .pdf, .txt, or .xml as supported |
Output file |
--model |
no | One of the supported model names (default: gpt-4o-mini) |
OpenAI model |
--prompt |
no | Prompt text or path to a .txt file |
Custom prompt |
--tags |
no | Regular expression string; if omitted, command defaults apply | Tag names to process |
--tags-count |
no | Integer (default 2); PDF only | Surrounding tags in prompt |
--name |
no | String (PDFix account license name) | PDFix license name |
--key |
no | String (PDFix account license key) | PDFix license key |
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--lang |
no | Language code string (default: en) |
Output language |
--overwrite |
no | Boolean string (default: false) |
Overwrite existing Alt text |
Default when --tags is omitted: Figure|Formula.
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--lang |
no | Language code string (default: en) |
Output language |
--overwrite |
no | Boolean string (default: false) |
Overwrite existing summary |
Default when --tags is omitted: Table.
| Option | Required | Type / expected value | Description |
|---|---|---|---|
--mathml-version |
no | One of: mathml-1, mathml-2, mathml-3, mathml-4 (default: mathml-4) |
MathML version |
--overwrite |
no | Boolean string (default: false) |
Overwrite existing output |
Default when --tags is omitted: Formula.
Generate alternate text:
docker run --rm -v "$(pwd)":/data -w /data pdfix/pdf-accessibility-openai:latest \
generate-alt-text --openai-key "${OPENAI_API_KEY}" \
--name "${LICENSE_NAME}" --key "${LICENSE_KEY}" \
--input /data/document.pdf --output /data/out.pdf \
--tags "Figure|Formula" --lang en --overwrite trueFor PDFix SDK licensing or issues, contact support@pdfix.net.