Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (12 sloc) 0.375 kB
<?php
require_once __DIR__ . '/../vendor/autoload.php';
$tempDir = __DIR__;
$document = new Kdyby\Wkhtmltopdf\Document($tempDir);
$document->header->center = '[date]';
$document->footer->right = 'Page: [page]';
$html = <<<HTML
<h1>Lorem ipsum</h1>
<p>dolor sit amet, consectetur adipiscing elit.</p>
HTML;
$document->addHtml($html);
$document->save(__FILE__ . '.pdf');
Jump to Line
Something went wrong with that request. Please try again.