# Html2TextTransformer

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_transformers/html2text/Html2TextTransformer)

Replace occurrences of a particular search pattern with a replacement string

## Signature

```python
Html2TextTransformer(
    self,
    ignore_links: bool = True,
    ignore_images: bool = True,
)
```

## Description

**Example:**

.. code-block:: python
from langchain_community.document_transformers import Html2TextTransformer
html2text = Html2TextTransformer()
docs_transform = html2text.transform_documents(docs)

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `ignore_links` | `bool` | No | Whether links should be ignored; defaults to True. (default: `True`) |
| `ignore_images` | `bool` | No | Whether images should be ignored; defaults to True. (default: `True`) |

## Extends

- `BaseDocumentTransformer`

## Constructors

```python
__init__(
    self,
    ignore_links: bool = True,
    ignore_images: bool = True,
) -> None
```

| Name | Type |
|------|------|
| `ignore_links` | `bool` |
| `ignore_images` | `bool` |


## Properties

- `ignore_links`
- `ignore_images`

## Methods

- [`transform_documents()`](https://reference.langchain.com/python/langchain-community/document_transformers/html2text/Html2TextTransformer/transform_documents)
- [`atransform_documents()`](https://reference.langchain.com/python/langchain-community/document_transformers/html2text/Html2TextTransformer/atransform_documents)

---

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