https://github.com/dills122/weasyprint-docker
A weasyprint container with a basic endpoint to communicate
https://github.com/dills122/weasyprint-docker
docker htmltopdf weasyprint
Last synced: about 1 month ago
JSON representation
A weasyprint container with a basic endpoint to communicate
- Host: GitHub
- URL: https://github.com/dills122/weasyprint-docker
- Owner: dills122
- License: mit
- Created: 2019-10-05T01:41:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T08:15:59.000Z (over 3 years ago)
- Last Synced: 2026-04-30T10:36:37.220Z (about 1 month ago)
- Topics: docker, htmltopdf, weasyprint
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# WeasyPrint Docker Service
[](https://www.codefactor.io/repository/github/dills122/weasyprint-docker)
A small stand alone WeasyPrint service
## Endpoints
* `/convert/stream` - Given an input string, streams pdf to client
* `/convert/base64` - Given an input string, will return converted pdf as base64 string
Both endpoints accept both a `url` or an `html` string as the incoming document
## Getting Started
```bash
git clone https://github.com/dills122/weasyprint-docker.git
```
Once the repo has been cloned you will need to build the docker container
```bash
sudo docker build -t "repo:tagHere" ./
```
### Once the container is built you can run it locally
To run as a background process to test the service
```bash
sudo docker run -p 8080:8080 "containerId" &
```
If you needed to run the container and test stuff inside
```bash
sudo docker run -it "containerId" /bin/bash
```
#### Testing Node App Locally
if you wanted to change the api without worrying about docker
```bash
node index.js # npm start
```