https://github.com/nativebpm/gotenberg
A high-performance Go client for the Gotenberg HTTP API with a fluent interface. Built using only the Go standard library.
https://github.com/nativebpm/gotenberg
Last synced: 5 months ago
JSON representation
A high-performance Go client for the Gotenberg HTTP API with a fluent interface. Built using only the Go standard library.
- Host: GitHub
- URL: https://github.com/nativebpm/gotenberg
- Owner: nativebpm
- Created: 2025-09-24T14:59:34.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-10-07T00:09:14.000Z (8 months ago)
- Last Synced: 2025-10-07T00:14:36.417Z (8 months ago)
- Language: Go
- Homepage: https://gotenberg.dev
- Size: 20.5 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gotenberg - Go - nativebpm/gotenberg (Stream-first: Built on httpclient for efficient multipart uploads)
README
# Gotenberg Client
Go client for [Gotenberg](https://gotenberg.dev/) — document conversion service supporting Chromium, LibreOffice, and PDF manipulation engines.
```bash
go get github.com/nativebpm/gotenberg
```
## Features
- **Chromium**: Convert URLs, HTML, and Markdown to PDF
- **LibreOffice**: Convert Office documents (Word, Excel, PowerPoint) to PDF
- **PDF Engines**: Merge, split, and manipulate PDFs
- **Webhook support**: Async conversions with callback URLs
- [**Stream-first**: Built on `httpstream` for efficient multipart uploads](https://github.com/nativebpm/httpstream)
## Conversion Engines
### Chromium
Convert web content to PDF:
- URL → PDF
- HTML file → PDF
- Markdown → PDF
Supports:
- Custom page properties (size, margins, orientation)
- Headers & footers with page numbers
- Wait strategies (delay, JavaScript expression)
- Cookies & custom HTTP headers
- Emulated media types (screen/print)
### LibreOffice
Convert Office documents:
- Word (.docx, .doc) → PDF
- Excel (.xlsx, .xls) → PDF
- PowerPoint (.pptx, .ppt) → PDF
- OpenDocument formats → PDF
### PDF Engines
PDF operations:
- Merge multiple PDFs
- Split pages
- Convert images to PDF
## Webhook Mode
Async conversions with callbacks:
- Returns `204 No Content` immediately
- Uploads result to webhook URL in background
- Separate error callback URL
- Custom HTTP headers for callbacks
See [Gotenberg webhook docs](https://gotenberg.dev/docs/webhook) for details.
## Examples
- [Chromium: URL to PDF](examples/cmd/chromium/converturl)
- [Chromium: Hello World](examples/cmd/chromium/helloworld)
- [Chromium: Markdown to PDF](examples/cmd/chromium/markdown)
- [Chromium: Timeout handling](examples/cmd/chromium/timeout)
- [Chromium: Trace header](examples/cmd/chromium/trace)
- [Chromium: Webhook async](examples/cmd/chromium/webhook)
- [LibreOffice: Document conversion](examples/cmd/libreoffice/convert)
- [PDF Engines: Merge PDFs](examples/cmd/pdfengines/merge)
- [Health check](examples/cmd/health)
## License
MIT — see [`LICENSE`](../LICENSE).