> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpulse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported File Types

> File formats supported by Pulse API for document extraction

## Overview

Pulse API supports a wide range of document formats, enabling extraction from virtually any business document. All file types are processed with the same high accuracy and can be used with structured schema extraction.

## Supported Formats

> [card] PDF Documents
>
> **Extension**: `.pdf`
>
> * Text-based PDFs (searchable)
> * Image-based PDFs (scanned)
> * Mixed content PDFs
> * Password-protected PDFs (provide password)
> * Multi-page documents

> [card] Images
>
> **Extensions**: `.jpg`, `.jpeg`, `.png`, `.tif`, `.tiff`, `.bmp`, `.gif`, `.webp`
>
> * High-resolution scans
> * Photographs of documents
> * Screenshots
> * Multi-page TIFFs
> * Handwritten content (with limitations)

> [card] Office Documents
>
> **Extensions**: `.docx`, `.pptx`, `.xlsx`, `.xlsm`, `.xls`
>
> * Microsoft Word documents
> * PowerPoint presentations
> * Excel workbooks (`.xlsx`, `.xlsm` macro-enabled, binary `.xls`)
> * Embedded charts and images returned with `image_url` when `figure_processing.show_images: true` (see [Visual Images](https://docs.runpulse.com/api-reference/bounding-boxes.md#fetching-visual-image-bytes))
> * Complex formatting preserved
> * [Spreadsheet options](https://docs.runpulse.com/api-reference/endpoint/extract.md#spreadsheet-options) for hidden rows/columns/sheets and raw numeric values

> [card] Data & Text Files
>
> **Extensions**: `.csv`, `.tsv`, `.txt`, `.json`, `.xml`, `.rtf`, `.xbrl`, `.ixbrl`
>
> * Comma- and tab-separated values
> * Plain text documents
> * Structured `.json` and `.xml` data
> * Rich Text Format documents
> * XBRL / Inline XBRL financial filings
> * Delimited data parsed into tables

> [card] Web Documents
>
> **Extensions**: `.html`, `.htm`
>
> * Static HTML pages
> * Saved web pages
> * HTML emails
> * Inline styles preserved
> * Embedded images extracted

## Processing Large Files

For very large files, we recommend:

* Using async processing (`/extract` with `async: true`) — see [Async Processing](https://docs.runpulse.com/api-reference/async-processing.md)
* Processing specific page ranges
* Contacting support for optimization strategies

## Format-Specific Features

### PDF Processing

PDFs receive the most comprehensive processing:

```python theme={null}
# Extract with PDF-specific options
result = client.extract(
    file_url="document.pdf",
    pages="1-10",  # Process specific pages
    figure_processing={"description": True}
)
```

**Advanced PDF Features**:

* Preserve document structure
* Extract form fields
* Handle multi-column layouts
* Process rotated pages
* Extract embedded images

### Image Processing

Images are processed using advanced OCR:

```python theme={null}
# High-quality image extraction
result = client.extract(
    file_url="scanned_document.jpg"
)
```

**Image Best Practices**:

* **Resolution**: Minimum 150 DPI, recommended 300 DPI
* **Format**: PNG for text, JPG for photos
* **Size**: Keep under 10MB per image
* **Quality**: Avoid blurry or skewed images

### Office Document Processing

Office files maintain their structure:

```python theme={null}
from pulse import Pulse

client = Pulse(api_key="YOUR_API_KEY")

# Extract from Excel with spreadsheet-specific options
result = client.extract(
    file=open("spreadsheet.xlsx", "rb"),
    spreadsheet={
        "include_hidden_rows": True,
        "include_hidden_cols": True,
        "include_hidden_sheets": False,
    }
)

print(result.markdown)
```

**Office Document Features**:

* Preserve table structures
* Extract embedded objects
* Handle multiple sheets/slides
* Maintain formatting context
* Control hidden rows, columns, and sheets in Excel, and switch numeric cells to raw (unformatted) values (see [Spreadsheet Options](https://docs.runpulse.com/api-reference/endpoint/extract.md#spreadsheet-options))

## File Upload Methods

### Direct Upload

Upload files directly in your API request:

```python theme={null}
# Direct file upload (recommended for files < 10MB)
with open("document.pdf", "rb") as f:
    response = requests.post(
        "https://api.runpulse.com/extract",
        headers={"x-api-key": API_KEY},
        files={"file": f}
    )
```

### URL-Based Processing

Process files from public URLs:

```python theme={null}
# Extract from URL
response = requests.post(
    "https://api.runpulse.com/extract",
    headers={"x-api-key": API_KEY},
    json={"file_url": "https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf"}
)
```

## Unsupported Formats

The following formats are **not** currently supported:

* Video files (`.mp4`, `.avi`, `.mov`)
* Audio files (`.mp3`, `.wav`)
* CAD files (`.dwg`, `.dxf`)
* Binary Office formats (`.doc`, `.ppt`)
* Compressed archives (`.zip`, `.rar`)
* Executable files (`.exe`, `.app`)

> [!NOTE]
>
> Need support for a specific format? Contact us at [support@trypulse.ai](mailto:support@trypulse.ai)

## Format Detection

Pulse API automatically detects file types based on:

1. File extension
2. MIME type
3. File content analysis

```python theme={null}
# API automatically detects format
result = client.extract(file_url="document")  # Works even without extension
```

## Best Practices by Document Type

> [accordion] Financial Documents
>
> **Invoices, Statements, Reports**
>
> * Use PDF format when possible
> * Ensure text is selectable (not scanned)
> * Include all pages for context
> * Use schema extraction for structured data

> [accordion] Legal Documents
>
> **Contracts, Agreements, Forms**
>
> * Maintain original formatting with PDF
> * Process complete documents for context
> * Use high-resolution scans for signatures
> * Process complex layouts with care

> [accordion] Technical Documents
>
> **Manuals, Specifications, Diagrams**
>
> * Process in smaller chunks if very large
> * Maintain original format for tables
> * Consider HTML output for preservation

> [accordion] Medical Records
>
> **Clinical Notes, Lab Reports, Prescriptions**
>
> * Use high-resolution scans (300+ DPI)
> * Process handwritten content carefully
> * Verify extracted data accuracy

## Troubleshooting

### Common Issues

> [accordion] FILE\_001: Invalid file type
>
> **Solution**: Check that your file extension matches our supported formats
>
> ```python theme={null}
> # Correct
> client.extract(file_url="document.pdf")
>
> # Incorrect
> client.extract(file_url="document.doc")  # Use .docx instead
> ```

> [accordion] FILE\_TOO\_LARGE\_USE\_URL / FILE\_002: File too large
>
> **Solution**: Direct uploads are capped at 100 MB. Files over 100 MB must be submitted via `file_url` pointing at your own hosted or presigned URL — `file_url` is accepted at any size.
>
> ```python theme={null}
> # Host the document yourself (e.g. an S3 presigned GET URL),
> # then submit it by URL
> client.extract(file_url="https://your-bucket.s3.amazonaws.com/large_file.pdf?X-Amz-...", async_=True)
> ```

> [accordion] FILE\_003: File corrupted
>
> **Solution**: Verify file integrity and re-save if needed
>
> ```bash theme={null}
> # Check PDF integrity
> pdfinfo document.pdf
> ```

## Next Steps

> [card] [Structured Output](https://docs.runpulse.com/api-reference/structured-output-guidelines.md)
>
> Extract structured data from any format

> [card] [Large Documents](https://docs.runpulse.com/api-reference/large-documents.md)
>
> Handle big files efficiently


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.