extract_attachments
Extract attached files from a PDF document. Specify the source PDF URL to retrieve all embedded attachments.
Instructions
Extracts attachments from a source PDF file.
Ref: https://developer.pdf.co/api-reference/pdf-extract-attachments.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to the source PDF file. | |
| httpusername | No | HTTP auth user name if required to access source url. (Optional) | |
| httppassword | No | HTTP auth password if required to access source url. (Optional) | |
| password | No | Password of PDF file. (Optional) | |
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) |
Implementation Reference
- pdfco/mcp/services/pdf.py:119-122 (helper)The `extract_pdf_attachments` helper function that calls the PDF.co API endpoint 'pdf/attachments/extract' using the shared HTTP client. This is the actual API call implementation.
async def extract_pdf_attachments( params: ConversionParams, api_key: str | None = None ) -> BaseResponse: return await request("pdf/attachments/extract", params, api_key=api_key)