Fix: Text-Highlights (GlyphRange) in annotierten PDFs sichtbar machen

- merge-annotations.py: rmscene GlyphRange-Blöcke auslesen und als SVG-Rects rendern
- Koordinaten: rmscene screen-px × 72/226 → SVG-Punkte (identisch mit rmc-Skalierung)
- Farben: fill='rgb(...)' + fill-opacity statt rgba() (Inkscape-Kompatibilität)
- Highlights werden VOR Stift-Annotationen eingefügt (korrekte Z-Order)
- Dockerfile: rmscene==0.6.1 (rmrl+rmscene>=0.7.0 waren inkompatibel mit rmc)
This commit is contained in:
Borgal
2026-03-25 01:33:11 +01:00
parent b63131c0c5
commit 88d947e2ac
2 changed files with 41 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# rmc + Farb-Patch
RUN pip3 install "rmc==0.3.0" "rmscene>=0.7.0" "pypdf" "rmrl" --break-system-packages --ignore-installed packaging \
RUN pip3 install "rmc==0.3.0" "rmscene==0.6.1" "pypdf" --break-system-packages --ignore-installed packaging \
&& python3 - <<'EOF'
import pathlib
import rmc.exporters.writing_tools as m