Showing posts with label CodeIgniter. Show all posts
Showing posts with label CodeIgniter. Show all posts

Sunday, June 19, 2011

Use dompdf in CodeIgniter

What is dompdf ?
dompdf is the html to pdf converter, basically it is the rendering enjine to
convert html to pdf, written in PHP. It is working with only PHP 5,
so your sever must run with PHP 5.

Why we use dompdf at CodeIgniter ?
CodeIgniter is the PHP framework, used for making MVC based application. if your application need pdf rendering from html files, it is good to use dompdf.

How to install and use dompdf
Installation is very simple, just download the dompdf api. After downloading, you unzip the file, and copy the dompdf folder and paste it to CodeIgniter main folder where you see applications and system folders. After instaling in your application, go to your controller function and put the code. When you call the function through th controller the code execute with the view.



#1 $path = getcwd()."/dompdf/dompdf_config.inc.php";
#2 require_once($path);
#3 $html = $this->load->view('print_month_reoprts', $var_data, true);
#4 $dompdf = new DOMPDF();
#5 $dompdf->load_html($html);
#6 $dompdf->render();
#7 $dompdf->stream("my_pdf.pdf", array("Attachment" => 0));




Thanks for your patience to read this, follow me @rajeswar

Sunday, March 6, 2011

CodeIgniter, the most favourite PHP framework

Do you want to create PHP Application but confuse about which framework is good for your application.. Don’t think much, CodeIgniter is the best PHP framework to build up the real time applications.

Before going to CodeIgniter, you should have deep knowledge about MVC., the software architectural concept was first described in 1979 by Trygve Reenskaug. The original implementation described in the influential paper "Applications Programming in Smalltalk-80.


What is MVC ?

MVC is the concept of model, view and controller., the concept is divide into three part model means database, view means interface, controller is the logic by which the other two concept ( model and view ) interact.

CodeIgniter for Rapid PHP Application Development: Improve your PHP coding productivity with the free compact open-source MVC CodeIgniter framework!

Why choose CodeIgniter ?

1 – Simple and clear documentation, yes CodeIgniter is the simple platform having good documentation.

2 – Zero configuration, don’t need to change maximum configuration, almost changes are in CodeIgniter.

3 – You never use command line again after using CodeIgniter framework.

4 – You can finish your web project before your Client’s dead lines.

5 – Don’t require to learn template language to build the application.

Thanks for your patience to read this, follow me @rajeswar