Can I TCPDF footer print the fields without departing from the MVC standard? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Can I TCPDF footer print the fields without departing from the MVC standard? (/showthread.php?tid=75630) |
Can I TCPDF footer print the fields without departing from the MVC standard? - RRIOS - 02-27-2020 I use Tcpdf to generate a report. I researched how to change the footer. I understood that it is only possible if I create a class inheriting the original class. So I created this class and the myfooter and myheader methods. But my footer needs to print names that are fields in a table. I do 4 select SQL and print the body of the report. But how do I make my footer print the fields without departing from the MVC standard? I will try to explain further: I created a TCPDF extends class and saved this file in the LIB folder. This class has 2 methods (1 header and 1 footer). I need the footer to fetch names from an SQL query. Can I, from within this FOOTER method, call a model that returns these names? |