An open API service indexing awesome lists of open source software.

https://github.com/devchitchat/html-to-pdf

A Bun HTTP server that converts HTML to PDF. POST HTML, receive a PDF stream.
https://github.com/devchitchat/html-to-pdf

Last synced: 23 days ago
JSON representation

A Bun HTTP server that converts HTML to PDF. POST HTML, receive a PDF stream.

Awesome Lists containing this project

README

          

# html-to-pdf

To install dependencies:

```bash
bun install
```

To run:

```bash
bun run index.js
```

This project was created using `bun init` in bun v1.3.12. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.

# Usage

```sh
curl -X POST http://localhost:3000 --data-binary @file.html --output out.pdf
```

# Docker

```sh
docker build -t html-to-pdf .
docker run -p 3000:3000 html-to-pdf
```

```sh
curl -X POST http://localhost:3000 --data-binary @file.html --output out.pdf
```