Merge branch 'ent-9612-PDF-informes-de-inventario-no-se-adapta-al-texto-y-es-ilegible' into 'develop'

workaround to avoid visual issue in PDFs

See merge request artica/pandorafms!5183
This commit is contained in:
Daniel Rodriguez 2022-10-20 07:19:26 +00:00
commit 45722e9aa4

View File

@ -1944,7 +1944,16 @@ function reporting_html_inventory($table, $item, $pdf=0)
$table1->head[$k] = $k;
$table1->headstyle[$k] = 'text-align: left';
$table1->cellstyle[$str_key][$k] = 'text-align: left;';
$table1->data[$str_key][$k] = $v;
if ($pdf === 0) {
$table1->data[$str_key][$k] = $v;
} else {
// Workaround to prevent table columns from growing indefinitely in PDFs.
$table1->data[$str_key][$k] = preg_replace(
'/([^\s]{30})(?=[^\s])/',
'$1'.'<br>',
$v
);
}
}
}
}