include $_SERVER['DOCUMENT_ROOT'] . "/WebBuilder/main.class.php"; class pdf { public $mpdf; public $htmlContent; function __construct($page_orientations = "P") { 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($page_orientations); $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 add_page($page_orientations = "P") { $this->mpdf->Addpage($page_orientations); } function pageHeading($text) { $this->htmlContent = $this->htmlContent . "