PHP code example of tecnickcom / tc-lib-pdf-page
1. Go to this page and download the library: Download tecnickcom/tc-lib-pdf-page 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/ */
tecnickcom / tc-lib-pdf-page example snippets
= new \Com\Tecnick\Pdf\Page\Page(
'mm',
new \Com\Tecnick\Color\Pdf(),
new \Com\Tecnick\Pdf\Encrypt\Encrypt(false),
);
$page->add([
'format' => 'A4',
'orientation' => 'P',
'margin' => ['PL' => 20, 'PR' => 20, 'PT' => 15, 'PB' => 15],
'columns' => 2,
]);
$page->addContent('BT /F1 12 Tf 100 700 Td (Page ~#PN of ~#PT) Tj ET');
$pon = 0;
$pdfpages = $page->getPdfPages($pon);