Search code examples
twitter-bootstraplaravelwkhtmltopdf

Wkhtmltopdf ignores Bootstrap table


I have a page with PDF export option. Beside these tables I have also three charts (Highcharts). These charts are exported fine but the table is completely ignored. Is there a way to fix this?

This is my code:

$pdf->setOption('enable-javascript', true);
$pdf->setOption('javascript-delay', 10000);
$pdf->setOption('no-stop-slow-scripts', true);
$pdf->setOption('dpi', 100);
$pdf->setOption('image-quality', 100);

return $pdf->setOrientation('landscape')->setOption('margin-top', 0)->download('export-' . $id . ' .pdf');

And simple bootstrap table: <table cellspacing="0" class="table table-responsive table-striped table-bordered">


Solution

  • changing the dpi worked for me. wkhtmltopdf -O Portrait --dpi 600 -L 0mm -R 0mm -T 0mm -B 0mm --page-size A4