Skip to main content
The Document Converter (doc-converter) is a lightweight service that converts source files into PDF. It normalizes Office documents, images, and plain text into a single format the Document Parser and other AI workflows can process. It is a separate service from the Document Parser.
The Document Converter is CPU-only — it loads no ML models and does not use a GPU. Conversion runs through headless LibreOffice and image libraries.

Dependencies

The Document Converter connects to standard FlowX infrastructure services that should already be configured in your environment:
  • Kafka — event-driven conversion of files stored in object storage
  • Object storage (S3-compatible / MinIO) — source and result files for the object-conversion endpoint and Kafka mode
  • CMS Core — file retrieval from FlowX content management

Capabilities

The service converts the following input formats to PDF:
InputExtensionsConversion
Office documents.doc, .docx, .xls, .xlsx, .ppt, .pptx, .odt, .ods, .odp, .rtfHeadless LibreOffice
Images.png, .jpg, .jpeg, .tif, .tiff, .webp, .gifPlaced on an A4 canvas, aspect ratio preserved
Text.txtRendered to PDF
PDF.pdfPassed through unchanged
The service runs in two modes:
  • HTTP API — synchronous conversion of an uploaded file or a file in storage
  • Kafka consumer — event-driven conversion of files stored in object storage

API endpoints

All endpoints are prefixed with the URL_PREFIX value (default: /doc-converter).
EndpointMethodPurpose
/api/v1/doc-converter/convert/filePOSTConvert an uploaded file to PDF
/api/v1/doc-converter/convert/objectPOSTConvert a file from CMS/object storage to PDF
/api/v1/doc-converter/image/filePOSTConvert an uploaded image to PDF
/api/v1/doc-converter/image/objectPOSTConvert an image from CMS/object storage to PDF
/api/v1/doc-converter/info/healthGETHealth check

Configuration

Server configuration

Environment VariableDescriptionDefault Value
URL_PREFIXFastAPI root path for reverse proxy routing/doc-converter
MAX_UPLOAD_MBMaximum upload size per request, in MB100
VERBOSEEnable verbose/debug logging0
The service listens on port 8080.

Image conversion

Environment VariableDescriptionDefault Value
IMAGE_MAX_PIXELSMaximum pixel count for an input image before it is downscaled14960000 (3400 × 4400)
IMAGE_JPEG_QUALITYJPEG quality used when normalizing images80

Object storage

Required for the object-conversion endpoints and the Kafka consumer, which read and write files in S3-compatible storage.
Environment VariableDescriptionDefault Value
MINIO_DOCUMENTS_URLObject storage endpoint URLnone
MINIO_DOCUMENTS_BUCKETBucket for source and result filesnone
MINIO_DOCUMENTS_ACCESS_KEYObject storage access keynone
MINIO_DOCUMENTS_SECRET_KEYObject storage secret keynone
CMS_USE_PRIVATERetrieve files through the private CMS path1
The Kafka consumer is enabled by default. Configure Kafka connection and authentication as described in the Kafka authentication configuration guide. CORS for the HTTP endpoints is configured through the standard APPLICATION_CORS_ALLOW_* variables — see the Ingress configuration guide.

Observability (optional)

Environment VariableDescriptionDefault Value
USE_OBSERVATORYSend telemetry to FlowX Observatory0
FLOWX_OBSERVATORY_API_URLFlowX Observatory API URL-

Deployment and sizing

The Document Converter is a lightweight, CPU-only service — it needs no GPU. Conversions run as short-lived LibreOffice subprocesses, so memory is the main resource to size for; large Office documents can briefly increase memory use.
SettingValue
Replicas1 (default)
AutoscalingMin 1, Max 5, HPA target CPU 50%
RAM requests/limits~1 Gi (FlowX Cloud production runs 896 Mi)
GPUNone
Increase the memory limit if you convert large or complex Office documents. Scale horizontally with more replicas for higher conversion throughput.

Verify your setup

The Document Converter pod is running: kubectl get pods -l app=doc-converter
The health endpoint returns HTTP 200: curl http://doc-converter:8080/api/v1/doc-converter/info/health
Test a conversion against the /api/v1/doc-converter/convert/file endpoint and verify the response is a PDF.

Document Parser setup

Configure the Document Parser for text extraction and OCR

AI Platform setup

Configure AI Platform services and service discovery

Kafka authentication

Configure Kafka connection and authentication

CMS Core setup

Configure content management for file retrieval
Last modified on July 1, 2026