How to display a complete A4 HTML page?
liuyong888 opened this issue · comments
liuyong888 commented
The html:
Since I can't display my HTML code completely here, I changed the file extension to TXT.
a4.txt
Generatoer code:
I use Laravel-Snappy.
barryvdh/laravel-snappy: v0.4.8
$file_path = './a4.html';
$pdf = \PDF::loadFile($file_path)
->setPaper('a4')
->setOptions([
'encoding' => 'utf-8',
'margin-bottom' => 0,
'margin-left' => 0,
'margin-right' => 0,
'margin-top' => 0,
]);
return $pdf->save($pdf_name)->inline($pdf_name);`
The generated PDF:
PDF file are not the same as HTML file!
How do I ensure that the red part of my HTML is fully displayed in PDF!
Plz!
@akerouanton
@alexpozzi
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.