Production-grade HTML to PDF conversion service powered by headless Chromium via Playwright.
Built for reliability under load, this service has been designed, stress-tested, and hardened for real-world, concurrent server-side environments.
- High-fidelity HTML → PDF rendering using Chromium
- Fully configurable output (page format, orientation, scale, background rendering)
- Supports both inline preview and attachment download responses
- Engineered for high concurrency and sustained throughput
- Stable browser/context lifecycle management for long-running workloads
- Deterministic rendering with consistent results across environments
Build the image:
docker build -t htmltopdf .Run the container:
docker run -p 8080:8080 htmltopdfThe service will be available at:
http://localhost:8080/swagger
Fully containerized. No additional setup required.
After building the application, install Playwright dependencies manually:
From the project root, navigate to:
/bin/Debug/net8.0
Then run:
powershell ./playwright.ps1 installThis installs the required Chromium binaries and drivers for local execution.