Generate PDFs in Go with Marqius Kern
gotenberg-go-client calls Gotenberg's API at the address you give it. Marqius Kern answers that API, Gotenberg 8's and 9's, from a 41 MB image: change the image your compose file or manifest runs, and your Go code stays as it is.
Marqius

Try it · Review compatibility results
The container image to use in your Compose file or deployment manifest:
image: marqius/kerngotenberg-go-client and Marqius Kern, in one folder.
The client calls the address you give gotenberg.NewClient, with its scheme (http://...); that address stays as it is.
You need: Docker, curl and Go 1.24.2 or later.
It takes: about 5 minutes.
Step 1. Start Marqius Kern
In a new, empty folder, start Marqius Kern and wait until it answers. The first command starts it in the background, as a container named kern on port 3000; the second asks its health check until it answers.
docker run --rm -d --name kern -p 3000:3000 marqius/kern
curl -sS --fail --retry 10 --retry-delay 1 --retry-all-errors http://localhost:3000/healthYou should see: a long string of letters and digits (the container's ID), then a line that begins {"status":"up".
Step 2. Make a module with the client
go mod init makes a Go module, a project with its own list of the packages it uses, named example.com/invoices. go get adds the client, version 8.12.0.
go mod init example.com/invoices
go get github.com/starwalkn/gotenberg-go-client/v8@v8.12.0You should see:
go: creating new go.mod: module example.com/invoices
go: downloading github.com/starwalkn/gotenberg-go-client/v8 v8.12.0
go: added github.com/starwalkn/gotenberg-go-client/v8 v8.12.0Step 3. Make a small price list
printf 'Item,Qty,Price\nTea,2,3.50\nCoffee,1,4.20\n' > prices.csvYou should see: nothing printed; the folder now holds prices.csv.
Step 4. Write the program
Save this as main.go:
package main
import (
"context"
"log"
"net/http"
"github.com/starwalkn/gotenberg-go-client/v8"
"github.com/starwalkn/gotenberg-go-client/v8/document"
)
func main() {
client, err := gotenberg.NewClient("http://localhost:3000", http.DefaultClient)
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
page, err := document.FromString("index.html", "<h1>Invoice 1001</h1><p>Thank you for your order.</p>")
if err != nil {
log.Fatal(err)
}
if err := client.Store(ctx, gotenberg.NewHTMLRequest(page), "invoice.pdf"); err != nil {
log.Fatal(err)
}
prices, err := document.FromPath("prices.csv", "prices.csv")
if err != nil {
log.Fatal(err)
}
if err := client.Store(ctx, gotenberg.NewLibreOfficeRequest(prices), "prices.pdf"); err != nil {
log.Fatal(err)
}
log.Println("Saved invoice.pdf and prices.pdf")
}Step 5. Run it, then stop Marqius Kern
go run .
docker stop kernYou should see (Go's log puts the date and time first, so yours differ):
2026/11/29 08:09:44 Saved invoice.pdf and prices.pdf
kernThere are now two new files in the folder: invoice.pdf, with the heading Invoice 1001, and prices.pdf, with the price list.
If it does not work:
docker runsays the namekernis already in use: a container left from an earlier try still has it. Remove it withdocker rm -f kern, then start again from step 1.docker runsays port 3000 is already allocated or in use: another server listens on it, often your old Gotenberg. Stop that first (docker pslists the running containers).- The
curlcommand in step 1 gives up with an error:docker logs kernshows Marqius Kern's messages.
What differs from Gotenberg: No differences were reported in the library tests referenced below. Those results do not establish identical output for every document.
What to check after switching:
- with basic auth (
req.UseBasicAuth), start Marqius Kern with--api-enable-basic-authand theGOTENBERG_API_BASIC_AUTH_USERNAMEandGOTENBERG_API_BASIC_AUTH_PASSWORDvariables, as the client's own tests do; client.Storereports only the status of a request the server refuses;client.Sendreturns the answer, whose body says why.
Compatibility results
The public Marqius compatibility scoreboard reports these results for Marqius Kern 0.12.18, tested on 30 November 2026 and reviewed here on 2 December 2026. The counts cover the named libraries’ or applications’ assertions, not identical rendering of every customer PDF. Compare your own documents before switching.
Library and version | Pass on Gotenberg | Pass on Marqius Kern |
|---|---|---|
gotenberg-go-client 8.12.0's own tests | 45 | 45 |
See every test on the scoreboard
Licensing Marqius Kern
Personal, teaching and open-source use is free with a Community licence, including open-source projects' CI runs and documentation builds.
- Get your free key on the Marqius Kern licence page, then sign in with Google.
- Tick "I'll use Marqius Kern only for personal, teaching or open-source work".
- Get my free key, then Copy key.
- Set it as the variable
MARQIUS_LICENCEon your server.
Anything done by or for a business, including internal tools and client work, needs a paid licence. See the plans and prices.
Deploy Marqius Kern on Railway
For a hosted PDF server, start with the Marqius Kern deployment template on Railway. The examples in this guide run locally; when using Railway, configure your client with the service’s HTTPS address and the generated credentials shown in its Variables tab.
Deploy Marqius Kern on Railway
Before you switch
Compare your own documents side by side first, as the switching guide shows, then switch.
Reader questions
Does gotenberg-go-client work with Marqius Kern?
Yes. Its own tests, all 45 that pass against Gotenberg, pass against Marqius Kern on the public scoreboard.
Is gotenberg-go-client written for Gotenberg 8 or 9?
gotenberg-go-client 8.12.0 is written for Gotenberg 8's API. Marqius Kern answers Gotenberg 8's API, maintained, and Gotenberg 9's beside it.
How do I add my licence?
Personal, teaching and open-source use is free with a Community licence: get the key on the Marqius Kern licence page and set it as the variable MARQIUS_LICENCE on the server. Without a key, Marqius Kern makes the same documents and says in its log that it has none. Anything done by or for a business needs a paid licence.