mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
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:
commit
45722e9aa4
@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user