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.
Asked
Active
Viewed 2.7k times
9
-
It's written at that link pretty much at the beginning: *"format can be specified either as a pre-defined page size, or as an array of width and height in millimetres (see Example #2 below)."* - Which part of it was hard to understand (e.g. what is your concrete question?)? Have you problems to decipher *Example #2* or weren't you unable to find it on page? And last but not least: What is your own page format? – hakre May 14 '14 at 19:42
1 Answers
24
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));

Brian Tiffin
- 3,978
- 1
- 24
- 34
-
1is there a limit on page size? example when giving [50,100] it produces an error. – Harsha Jun 14 '18 at 17:55