I started the TCPDF setup in my cake setup program and now I'm trying to use FPDI as well, because I need to add a PDF to the beginning of the created PDF file.
When I try to do this, I use 3 classes
XTCPDF that contains my FPDI header data - TCPDF FPDI class - TCPDF class
and it is configured like this:
XTCPDF extends FPDI FPDI extends TCPDF
When I try to generate a PDF using commands from the FPDI classes, I get the following error:
Fatal error: Cannot access protected property XTCPDF::$PDFVersion in C:\Program Files\XAMPP\xampp\htdocs\quote\app\vendors\fpdi\fpdi_pdf_parser.php on line 388
I think this may be a problem with the scope, but I'm not too sure, I also tested it by changing it to not include the XTCPDF class, but the same error occurs,
EDIT: The code I use to access the FPDI class:
$tcpdf->setSourceFile(APP.'webroot'.DS.'img'.DS.'pdf'.DS.'front_cover.pdf');
$frontCover = $tcpdf->importPage(1);
$tcpdf->useTemplate($frontCover);
Thanks in advance for your help: D