fix(pdf): replace fpdf2 with weasyprint for proper md→PDF rendering

fpdf2's built-in Helvetica was Latin-1 only and required manual line-by-line
markdown parsing, causing indentation artifacts at speaker changes. weasyprint
renders via HTML+CSS so layout, wrapping, and Unicode all work correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 09:30:34 +02:00
parent 4a81ef3673
commit 2389d377b8
3 changed files with 36 additions and 63 deletions

View File

@@ -3,6 +3,13 @@ FROM docker.io/library/python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt