# Extract from PDF

Use this extractor for `.pdf` files. It can extract images, page renders, text, markdown, embedded files, PDF metadata, links, annotations, form fields, fonts into a ZIP result.

## Quick reference

| Field | Value |
| --- | --- |
| Source file type | `.pdf` |
| Source group | Documents |
| Submit endpoint | `POST https://api.tools.fast/extract` |
| Estimate endpoint | `POST https://api.tools.fast/extract/estimate/pdf` |
| Result | ZIP download |
| Default capabilities | `pdf.images`, `pdf.pages`, `pdf.text`, `pdf.markdown`, `pdf.embeddedFiles`, `pdf.metadata`, `pdf.links`, `pdf.annotations`, `pdf.forms`, `pdf.fonts` |
| Max file size | free: 50 MB; pro: 2048 MB |
| Document limits | free: 2000 document units; pro: 2000 document units |
| Duration limits | Not applicable |

## Capabilities

| Capability | Default | Options | Pricing | Description |
| --- | --- | --- | --- | --- |
| `pdf.images` | Yes | None | Included | Images embedded in the PDF saved separately. |
| `pdf.pages` | Yes | None | Included | Whole PDF pages rendered as image files. |
| `pdf.text` | Yes | None | Included | Selectable PDF text saved by page. |
| `pdf.markdown` | Yes | None | Included | Markdown generated from PDF text. |
| `pdf.embeddedFiles` | Yes | None | Included | Embedded PDF files saved separately. |
| `pdf.metadata` | Yes | None | Included | PDF document metadata for audit workflows. |
| `pdf.links` | Yes | None | Included | PDF link annotations for review. |
| `pdf.annotations` | Yes | None | Included | PDF comments and markup records when present. |
| `pdf.forms` | Yes | None | Included | PDF form field data when available. |
| `pdf.fonts` | Yes | None | Included | Embedded PDF font files when present. |

## Metadata output

The `pdf.metadata` capability writes `metadata/pdf.json` and `metadata/pdf.csv`. Document info fields such as title, author, creator, producer, and keywords stay as strings. PDF date fields such as `CreationDate` and `ModDate` are emitted as readable objects with `display`, `raw`, `local`, `offset`, `timezoneKnown`, `precision`, and `parseStatus`; full timestamp values with a known timezone also include `isoUtc`.

## Options payload with all capabilities

Use this shape when you want to explicitly configure every supported output for this source type.

```json
{
  "extraction": {
    "selectedCapabilities": [
      "pdf.images",
      "pdf.pages",
      "pdf.text",
      "pdf.markdown",
      "pdf.embeddedFiles",
      "pdf.metadata",
      "pdf.links",
      "pdf.annotations",
      "pdf.forms",
      "pdf.fonts"
    ],
    "includeManifest": true
  }
}
```

## Estimate example

```bash
curl -sS -X POST "https://api.tools.fast/extract/estimate/pdf" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fileSizeMb": 10,
  "pageCount": 12,
  "options": {
    "extraction": {
      "selectedCapabilities": [
        "pdf.images",
        "pdf.pages",
        "pdf.text",
        "pdf.markdown",
        "pdf.embeddedFiles",
        "pdf.metadata",
        "pdf.links",
        "pdf.annotations",
        "pdf.forms",
        "pdf.fonts"
      ],
      "includeManifest": true
    }
  }
}'
```

## Extract example with all options configured

```bash
curl -sS -X POST "https://api.tools.fast/extract" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@input.pdf" \
  -F 'options={
  "extraction": {
    "selectedCapabilities": [
      "pdf.images",
      "pdf.pages",
      "pdf.text",
      "pdf.markdown",
      "pdf.embeddedFiles",
      "pdf.metadata",
      "pdf.links",
      "pdf.annotations",
      "pdf.forms",
      "pdf.fonts"
    ],
    "includeManifest": true
  }
}'
```

## Machine-readable discovery

```http
GET /options/pdf
GET /extractors/pdf
```
