I'm currently attempting to convert HTML markup (from an xml feed) into a PDF dynamically via a PHP script.
From reading other answers the best free way of doing this seemed to be to use html2pdf.
// HTML2PDF
require_once('/public_html/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($htmlContent);
$html2pdf->Output('/public_html/wp-content/uploads/rns/html2pdf.pdf');
The problem I'm having is my $htmlContent contains the css: FONT-FAMILY: "Times New Roman","serif" in various places and my script gives the error:
TCPDF ERROR: Could not include font definition file: "times new roman"
I've googled and the only documentation is this: http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:font
Which in turn leads you to: http://www.tcpdf.org/fonts.php
I'm lost though, the second link says that times/Times New Roman is a core PDF font... I've tried various things and get the same error.
What would I actually need to write to add the font, or alternatively, how could I strip all of the FONT-FAMILY classes out of the $htmlContent (I don't even need it in any particular font, just one that works).