PHP code example of alienproject / pdfreport
1. Go to this page and download the library: Download alienproject/pdfreport 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/ */
alienproject / pdfreport example snippets
use AlienProject\PDFReport\PDFReport;
$report = new PDFReport();
$report->LoadTemplate('demo.xml');
$report->SetVar('MESSAGE', 'Current date ' . date('Y-m-d'));
$report->BuildReport();
/*
* Test url:
* https://<your_path>/index.php
*
*/
;
$templateFileName = getcwd() . DIRECTORY_SEPARATOR . 'hello.xml';
$report = new PDFReport();
$report->LoadTemplate($templateFileName);
$report->SetVar('HELLO_MESSAGE', $label);
$report->BuildReport();