CodeIgniter Forums
Where to create page plugin in dompdf ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Where to create page plugin in dompdf ? (/showthread.php?tid=20044)



Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]sovandy[/eluser]
Hello everyone,

As I told you I just start using Codeigniter, so I'm not so clear about how to use it.
Now I want to make a report to in dompdf. However, I don know where to do with it.
I've download it and place in plugin folder already.

Please everyone help me some guide and give some description about functions of plugin.

Thanks,
SOVANDY


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]Thorpe Obazee[/eluser]
Look at this: http://ellislab.com/forums/viewthread/45118/


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]sovandy[/eluser]
Yes I do,but I don understand the 3rd point.


3) Create the plugin. I’ve named it “to_pdf_pi.php”.

????


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]Thorpe Obazee[/eluser]
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
function pdf_create($html, $filename)
{
require_once("dompdf/dompdf_config.inc.php");

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream($filename.".pdf");
}
?>

name this file to “to_pdf_pi.php”


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]sovandy[/eluser]
I know this is a function of dompdf.

Where to put it:
C:\xampp\htdocs\Project_v5\system\plugins\file.php ?
or

C:\xampp\htdocs\Project_v5\system\plugins\dompdf\ file.php?
or

C:\xampp\htdocs\Project_v5\system\plugins\dompdf\www\ file.php ?

or any whre?


I just want to export my data to pdf file to do a report.


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]Thorpe Obazee[/eluser]
I'm confused. You just want to export the data and you don't want it as part of your application? If yes, PHPmyadmin has an export to PDF function for this.


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]sovandy[/eluser]
My report is that:
I want a report about book borrowing and visitors' information.
In book management, I need to show book_title, who borrow it, when will they pay back to the librarian....

I think in phpmyadmin I can not create code like that. In BorrowingManagement I display all the information of borrowing. I have a button which allows user to create a pdf report.

I think I want to use function to create report to pdf file.

Thank you,


Where to create page plugin in dompdf ? - El Forum - 06-26-2009

[eluser]Thorpe Obazee[/eluser]
I suggest you download bambooinvoice from bambooinvoice.org and see how it works there.