2.14.0 ā€¢ Published 23 days ago

bits-to-dead-trees v2.14.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
23 days 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 20+
  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.13.1
    ports:
      - 8000:8000
2.14.0

23 days ago

2.13.1

2 months ago

2.13.0

2 months ago

2.12.1

3 months ago

2.12.0

4 months ago

2.11.0

6 months ago

2.11.1

5 months ago

2.6.1

10 months ago

2.6.0

10 months ago

2.8.1

8 months ago

2.8.0

8 months ago

2.6.2

10 months ago

2.10.0

7 months ago

2.7.0

9 months ago

2.9.0

7 months ago

2.7.1

9 months ago

2.5.0

11 months ago

2.5.1

11 months ago

2.4.1

12 months ago

2.4.0

12 months ago

2.4.2

12 months ago

2.3.0

1 year ago

2.2.1

1 year ago

2.2.2

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago