# LLMSherpaFileLoader

> **Class** in `langchain_community`

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

Load Documents using `LLMSherpa`.

LLMSherpaFileLoader use LayoutPDFReader, which is part of the LLMSherpa library.
This tool is designed to parse PDFs while preserving their layout information,
which is often lost when using most PDF to text parsers.

Examples
--------
from langchain_community.document_loaders.llmsherpa import LLMSherpaFileLoader

loader = LLMSherpaFileLoader(
    "example.pdf",
    strategy="chunks",
    llmsherpa_api_url="http://localhost:5010/api/parseDocument?renderFormat=all",
)
docs = loader.load()

## Signature

```python
LLMSherpaFileLoader(
    self,
    file_path: Union[str, Path],
    new_indent_parser: bool = True,
    apply_ocr: bool = True,
    strategy: str = 'chunks',
    llmsherpa_api_url: str = DEFAULT_API,
)
```

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    file_path: Union[str, Path],
    new_indent_parser: bool = True,
    apply_ocr: bool = True,
    strategy: str = 'chunks',
    llmsherpa_api_url: str = DEFAULT_API,
)
```

| Name | Type |
|------|------|
| `file_path` | `Union[str, Path]` |
| `new_indent_parser` | `bool` |
| `apply_ocr` | `bool` |
| `strategy` | `str` |
| `llmsherpa_api_url` | `str` |


## Properties

- `url`
- `strategy`
- `file_path`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/llmsherpa/LLMSherpaFileLoader/lazy_load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/llmsherpa.py#L12)