How-to integrate FPDF and FPDI in my component? With "vendors" var?
Thanks,
Gianluca
On 15 Gen, 19:35, Takuo SHIONO <[EMAIL PROTECTED]> wrote:
> Hello Gianluca,
>
> I am also using FPDF with cakePHP.
>
> I think the problem is that the program output the white spaces in the
> layout template before FPDF outputs HTTP headers for pdf file.
>
> Please try:
> $this->layout = null;
>
> If this does not work, there is another solution.
> You do not need to use view.
> You create a component for generating pdf.
> (PdfComponent)
>
> // app/controllers/components/pdf.php
> class PdfComponent extends Object {
> function generate() {
> $pdf = new PdfGenerator();
>
> /// code for generating pdf
>
> $pdf->Output(); // This function output HTTP protocol headers.
> }
>
> }
>
> The controller use this component and do not use view.
>
> TestController extends AppConteroller {
> var $components = array('Pdf');
> function generate() {
> $this->Pdf->generate();
> exit; // Do not show the content of view.
> }
>
> }
>
> This works fine for me.
>
> 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
-~----------~----~----~----~------~----~------~--~---