Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete blank page in mPdf

Tags:

php

mpdf

I am converting an html file to PDF by using mPdf, but the returned PDF file includes blank pages. I want to delete those blank pages.

like image 354
Trần Thanh Luân Avatar asked Jun 24 '15 11:06

Trần Thanh Luân


1 Answers

Had the same problem and realized that my CSS was forcing these page breaks. Make sure you don't have this in your CSS:

page-break-after: always;
like image 141
biko Avatar answered Sep 18 '22 12:09

biko