Open Dominik-Kapitan opened 9 months ago
Hi.
In laravel 10 I'm using wkhtmltopd library to generate pdf document.
The problem is when I try generate content in full width of ducument, top and sides. Some reason there is always white border on the right side
This is my html code that I use to generate document:
<!DOCTYPE html> <html style="margin: 0; padding: 0; background-color: #fd7e14"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Title</title> <link rel="stylesheet" media="screen" href="https://fontlibrary.org//face/open-sauce-one" type="text/css"/> <meta name="author" content="name author"> <style media="all"> html { margin: 0 !important; padding:0 !important; border:0 !important; outline:0 !important; } body { margin: 0 !important; padding:0 !important; border:0 !important; outline:0 !important; } </style> </head> <body> Test Content </body> </html>
And this is my PHP render code:
$pdf->setPaper('A4', 'portrait')->setOptions([ 'margin-left' => 0, 'margin-right' => 0, 'margin-top' => 0, 'margin-bottom' => 0, ])->save($pathToStore);
How can I remove that white space?
I'm literally just browsing here, but have you tried a negative margin right? Maybe -1 or -2?
Hi.
In laravel 10 I'm using wkhtmltopd library to generate pdf document.
The problem is when I try generate content in full width of ducument, top and sides. Some reason there is always white border on the right side![Screenshot from 2023-09-26 12-29-38](https://github.com/barryvdh/laravel-snappy/assets/137776247/48985d0f-f50f-4a26-96c3-3515cf854b7a)
This is my html code that I use to generate document:
And this is my PHP render code:
How can I remove that white space?