# BasePDFLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/pdf/BasePDFLoader)

Base Loader class for `PDF` files.

If the file is a web path, it will download it to a temporary file, use it, then
    clean up the temporary file after completion.

## Signature

```python
BasePDFLoader(
    self,
    file_path: Union[str, PurePath],
    *,
    headers: Optional[dict] = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file_path` | `Union[str, PurePath]` | Yes | Either a local, S3 or web path to a PDF file. |
| `headers` | `Optional[dict]` | No | Headers to use for GET request to download a file from a web path. (default: `None`) |

## Extends

- `BaseLoader`
- `ABC`

## Constructors

```python
__init__(
    self,
    file_path: Union[str, PurePath],
    *,
    headers: Optional[dict] = None,
)
```

| Name | Type |
|------|------|
| `file_path` | `Union[str, PurePath]` |
| `headers` | `Optional[dict]` |


## Properties

- `file_path`
- `web_path`
- `headers`
- `temp_dir`
- `source`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/pdf.py#L97)