Luziberto Mendes
Luziberto Mendes

Reputation: 45

Prevent blank space in pdf pages (DomPdf)

I don't want to leave blank spaces or leave only the minimum possible in pdf. I noticed that the tag is only inserted on the page when all its content fits on the page, otherwise it advances to the next page. I have using DOMPDF lib to generate this pdf.

Pdf sample Blade component

Upvotes: 0

Views: 2268

Answers (1)

Joao Daniel
Joao Daniel

Reputation: 90

You can give the PDF width and height and remove the margins to move it up.

@page {size: 600px 900px; margin:0!important; padding:0!important}

Upvotes: 1

Related Questions