Also see
http://groups.google.com/group/cake-php/browse_thread/thread/24196c7482ad2015/57bf84dfab5c910a?lnk=gst&q=pdf+debug#57bf84dfab5c910a
On Jan 18, 9:28 pm, Takuo SHIONO <[EMAIL PROTECTED]> wrote:
> Hello Gianluca,
>
> In may case, we put FPDF into vendors directory. Then we generate
> component php file, pdf_generator.php. In this php file, we define two
> classes. The first one is PdfGeneratorComponent class which is component
> class. The other is MyFPDF class which extends FPDF class.
>
> The following is the brief example.
>
> pdf_generator.php:
> <?php
> // in the setup.php file, we specify font path and a few elements.
> vendor("fpdf/setup");
> class PdfGeneratorComponent exnteds Object {
> function generate() {
> // code for generating pdf file using MyFPDF class object.
> ....
> }}
>
> class MyFPDF extends FPDF {
> // define some utility functions for generating pdf files.
> ....}
>
> ?>
>
> In the controller, we use this component as follows:
>
> xxx_controller.php:
> <?php
> class XxxController {
> ...
> var $components = array('Pdf');
> ...
> function generate {
> $this->Pdf->generate();
> exit;
> }}
>
> ?>
>
> Best Wishes,
>
> Takuo Shiono
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---