fetchDoc($_GET["id"]); $pd = new Parsedown(); $doc["Description"] = $pd->text($doc["Description"]); $front = new Template(); $front->doc = $doc; $defaultConfig = (new \Mpdf\Config\ConfigVariables())->getDefaults(); $fontDirs = $defaultConfig['fontDir']; $defaultFontConfig = (new \Mpdf\Config\FontVariables())->getDefaults(); $fontData = $defaultFontConfig['fontdata']; try { $mpdf = new \Mpdf\Mpdf([ 'format' => 'A4', 'fontDir' => array_merge($fontDirs, [ __DIR__ . '/assets', ]), 'fontdata' => $fontData + [ 'prociono' => [ 'R' => 'Prociono-Regular.ttf', ] ], 'default_font' => 'prociono' ]); $mpdf->showImageErrors = true; $mpdf->WriteHTML($front->render("_templates/label_template.php")); $mpdf->Output(); } catch (\Mpdf\MpdfException $exception) { http_response_code(500); ?>

Something went wrong generating the label.

getMessage() ?>