Converting HTML to X since 2017
Switch branches/tags
Nothing to show
Clone or download


Build Status Build status

This extension wraps libwkhtmltox for PHP 7.


Documentation can be found in the PHP Manual

Hello World (PDF)

use wkhtmltox\PDF\Converter as PDFConverter;
use wkhtmltox\PDF\Object as PDFObject;

$converter = new PDFConverter([
	"out" => "test.pdf"

$converter->add(new PDFObject(


Hello World (Image)

use wkhtmltox\Image\Converter as ImageConverter;

$converter = new ImageConverter(null, [
	"fmt" => "png",
	"in" => "",
	"out" => "test.png"



  • Warnings from libwkhtmltox raise ZE warnings
  • Errors from libwkhtmltox raise ZE exceptions (RuntimeException)
  • Settings are accessible read only as properties or dimensions after construction
  • It is not possible to change settings after object construction
  • Validation of the possible values for settings is not good