How gotenberg/gotenberg works
Main Components
a) API Layer
• Entry point for HTTP requests
• Located in pkg/modules/api
• Should be shown as the frontend interface
b) Core Service Modules
As separate components:
• Chromium (HTML/Markdown to PDF conversion)
• LibreOffice (Office documents to PDF conversion)
• PDF Engines (PDF manipulation)
• QPDF
• PDFtk
• PDFcpu
• Exiftool (metadata handling)
c) Supporting Modules
• Webhook module (async operations)
• Prometheus module (metrics)
• Logging module
Architecture Pattern
• Modular architecture (evident from pkg/modules structure)
• Stateless nature (as mentioned in README)
• Docker containerization
[External Clients] → [Docker Container]
• ↓
• [API Gateway (3000)]
• ↓
• [Request Processing]
• ┌────────┼────────┐
• ↓ ↓ ↓
• [Chromium] [LibreOffice] [PDF Engines]
• ┼────────┘
• ↓
• [File Processing]
• ┌────────┼────────┐
• ↓ ↓ ↓
• [Webhook] [Prometheus] [Logging]
Important Details
a) Component Interactions:
• How the API routes requests to appropriate modules
• File processing workflows
• Points where PDF generation occurs
b) Configuration Elements:
• Docker container boundary
• Port exposures (3000)
• Volume mounts for temporary files
c) Monitoring & Observability:
• Prometheus metrics flow
• Logging pathways
• Webhook notification system
Technical Specifications
Details in annotations:
• Go-based implementation
• Docker containerization
• PDF processing capabilities
• Supported input formats (HTML, Markdown, Office documents)