MPDF shows an additional page at the end

I've used mpdf to generate pdf from html.

There is one problem that this generated PDF shows one additional page. If the content ends on page 1, it generates 2 pages, and if the content ends on page 2, it generates three pages.

Here is my code -



$mpdf=new mPDF('fsalbertpro','A4','','' , 0 , 0 , 0 , 0 , 0 , 0);

$html='----'; // this variables contain all css and HTML to be shown in PDF

ob_clean(); // cleaning the buffer before Output()


$mpdf->list_indent_first_level = 0;  // 1 or 0 - whether to indent the first level of a list





Then how do I delete the last blank page?


source to share

1 answer

I had the same problem. At some point I had



which result in a blank page. After deleting it, the blank page disappeared.



All Articles