Metadata-Version: 2.4
Name: html2pdf_chromium
Version: 0.1.1
Summary: Convert HTML to PDF using Chromium browsers with zero Python dependencies
Home-page: https://github.com/VBenevides/html2pdf_chromium
Author: Vinicius Benevides
Author-email: massaki1999@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# html2pdf_chromium

Convert HTML files or HTML strings to PDF using Chromium-based browsers(like Chrome or Edge) in headless mode without dependencies such as chromedriver.


## ✨ Features

- 📄 Convert HTML **files or strings** to PDF
- 🧠 Uses **headless Chrome or Edge**
- 🧰 **No additional Python dependencies** — uses only the standard library
- ❌ **Does not require `chromedriver`** or Selenium

## 📦 Installation

```bash
pip install html2pdf_chromium
```


## Usage

### PDF from HTML File

```python
from html2pdf_chromium import Converter

converter = Converter()  # Uses Chrome by default
converter.convert_file("example.html", "output.pdf")
```

### PDF from HTML String

```python
from html2pdf_chromium import Converter

converter = Converter()  # Uses Chrome by default
content = """
<html>
  <body>
    <h1>Hello PDF!</h1>
    <p>This was generated from an HTML string.</p>
  </body>
</html>
"""
converter.convert_string(content, "output.pdf")
```

### Selecting browser (used to detect executables in common paths)

```python
from html2pdf_chromium import Converter

converter = Converter(browser="edge")
converter.convert_file("example.html", "output.pdf")
```

### Using a custom path for other Chromium based browsers

```python
from html2pdf_chromium import Converter

converter = Converter(executable_path="path_to_executable/chromium.exe") 
converter.convert_file("example.html", "output.pdf")
```
