pdf_attachments
Extract embedded files from PDFs, including e-invoice XML and attached CSVs, as JSON or ZIP. Use before parsing invoice PDFs to get reliable structured data.
Instructions
Pull embedded files out of a PDF (local path): ZUGFeRD/Factur-X e-invoice XML, attached CSVs, images or sub-PDFs. Returns JSON by default (text inline, binary base64, e-invoice attachments flagged) or a ZIP of everything. Use this before parsing an invoice PDF – the structured XML inside is far more reliable than reading the printed page. $0.01.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| name | No | Only this attachment, by filename | |
| output | No | json → attachment list with contents; zip → all attachments as one archive | json |
| output_path | No | ||
| idempotency_key | No |