https://github.com/abdollahpour/micro-pdf-generator
Fast HTTP microservice written in Go for PDF generating. micro-pdf-generator can be used as a private or public HTTP service for massive HTML to pdf conversion.
https://github.com/abdollahpour/micro-pdf-generator
microservice pdf pdf-generation
Last synced: 2 months ago
JSON representation
Fast HTTP microservice written in Go for PDF generating. micro-pdf-generator can be used as a private or public HTTP service for massive HTML to pdf conversion.
- Host: GitHub
- URL: https://github.com/abdollahpour/micro-pdf-generator
- Owner: abdollahpour
- License: apache-2.0
- Created: 2021-02-13T23:21:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-17T23:13:23.000Z (over 4 years ago)
- Last Synced: 2024-06-20T05:19:41.131Z (almost 2 years ago)
- Topics: microservice, pdf, pdf-generation
- Language: Go
- Homepage:
- Size: 537 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/abdollahpour/micro-pdf-generator/releases/)
[](https://opensource.org/licenses/Apache-2.0)

[](https://coveralls.io/github/abdollahpour/micro-pdf-generator?branch=main)

# micro-pdf-generator
Fast HTTP [microservice](http://microservices.io/patterns/microservices.html) written in Go for PDF generating. micro-pdf-generator can be used as a private or public HTTP service for massive HTML to pdf conversion. For example:
```sh
curl \
-F template="https://raw.githubusercontent.com/abdollahpour/micro-pdf-generator/main/docs/template.html" \
-F data="https://raw.githubusercontent.com/abdollahpour/micro-pdf-generator/main/docs/data.json" \
https://micro-pdf-generator.abdollahpour.com/pdf/sample.pdf -o sample.pdf
```
It uses [Go template format](https://golang.org/pkg/text/template/) but you can also use normal standalone html (for template) and don't pass data.
You can also use url, file and string for both data and template parameters (check [configurations](docs/configurations.md))
# More
- [Running using Kubernetes](docs/kubernetes.md)
- [Running using Serverless (Knative)](docs/knative.md)
- [Running using Docker](docs/docker.md)
- [Configuration and parameters](docs/configurations.md)
# TODO
- Add more test
- Complete docs
- Complete templates
- Add system template for HTML errors
- Add JSON schema support