allow specifying conversion resolution, drop explicit dpi

This commit is contained in:
2026-03-27 13:51:56 -07:00
parent 5f68aa5567
commit 5923bff155
14 changed files with 398 additions and 94 deletions
+5 -3
View File
@@ -94,7 +94,7 @@ make run-server
- defaults S3 endpoint to `localhost:8333` for host-based development
- auto-normalizes `seaweedfs:8333` to `localhost:8333` for host runs
- supports optional `UVICORN_HOST` and `UVICORN_PORT` overrides
- exposes conversion tuning vars (`CONVERSION_IMAGE_DPI`, `CONVERSION_PPTX_TO_PDF_TIMEOUT_SECONDS`, `CONVERSION_PDF_TO_IMAGES_TIMEOUT_SECONDS`)
- exposes conversion timeout tuning vars (`CONVERSION_PPTX_TO_PDF_TIMEOUT_SECONDS`, `CONVERSION_PDF_TO_IMAGES_TIMEOUT_SECONDS`)
Server endpoint base URL:
@@ -107,7 +107,7 @@ Create a conversion request:
```bash
curl \
--header "Content-Type: application/json" \
--data '{"sourceFilename":"example.pptx"}' \
--data '{"sourceFilename":"example.pptx","resolution":"CONVERSION_RESOLUTION_FHD"}' \
http://localhost:8080/officeconvertapi.v1.ConversionService/CreateConversion
```
@@ -139,6 +139,8 @@ Use `.env.example` as your baseline env configuration.
If conversion fails on larger decks, tune these environment variables:
- `CONVERSION_IMAGE_DPI` (default `72`): lower values reduce image generation time.
- `CreateConversionRequest.resolution` controls output dimensions via presets: `SD`, `HD`, `FHD`, `QHD`, `UHD`.
- Omitting `resolution` (or sending `CONVERSION_RESOLUTION_UNSPECIFIED`) defaults to `FHD`.
- Rasterization DPI is inferred automatically from source slide size and selected output dimensions.
- `CONVERSION_PPTX_TO_PDF_TIMEOUT_SECONDS` (default `180`): timeout for LibreOffice export.
- `CONVERSION_PDF_TO_IMAGES_TIMEOUT_SECONDS` (default `1800`): timeout for Poppler rasterization.