- $pdf_filename = $config->templateCompileDir . CRM_Utils_File::makeFileName($params['PDFFilename']);
-
- //FIXME : CRM-7894
- //xmlns attribute is required in XHTML but it is invalid in HTML,
- //Also the namespace "xmlns=http://www.w3.org/1999/xhtml" is default,
- //and will be added to the <html> tag even if you do not include it.
- $html = preg_replace('/(<html)(.+?xmlns=["\'].[^\s]+["\'])(.+)?(>)/', '\1\3\4', $params['html']);
-
- file_put_contents($pdf_filename, CRM_Utils_PDF_Utils::html2pdf($html,
- $params['PDFFilename'],
- TRUE,
- $format
- )
- );
-