How do i use Codeigniter or any existing library to generate pdf files using a blank pdf file |
[eluser]natleumas[/eluser]
Hi all, i'm new to this framework. I am working on a project which requires me to Open up a pdf file (think of it as a template) with all the logos and boxes done up. Then put text into the pdf file using php and finally save it as a new pdf file. Anyone have done something similar to this? i think the closest library that i found is FPDF_TPL. How do i set up FPDF in codeigniter?
[eluser]ray73864[/eluser]
[quote author="natleumas" date="1222333187"]Hi all, i'm new to this framework. I am working on a project which requires me to Open up a pdf file (think of it as a template) with all the logos and boxes done up. Then put text into the pdf file using php and finally save it as a new pdf file. Anyone have done something similar to this? i think the closest library that i found is FPDF_TPL. How do i set up FPDF in codeigniter?[/quote] Checkout this wiki article on the codeigniter wiki: http://codeigniter.com/wiki/fpdf_CIed/
[eluser]natleumas[/eluser]
Thanks ray73864 for the link. Any idea how should i setup the FPDF to work with codeigniter? or is it the other way, to setup codeigniter to work with FPDF? i am confused ~.~.~.~.~.~.~.~
[eluser]outrage[/eluser]
Kinda goes something like this: application libraries fpdf.php fpdf_tpl.php fpdi.php fpdi_pdf_parser.php pdf_context.php pdf_parser.php wrapper_functions.php Controller Code: $this->load->library('fpdf'); Don't forget the fonts folder: Add this to config.php Code: $config['fonts_path']= "resources/font/"; Works great for me, hope this helps.
[eluser]natleumas[/eluser]
Thanks for that Outrage. this is gold! Appreciate it!
[eluser]Paul Hernández[/eluser]
Hi, I installed the FPDF and FPDI libraries in CI2. I get the following error when I try to load the library Instruction: Code: $this->load->library('fpdf'); Code: Fatal error: Call to a member function library() on a non-object I followed the instruction on the post above, a couple of files are missing: fpdf_tpl.php and wrapper_functions.php but I think it is due to the libraries version Any comment would be appreciated
[eluser]JonoB[/eluser]
FPDF has been superceded by TCPDF http://codeigniter.com/wiki/Category:Con...ns::TCPDF/
[eluser]Paul Hernández[/eluser]
JonoB: Thank you very much for your fast reply ;-) That's exactly what i need
[eluser]Paul Hernández[/eluser]
Hi JonoB: I'm still getting the same error when I tried to load the library: Message: Undefined property: pdf::$load Fatal error: Call to a member function library() on a non-object I read the custom libraries naming conventions and the pdf.php library does not meet them. I changed the file name and capitalized the file name (Pdf.php), the same with the class declaration, but I'm still getting the same error. Any idea? Can you post the config file tcpdf.php Thank and regards
[eluser]JonoB[/eluser]
Not sure how you have set it up, but I got it working as follows: http://codeigniter.com/wiki/TCPDF_Integration/ |
Welcome Guest, Not a member yet? Register Sign In |