BUG-14575 "Cuando se genera un Documento de salida haciendo..." SOLVED

- No se muestra caracteres chinos en un OutputDocument (TCPDF)
- Problema resuelto:
    * Al encontrarse un tipo de fuente complejo (caracteres Japanese, Chinese, etc)
    se esta seteando un origen de fuente especifico (arialuni.ttf).
    * Vea la siguiente URL "http://wiki.processmaker.com"
    seccion "III. Configuration" punto "12. Fonts for non-Western languages".
    * Entonces el archivo "arialuni.ttf" debera ser copiando en "/path/to/processmaker/gulliver/thirdparty/tcpdf/fonts"
    Nota.- El procedimiento anterior no esta documentado para "TCPDF", solo esta para "HTML2PDF (Old Version)"
This commit is contained in:
Victor Saisa Lopez
2014-08-01 16:42:25 -04:00
parent 99f5660edb
commit 0a6a3e308c

View File

@@ -844,7 +844,9 @@ class OutputDocument extends BaseOutputDocument
//$pdf->SetFont('dejavusans', '', 14, '', true);
// Detect chinese, japanese, thai
if (preg_match('/[\x{30FF}\x{3040}-\x{309F}\x{4E00}-\x{9FFF}\x{0E00}-\x{0E7F}]/u', $sContent, $matches)) {
$pdf->SetFont('kozminproregular');
$fileArialunittf = PATH_THIRDPARTY . "tcpdf" . PATH_SEP . "fonts" . PATH_SEP . "arialuni.ttf";
$pdf->SetFont((!file_exists($fileArialunittf))? "kozminproregular" : $pdf->addTTFfont($fileArialunittf, "TrueTypeUnicode", "", 32));
}
// Add a page