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:
Julio Cesar Laura
2013-03-12 18:31:17 -04:00
parent a8a9a0dde1
commit 9b63600ab6
2 changed files with 13 additions and 1 deletions

View File

@@ -981,6 +981,13 @@ class Cases
$oReportTables = new ReportTables();
$addtionalTables = new additionalTables();
if (!isset($Fields['APP_NUMBER'])) {
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
}
if (!isset($Fields['APP_STATUS'])) {
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
}
$oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
$addtionalTables->updateReportTables(
$appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields, $Fields['APP_STATUS']

View File

@@ -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