I'm just using $this->pdf->setSourceFile($init_data['settings'] ['pdftemplate_to_load']); $this->pdf->useTemplate($this->pdf->importPage(1));
without class extends notation (i think, it didn't worked for me when i was writing this stuff) On May 13, 1:30 pm, ryan <[email protected]> wrote: > Hmmm, Thank you for the response. > > I get the following error though when I trying to use FPDI methods: > > Fatal error: Cannot access protected property XFPDI::$PDFVersion in / > (...)/vendors/fpdi/fpdi_pdf_parser.php on line 381 > > In my test code, I had just wrote the following inside of pdf.ctp > > App::import('Vendor','tcpdf/tcpdf'); > App::import('Vendor','fpdi/fpdi'); > > class XFPDI extends FPDI { > function header() { > $this->setSourceFile('img/tpl_left.pdf'); > } > > } > > $pdf = new XFPDI('P', 'in', 'LETTER', true, 'UTF-8', false); > $pdf->AddPage(); > $pdf->Output(date('Ymdhi-').'test', 'I'); > > I dont know, I am confused. haha. Thanks again. > > On May 13, 4:50 am, nini <[email protected]> wrote: > > > I've created a new pdf layout: > > pdf.ctp: > > > App::import('Vendor','tcpdf/tcpdf'); > > App::import('Vendor','fpdi/fpdi'); > > $this->pdf = new FPDI(); > > settings etc... > > > return as string: > > echo $this->pdf->Output(null, 'S'); > > > or other output types: > > $this->pdf->Output($init_data['settings']['filename'], $init_data > > ['settings']['out_type']); > > if($init_data['settings']['out_type'] != 'F'){//F - save pdf local to > > file 'filename' > > ob_flush();//!!! > > > } > > > On May 12, 9:31 pm, ryan <[email protected]> wrote: > > > > I am pretty good at getting around in cake, I have been using TCPDF to > > > handle creating PDFs for my app. I am currently trying to extend TCPD > > > with FPDI and FPDI_TPL. > > > >http://bakery.cakephp.org/articles/view/creating-pdf-files-with-cakep... > > > > TCPDF :http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf > > > FPDI :http://www.setasign.de/support/manuals/fpdi/ > > > FPDI_TPL :http://www.setasign.de/support/manuals/fpdf-tpl/introduction/ > > > > Does anyone know how I would go about doing this? > > > > Thank you. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
