Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Wkhtmltopdf integration with PHP

branch: master

Merge pull request #21 from bevanr/master

Custom command line options, documentation corrections and various code style improvements.
latest commit 475f186e30
aur1mas authored July 23, 2013
Octocat-spinner-32 .DS_Store file system files September 08, 2011
Octocat-spinner-32 .gitignore issue #6 September 28, 2011
Octocat-spinner-32 README issue #3 August 22, 2011
Octocat-spinner-32 Wkhtmltopdf.php Always use curly braces. July 16, 2013
README
About
-----
A PHP class which helps working with WKHTMLTOPDF <http://code.google.com/p/wkhtmltopdf/>

This class is based on <http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp>
class.

I have removed $_GLOBALS & other static configuration options.

Author
------
Aurimas Baubkus aka aur1mas <aur1mas@devnet.lt>
Released under "New BSD license"

Usage
-----
<?php
    try {
        $wkhtmltopdf = new Wkhtmltopdf(array('path' => APPLICATION_PATH . '/../public/uploads/'));
        $wkhtmltopdf->setTitle("Title");
        $wkhtmltopdf->setHtml("Content");
        $wkhtmltopdf->output(Wkhtmltopdf::MODE_DOWNLOAD, "file.pdf");
    } catch (Exception $e) {
        echo $e->getMessage();
    }
?>
On Gist: https://gist.github.com/733109

Feedback
--------
Issue tracker: https://github.com/aur1mas/Wkhtmltopdf/issues
Something went wrong with that request. Please try again.