Installation
pidief can run as a Docker container (the HTTP API), as a downloaded CLI binary, or be built from source.
Docker
docker run -d -p 3000:3000 --shm-size 256m -e PIDIEF_API_KEYS=change-me ghcr.io/milvasoft/pidief:latest
The image's default command is pidief serve, which starts the HTTP API on port 3000. Replace change-me with your own API key(s); see Configuration.
You can also build the image yourself from the repository:
docker build -t pidief .
A hardened service definition (read-only root, tmpfs, dropped capabilities, memory limit) is included in the repository's docker-compose.yml.
In production, a 1 GB memory limit and --shm-size 256m are recommended.
CLI binaries
CLI binaries for Linux, macOS and Windows (amd64 and arm64) are attached to each GitHub release.
HTML and template commands need Chrome or Chromium on the machine. Set the path with PIDIEF_CHROMIUM_PATH if it is not found automatically. All other commands work without a browser.
On macOS, use Google Chrome or chrome-headless-shell:
npx @puppeteer/browsers install chrome-headless-shell@stable
The "Chrome for Testing" bundle often cannot start its helper processes outside an interactive login session, such as on CI runners.
Build from source
Requires Go 1.26 or later:
go build -tags nodynamic -o bin/pidief ./cmd/pidief
Running the tests
go test ./... # unit + Chromium integration (skipped without Chromium)
PIDIEF_REQUIRE_BROWSER=1 PIDIEF_VERAPDF=1 go test ./internal/ops/ # require Chromium; validate PDF/A with veraPDF (Docker)
dotnet test clients/dotnet/Pidief.Client.slnx
PIDIEF_URL=http://localhost:3000/ PIDIEF_API_KEY=... dotnet test clients/dotnet/Pidief.Client.slnx # live end-to-end
The integration tests generate real PDFs and check page counts, extracted text (Turkish characters), embedded fonts, repeated table headers, page number footers, blocked external resources, timeouts, the PDF/A claim and the veraPDF verdict.