Influxion is a FastAPI-based microservice for generating PDFs from structured JSON data and request-provided HTML/CSS.
Contents:
To try it out, check the Swagger UI or the examples in the examples section.
Features
Accepts JSON input
OAuth2 authentication through Entra ID.
Requires inline HTML (Jinja2) and CSS in each generation request, or Markdown (
input_type: markdown) with a bundled default stylesheet and optional custom CSSSupports optional PDF standards (e.g., PDF/A, PDF/UA)
Supports optional digital signing with Azure Key Vault certificate
Query job status via
/pdf/{job_id}Download generated PDF via
/pdf/{job_id}/downloadbefore its short retention window expiresOptional Celery worker for background PDF generation (configure via
INFLUXION_USE_CELERY,INFLUXION_CELERY_BROKER_URL, andINFLUXION_CELERY_RESULT_BACKEND)
The HTML and CSS are part of the generation request. Bundled images are uploaded
as separate binary parts with /pdf/generate/bundle; see Bundled images and scaling.
Generated PDFs and bundled images use short-lived runtime storage.
It uses:
FastAPI for the API framework,
Jinja2 for templating,
Pydantic for data validation,
WeasyPrint for PDF rendering from request-provided HTML and CSS,
PyHanko for digital signing of documents with certificates stored in Azure Key Vault.
Azure Key Vault for secure certificate management.
Celery for background task processing (optional).