Register discharge headers before first page

This commit is contained in:
DevSoftTech Server 2026-08-18 16:50:42 +05:30
parent 8a6319ac13
commit 0dbe4c6f64

View File

@ -7390,12 +7390,12 @@ class Ipd_discharge extends BaseController
$mpdf->SetAuthor('Atria HMS'); $mpdf->SetAuthor('Atria HMS');
if ($withHeader && $headerHtml !== '') { if ($withHeader && $headerHtml !== '') {
$mpdf->SetHTMLHeader($headerHtml, 'O', true); $mpdf->SetHTMLHeader($headerHtml, 'O');
$mpdf->SetHTMLHeader($headerHtml, 'E', true); $mpdf->SetHTMLHeader($headerHtml, 'E');
} }
if ($footerHtml !== '') { if ($footerHtml !== '') {
$mpdf->SetHTMLFooter($footerHtml, 'O', true); $mpdf->SetHTMLFooter($footerHtml, 'O');
$mpdf->SetHTMLFooter($footerHtml, 'E', true); $mpdf->SetHTMLFooter($footerHtml, 'E');
} }
// Replicate the exact OPD template rendering pattern: @page CSS + named blocks + body in one WriteHTML call. // Replicate the exact OPD template rendering pattern: @page CSS + named blocks + body in one WriteHTML call.