Closed tsdogs closed 6 years ago
Not sure of the issue... it looks obvious that once you have used the global component and set its properties, the properties will continue to persist unless you reset them.
So if your content
changes you need to reset and change $pdf->content
everytime when you use it differently.
The problem is exactly this. If I set the $pdf->content to be different once it's been rendered, the content of the generated PDF does not change accordingly when I call rener() again.
Steps to reproduce the issue
Expected behavior and actual behavior
The result is that the files are generated, but the content is the one associated to the first call of this function I was expecting it would generate with each content to be different
An example code would be something like this
view.php
controller.php
The files generated would contain all the data of the first model
If I use every time a new Mpdf object by replacing the line
with
Everything works as expected and I get different content based on the data contained into the models.