Extract Attachment from PDF
Extract → Extract Attachment from PDF
The Extract Attachment from PDF API retrieves all file attachments embedded in a PDF. You send the PDF as Base64 (docContent), docName, and optionally async. The API returns JSON with attachment data or a ZIP containing all extracted files. Use the tester below to try it; more details are in the sections that follow.
Try the Extract Attachment from PDF API
Endpoint: POST /api/v2/ExtractAttachmentFromPdf · Required: api-key, docContent, docName
Use the form below to send your API key and PDF (Base64). The response is JSON or a ZIP with all embedded attachments. No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Extract Attachment from PDF?
This endpoint extracts all file attachments embedded in a PDF. You provide the PDF (Base64) and optionally enable async; the API returns either JSON with attachment metadata and content or a ZIP file containing all extracted files. Use it to retrieve files that were embedded with Add Attachment to PDF.
Key features
- All attachments – Extracts every file embedded in the PDF (any type: text, images, documents, archives).
- JSON or ZIP – Response can be JSON with attachment data or a ZIP with all extracted files.
- Async – Use async for PDFs with many or large attachments.
Use when you need to retrieve supporting files from a PDF (e.g. source data, images, spreadsheets). Pair with Add Attachment to PDF for round-trip: add attachments, then extract them.
When to use Extract Attachment from PDF
- Document packages – Retrieve files that were attached to a report or proposal PDF.
- Compliance and archiving – Extract embedded files for storage or audit.
- Workflows – Pull out attachments (e.g. CSV, images) from PDFs for downstream processing.
For request/response schemas and code samples, see Extract Attachment from PDF in the PDF4me API docs.
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF document in Base64 format or a public URL to a PDF file
- The PDF document should contain embedded attachments
Response Format
The API returns a JSON response with extracted attachment data or a ZIP file containing all extracted attachments.