Closed klopus closed 5 years ago
Hello, I found an error to adding an attachment, I suggest this fix;
SetImportUse() is deprecated to mpdf 8
in pdf .php change row 391 if ($pdfAttachments) { $api->SetImportUse(); $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $this->writePdfAttachment($api, $attachment); } }
if ($pdfAttachments) { $api->SetImportUse(); $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $this->writePdfAttachment($api, $attachment); } }
to if ($pdfAttachments) { $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $pagecount = $api->SetSourceFile($attachment); for ($i=1; $i<=($pagecount); $i++) { $api->AddPage(); $api->UseTemplate($api->ImportPage($i)); } } }
if ($pdfAttachments) { $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $pagecount = $api->SetSourceFile($attachment); for ($i=1; $i<=($pagecount); $i++) { $api->AddPage(); $api->UseTemplate($api->ImportPage($i)); } } }
it's a quick fix, surely there is a better method
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hello, I found an error to adding an attachment, I suggest this fix;
SetImportUse() is deprecated to mpdf 8
in pdf .php change row 391
if ($pdfAttachments) { $api->SetImportUse(); $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $this->writePdfAttachment($api, $attachment); } }
to
if ($pdfAttachments) { $api->SetHeader(null); $api->SetFooter(null); foreach ($pdfAttachments as $attachment) { $pagecount = $api->SetSourceFile($attachment); for ($i=1; $i<=($pagecount); $i++) { $api->AddPage(); $api->UseTemplate($api->ImportPage($i)); } } }
it's a quick fix, surely there is a better method