title: How to generate an image from mathML (or latex) code using php
body: <p>I'm developing a small web application (using Apache-MySQL-PHP) that can display text and then transform it in PDF (the text is stored in a database as HTML code).</p>
  
  <p>The problem is that the text I want to display and convert into PDF contains formulas...</p>
  
  <p>The text displays correctly in web pages: I'm using MathJax that displays the formulas inside the <em>math</em> tag (currently in MathML code, but I can easily go for the LaTeX code) in the text.</p>
  
  <p>Now I've to find a way to generate a PDF from the HTML-text that contains formulas...any clue?</p>
  
  <p>Currently, I'm trying to convert HTML-text to PDF using FPDF and TCPDF (php classes) but they don't support the <em>math</em> tag (I didn't find one that does it... for free).
  So, I'm trying to find a way to transform dynamically the formula in the math tag into an image (that I will save temporarily in the web server) and create the PDF using the formulas as images. In principle it should work, but at the moment I'm looking for a tool to convert the formula’s code to image and save it to the web server. Anyone know how to do that?</p>
  
  <p>Thanks in advance!</p>