Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set custom page size in mPDF?

Tags:

php

pdf

mpdf

I need some help with mPDF. I want to set up my custom page size (exactly: width 49mm and height 200mm), but I can not find solution. I found mPDF() manual (http://mpdf1.com/manual/index.php?tid=184) but there are only ready formats like A4, B5 etc. I have to set up my own page format.

like image 858
ZaquPL Avatar asked May 14 '14 19:05

ZaquPL


1 Answers

There is an example that shows how to initiate the page with width and height.

// Define a page size/format by array - page will be 190mm wide x 236mm height
$mpdf=new mPDF('utf-8', array(190,236));
like image 148
Brian Tiffin Avatar answered Oct 11 '22 15:10

Brian Tiffin