Weasyprint package increases the size of Docker image

I’m preparing the docker image for the series 7.0 and I update to debian:12-slim: Draft: Add 7.0 series (!14) · Merge requests · Tryton / Tryton Docker · GitLab

The problem is that installing the weasyprint package increase a lot the size of the image. I already succeeded to reduce the size by preferring python3-munkres over python3-scipy from python3-fonttools. But the python-sympy dependency adds still 169M (which did not exist in debian:11-slim).

Historically we use debian packages because weasyprint installed from PyPI works but it is missing a lot of tools to make proper rendering. So as we do not want to track all the dependencies manually, we use the Debian packages.
But now they add more and more dependencies for weasyprint so I’m wondering if we should not move this dependency to the “-office” version (which may be renamed as “-extra”).

As weasyprint is just used for reporting, I think it makes sense to add this dependency on the “office” version.