Quick Start
Run the ANNÁVE PDF Engine in under two minutes — build, start the server, and convert your first document.
Prerequisites
- Go 1.22 or later — go.dev/dl
- Git
No C dependencies, no Docker required for local development. A single Go binary is all you need.
Clone and build
Clone the repository and build with the standard go build command. The binary embeds all fonts and config — nothing else is needed at runtime.
git clone https://github.com/annavetech/annave-pdf-engine-golang.git
cd annave-pdf-engine-golang
go build ./cmd/serverThis produces a single binary named server (or server.exe on Windows) with embedded fonts and config — no extra files needed at runtime.
Start the server
The server listens on port 5741 by default. You can override it with the PORT environment variable.
./server
# or run without building:
PORT=5741 go run cmd/server/main.goOnce running, the engine prints its version and the port it is listening on:
ANNÁVE PDF Engine v1.0.0 listening on :5741Convert your first document
From a Markdown file
Use multipart form upload to send a file. The engine infers the input format from the file extension — no format parameter needed.
curl -X POST http://localhost:5741/convert \
-F "file=@README.md" \
-o output.pdfFrom raw text
Send raw document content in the request body. Specify the format explicitly with the format query parameter.
curl -X POST "http://localhost:5741/convert?format=md" \
-H "Content-Type: text/plain" \
--data-binary "# Hello World
This is my first PDF." \
-o hello.pdfFrom a JSON document schema
Submit a structured JSON document. The engine maps it directly to the internal AST without a parser step — useful when you are generating documents programmatically.
curl -X POST http://localhost:5741/convert \
-H "Content-Type: application/json" \
-d '{"type":"document","children":[
{"type":"heading","level":1,"text":"Report"},
{"type":"paragraph","text":"Summary paragraph."}
]}' \
-o report.pdfVerify it is running
curl http://localhost:5741/health
# {"status":"ok","version":"1.0.0"}Next steps
- Read the API & Integration guide to call the engine from your language of choice
- See Supported input formats and error codes in the API reference
- Customise page size, fonts, and margins in Configuration
- Use the PDF CLI for local scripting without starting an HTTP server