AllToolKits.com Posted August 25, 2015 Report Posted August 25, 2015 Hi, I would like to create a PDF report from a blesta plugin. Seems like i can use http://source-docs.blesta.com/class-TCPDF.html, for the pdf generation. tried to load uisng Loader::loadModels($this, array("TCPDF")); from plugin, but it's shows error. Is there any code snippet to use TCPDF class? Will be helpful if i get a code on how to generate pdf from plug-in using TCPDF. Quote
0 activa Posted August 25, 2015 Report Posted August 25, 2015 check the invoice delivery has it do it . it use the tcpdf class . Quote
0 Tyson Posted August 25, 2015 Report Posted August 25, 2015 TCPDF is not a model, which is why you receive an error. It is vendor code, so you would need to load it directly. include_once VENDORDIR . "tcpdf" . DS . "tcpdf.php"; There is a TCPDF wrapper class for the invoice templates component which may or may not be useful for what you're doing. Quote
0 AllToolKits.com Posted August 26, 2015 Author Report Posted August 26, 2015 I can load wrapper class using oader::loadModels ? Quote
0 activa Posted August 26, 2015 Report Posted August 26, 2015 I can load wrapper class using oader::loadModels ? you should load it with components loader::loadComponents . Quote
Question
AllToolKits.com
Hi,
I would like to create a PDF report from a blesta plugin.
Seems like i can use http://source-docs.blesta.com/class-TCPDF.html, for the pdf generation.
tried to load uisng
Loader::loadModels($this, array("TCPDF")); from plugin, but it's shows error.
Is there any code snippet to use TCPDF class?
Will be helpful if i get a code on how to generate pdf from plug-in using TCPDF.
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.