I am trying to read a pdf file, which contains images and formatting and adding new page at the end of that pdf file and then setting pdf password using mpdf in codeigniter 4.1.3 and mpdf version > 8.0.
Plain PDF files without images works completely fine using code below. Can anyone help here?
error as follows -
ErrorException #1
Uncaught CodeIgniter\HTTP\Exceptions\HTTPException: Unknown HTTP status code provided with no message: 267 in /Applications/MAMP/htdocs/projectname/system/HTTP/ResponseTrait.php:548
Stack trace:
#0 /Applications/MAMP/htdocs/projectname/system/HTTP/ResponseTrait.php(548): CodeIgniter\HTTP\Exceptions\HTTPException::forUnkownStatusCode(267)
#1 /Applications/MAMP/htdocs/projectname/system/Debug/Exceptions.php(318): CodeIgniter\HTTP\Response->setStatusCode(267)
#2 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException))
#3 {main}
$this->mpdf->SetDocTemplate($source, true);
$this->mpdf->SetProtection(array('print', 'modify'), '123456', '123456');
$this->mpdf->AddPage();
$this->mpdf->WriteHTML('');
$this->mpdf->Output(APPPATH . "../public/files/" . $fileName, 'F');