PHP code example of kadudutra / fpdi
1. Go to this page and download the library: Download kadudutra/fpdi library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kadudutra / fpdi example snippets
$loader = new \Example\Psr4AutoloaderClass;
$loader->register();
$loader->addNamespace('kadudutra\Fpdi', 'path/to/src/');
use kadudutra\Fpdi\Fpdi;
// or for usage with TCPDF:
// use kadudutra\Fpdi\Tcpdf\Fpdi;
// or for usage with tFPDF:
// use kadudutra\Fpdi\Tfpdf\Fpdi;
// setup the autoload function
use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplId, 10, 10, 100);
$pdf->Output();