Files
hinpdof/README.md
Hadley Rich 6c6c837301
Some checks failed
Build and Publish Docker Image / build (push) Failing after 17s
Initial
2024-11-11 10:26:47 +13:00

51 lines
711 B
Markdown

# hinpdof
`hinpdof` is a FastAPI-based app that converts HTML content to PDF using WeasyPrint.
## Features
- Convert HTML content to PDF
- Customizable PDF filenames
- Health check endpoint
## Requirements
- Python 3.12+
- FastAPI
- WeasyPrint
- Uvicorn
## Installation
1. Clone the repository:
```sh
git clone https://git.nice.net.nz/hinpdof.git
cd hinpdof
```
2. Install dependencies using Poetry:
```sh
poetry install
```
3. Run the application:
```sh
poetry run uvicorn app:app --reload
```
## Usage
### Convert HTML to PDF
Send a POST request to `/pdf` with the following JSON body:
```json
{
"html": "<h1>Hello, World!</h1>",
"filename": "testfile"
}
```