Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.354 kb
<?php
require_once __DIR__ . '/../vendor/autoload.php';
$tempDir = __DIR__;
$document = new Wkhtmltopdf\Document($tempDir);
$html = <<<HTML
<html>
<head>
<title>Lorem ipsum</title>
</head>
<body>
<h1>Lorem ipsum</h1>
<p>dolor sit amet, consectetur adipiscing elit.</p>
</body>
HTML;
$document->addHtml($html);
$document->save(__FILE__ . '.pdf');
Jump to Line
Something went wrong with that request. Please try again.