PHP code example of andrelec1 / docgenerator
1. Go to this page and download the library: Download andrelec1/docgenerator 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/ */
andrelec1 / docgenerator example snippets
use App\DocumentGenerator;
use App\Enum\Align;
use App\Enum\TextAlign;
use App\Enum\TextDecoration;
use App\Model\Code\PHPCodeElement;
use App\Model\List\SimpleListElement;
use App\Model\Title\TitleElement;
new SimpleListElement())
->addStringElements(['Element 1', 'Element 2']));
$document->addElement((new PHPCodeElement('
$document->addElement((new SimpleListElement())
->addStringElements([\'Element 1\', \'Element 2\']));
'))
->align(Align::LEFT)
);
$document->render();