laravel-pdf
laravel-pdf copied to clipboard
Html2pdf ignoring css, but not on all servers
Hello. The issue is quite strange.
On a Ubuntu 22.04 hosted on google, this code:
$file = $pdf->generatePdf(view('contratto.output', [ 'contratto' => $contratto, 'allegati' => $allegati, 'preventivo' => $preventivo, 'documento_fronte' => $documento_fronte, 'documento_retro' => $documento_retro, 'cf_fronte' => $cf_fronte, 'cf_retro' => $cf_retro, 'prodotti' => $prodotti, 'cliente' => $cliente, 'isPDF' => true, ]));
works fine and generate a pdf with styles (bootstrap5 from metronic admin theme).
On a different hosted machine, same code (both update with git pull from my git repo), the pdf generated is completely without any style.
It seems that in the second case, it can't reach the external css file but this is quite absurd.
Is there any way to debug the process of creating the pdf in order to understand what's happening when loading the view?