2.23.0 • Published 5 months ago

bits-to-dead-trees v2.23.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

bits-to-dead-trees

šŸ–„ -> 🌲 -> šŸ“„ -> šŸ–Ø

Exposes a web server with a single endpoint to take in a URL and create a PDF out of that. It's using Playwright in the background for this.

Depfu

Setup

Requirements

  1. Node 22+
  2. npm

Installation

  1. git checkout https://github.com/rmehner/bits-to-dead-trees
  2. cd bits-to-dead-trees
  3. npm install
  4. npm start to start the server. It'll listen to port 8000 on localhost by default.

Development

  • After updating the playwright dependency, you should run npm run update-schemas to make sure that the server knows about new PDF options
  • Use npm run start:dev to start everything in dev mode with build watch and friends

Server

The server exposes the /pdf endpoint that listens to a POST request and expects a JSON body:

{
  "url": "https://your-target-url.com/site/you/want/a/pdf/of",
  "pdfOptions": {},
  "gotoOptions": {},
  "browserContextOptions": {}
}

The response is the PDF file.

Docker

Versions are automatically build as Docker images and are available on GitHub's package registry

If you want to use it internally with docker-compose, this should give you a good idea to start:

services:
  pdf:
    image: ghcr.io/rmehner/bits-to-dead-trees:v2.22.1
    ports:
      - 8000:8000
2.23.0

5 months ago

2.22.1

6 months ago

2.22.0

7 months ago

2.20.0

7 months ago

2.21.0

7 months ago

2.19.2

10 months ago

2.19.1

10 months ago

2.19.0

10 months ago

2.18.1

11 months ago

2.18.2

11 months ago

2.18.0

11 months ago

2.17.1

12 months ago

2.17.0

1 year ago

2.16.3

1 year ago

2.16.1

1 year ago

2.16.2

1 year ago

2.16.0

1 year ago

2.15.1

1 year ago

2.15.0

1 year ago

2.14.0

1 year ago

2.13.1

1 year ago

2.13.0

1 year ago

2.12.1

2 years ago

2.12.0

2 years ago

2.11.0

2 years ago

2.11.1

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago

2.6.2

2 years ago

2.10.0

2 years ago

2.7.0

2 years ago

2.9.0

2 years ago

2.7.1

2 years ago

2.5.0

2 years ago

2.5.1

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.4.2

2 years ago

2.3.0

2 years ago

2.2.1

2 years ago

2.2.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

1.5.1

3 years ago

1.5.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago