Using python, selenium, beautifulsoap and wkhtmltopdf/pdfkit, I am rendering a webpages containing MathJax formulas to PDF files (actually, the pages are from a moodle site)