Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

parameterize constructor mpdf php

<?php
// Define a new MpdfMpdf document using utf-8 fonts
$mpdf = new MpdfMpdf(['mode' => 'utf-8']);

// Define a new MpdfMpdf document using win-1252 fonts based on a language/country code
$mpdf = new MpdfMpdf(['mode' => 'en-GB']);

// Define a Landscape page size/format by name
$mpdf = new MpdfMpdf(['mode' => 'utf-8', 'format' => 'A4-L']);

// Define a page size/format by array - page will be 190mm wide x 236mm height
$mpdf = new MpdfMpdf(['mode' => 'utf-8', 'format' => [190, 236]]);

// Define a page using all default values except "L" for Landscape orientation
$mpdf = new MpdfMpdf(['orientation' => 'L']);
Source by mpdf.github.io #
 
PREVIOUS NEXT
Tagged: #parameterize #constructor #mpdf #php
ADD COMMENT
Topic
Name
2+1 =