3

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).

The problem is that the text I want to display and convert into PDF contains formulas...

The text displays correctly in web pages: I'm using MathJax that displays the formulas inside the math tag (currently in MathML code, but I can easily go for the LaTeX code) in the text.

Now I've to find a way to generate a PDF from the HTML-text that contains formulas...any clue?

Currently, I'm trying to convert HTML-text to PDF using FPDF and TCPDF (php classes) but they don't support the math 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?

Thanks in advance!

ChemClaude
  • 51
  • 1
  • 4
  • ChemClaude, did you find some solution? I've the same problem. – alsantos123 Sep 02 '14 at 19:56
  • Not yet... I've set the project on pause... I've envisaged two solutions (but I've not tested them yet): using a command line application that converts MathML to image and launch it via PHP; Using PhantomJS (https://github.com/agrbin/svgtex). – ChemClaude Oct 09 '14 at 00:08

0 Answers0