PHP code example of net-tools / pdf
1. Go to this page and download the library: Download net-tools/pdf 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/ */
net-tools / pdf example snippets
$pdfh = new \Nettools\Pdf\PdfHelper($cfgfile, 'P', 'Me', 'Dummy title');
$pdfh->addHTMLPage("<p><strong>This is a simple PDF file</strong></p><p>with two lines. First is bold, the second is in normal print.</p>");
$pdfh->output($path_to_file_to_be_created);
$pdfh->addPage();
$pdfh->writeHTML("<p>first line</p>");
$pdfh->writeHTML("<p>second line</p>");
$pdfh->output($path_to_file_to_be_created);