Ritu Singh
Problem:
In Laravel 10 I'm using the wkhtmltopd library to generate pdf documents.
The problem is when I try to generate content in full width of document, top and sides. For some reason, there is always a white border around the content.
This is my html code that I use to generate document:
Is there something wrong with styles?
Solution:
Your html looks ok to me, but you also need to set all margins to 0 for the PDF document (in addition to the html content). The options for wkhtmltopdf on the command line are as follows:
It depends on the wrapper used how to set those options in PHP.
See >the manual for further explanations on all options.
Answered by: >volkerschulz
Credit: >Stack Overflow
Read more:
>Use Firebase Realtime Database with ASP.NET MVC App
>Setting up a Cloud Composer environment: Step-by-step guide
>Built Web API using ASP.NET (C#)
>Plugins and Presets for Vuejs project
>How to Create an array based on two other arrays in Php
>Testing react components using Hooks and Mocks