include $_SERVER['DOCUMENT_ROOT'] . "/WebBuilder/main.class.php"; class pdf { public $mpdf; public $htmlContent; function __construct() { require_once 'vendor/autoload.php'; $this->mpdf = $mpdf = new \Mpdf\Mpdf([ 'margin_top' => 5, // Set your desired top margin in millimeters 'margin_bottom' => 1, 'margin_left' => 1, 'margin_right' => 1, ]); $this->mpdf->Addpage('L'); $stylesheet = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/WebApp/Styles/pdf.css'); $this->mpdf->WriteHTML($stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS); $this->htmlContent = ''; } function CustomDesign() { return $this->mpdf; } function pageHeading($text){ $this->htmlContent = $this->htmlContent ."