I have stored the content of the pdf in the db as a text. I would like to create pdf file with more pages using the content from the db. Here is my code so far:
$pdf = new Zend_Pdf();
foreach ($pdfLabels as $label){
$pdf->pages[] = $label->getPdfContentFromDb(); // here i have the content from the db
}
$finalContent = $pdf->render();
But I am facing a fatal error:
Fatal error: Uncaught Error: Call to a member function render() on string in. ...zendframework1/library/Zend/Pdf.php:733
I am sure that my way of trying to create a new pdf page and insert some content is wrong, so would you please advice ?
I was also checking this post: How to generate new page in zend PDF in foreach loop , but not sure how should I include my content still.
Thank you
I found out the fix:
I hope it will help someone!