🇬🇧 / 🇫🇷 Need some help with WeasyPrint? You’re in the right place to ask :)
hidden=True
fait très exactement la même chose que display: none
😁 https://github.com/Kozea/WeasyPrint/blob/master/weasyprint/css/html5_ua.css#L16
position: absolute; top: -1000px
ou quelque chose équivalent, ça devrait fonctionner
pyproject.toml
using Flit for dependencies management (you can use flit init
)python -m venv
to create the virtual environment, and venv/bin/pip install -e .
to install the packageHi everyone,
For the past couple of days I have been trying to implement weasyprint into my Django application and the setup was quit (w)easy and I was soon able to print pdfs but since my pages are full of math equations we use MathJax to convert them to SVGs but once I send markup to backend for printing I get empty spaces instead of equations. I have now spent countless hours trying to figure out how to fix that. That lead me to this Github thread (Kozea/WeasyPrint#59) where I learned that there is this thing called Pandoc that should, with Weasyprint, be able to do what I need but after another session of reading and researching I still don't understand how to get everything to work. And that brings me here, is there anyone who also tried to print HTML with math equations and if yes how have you done it? If no, is there anyone who can try and help me set this up, if its even possible to do it.
Note that I'm junior developer and some things are still hard to grasp for me.
:point_up: Edit: Hi everyone,
For the past couple of days I have been trying to implement weasyprint into my Django application and the setup was quite (w)easy and I was soon able to print pdfs but since my pages are full of math equations we use MathJax to convert them to SVGs but once I send markup to backend for printing I get empty spaces instead of equations. I have now spent countless hours trying to figure out how to fix that. That lead me to this Github thread (Kozea/WeasyPrint#59) where I learned that there is this thing called Pandoc that should, with Weasyprint, be able to do what I need but after another session of reading and researching I still don't understand how to get everything to work. And that brings me here, is there anyone who also tried to print HTML with math equations and if yes how have you done it? If no, is there anyone who can try and help me set this up, if its even possible to do it.
Note that I'm junior developer and some things are still hard to grasp for me.
defs
tag at the end of the HTML into each svg tag to get this rendering