PHP code example of eprofos / php-wkhtmltopdf
1. Go to this page and download the library: Download eprofos/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/ */
eprofos / php-wkhtmltopdf example snippets
use Eprofos\PhpWkhtmltopdf\WKHtmlToPdf;
$wkhtmltopdf = new WKHtmlToPdf('/path/to/wkhtmltopdf');
$wkhtmltopdf->addPage('https://example.com')
->setPageSize('A4')
->setOrientation('Portrait')
->setGrayscale(true)
->setZoom(0.75)
->generate('output.pdf');
bash
composer