BUG 10958 La funcion PMF GenerateOutputDocuemnt no esta generando el output document SOLVED
- When a html string is in other encoding type doesn't generate the pdf using TCPDF - Sanitize the html
This commit is contained in:
@@ -892,7 +892,12 @@ class OutputDocument extends BaseOutputDocument
|
||||
|
||||
// Print text using writeHTMLCell()
|
||||
// $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
|
||||
$pdf->writeHTML($sContent, false, false, false, false, '');
|
||||
if (mb_detect_encoding($sContent) == 'UTF-8') {
|
||||
$sContent = utf8_decode($sContent);
|
||||
}
|
||||
$doc = new DOMDocument('1.0', 'UTF-8');
|
||||
$doc->loadHtml($sContent);
|
||||
$pdf->writeHTML($doc->saveXML(), false, false, false, false, '');
|
||||
// ---------------------------------------------------------
|
||||
|
||||
// Close and output PDF document
|
||||
|
||||
Reference in New Issue
Block a user