1. Go to this page and download the library: Download ivanpepelko/php-wkhtmltopdf 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/ */
ivanpepelko / php-wkhtmltopdf example snippets
use WkHtmlToPdf\WkHtmlToPdf;
bin/wkhtmltopdf');
$pdf->setInputPath('html/invoice.html')
->setOutputPath('pdf/invoice.pdf')
->useRecommendedOptions()
->convert()
;
$pdf->setFooterCenterText($text)
->setHeaderLeftText($text)
->setFooterSpacing($spacing)
->setHeaderFontName($name)
->setFooterHtml($html); // etc, you get the point