I am creating a PDF for our clients website. The PDF is paginated for an A4 print. At the end I need to insert several existing PDFs.
Using the FPDI library works fine except when the inserted PDF is wider than the the A4 width, it doesn't rescale. In the documentation I've found 2 examples of how to do it, none seems to deliver:
First example
$varPageId = $objPDF->ImportPage($intPageNumber); $varTemplateSize = $objPDF->getTemplatesize($varPageId); $objPDF->AddPage( $varTemplateSize['orientation'] , $varTemplateSize ); $objPDF->useImportedPage($varPageId);
Second example
$varPageId = $objPDF->ImportPage($intPageNumber); $objPDF->AddPage(); $objPDF->useTemplate( $varPageId , ['adjustpageSize' => true] );
Would anyone know how I can make sure the inserted PDF gets rescaled and all the content is displayed in the new denerated PDF?
Thanks in advance!