Created
October 18, 2016 17:56
-
-
Save webolizzer/30f78d5650048690b63a3787ac033788 to your computer and use it in GitHub Desktop.
simple PHP wrapper around wkhtmltopdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @version 0.1 | |
* @author github.com/webolizzer | |
* If you find it useful, you can buy me a coffee and a Kit-Kat @ paypal.me/webolizzer | |
* Thank you! :) | |
*/ | |
class pdfGenerator { | |
/** | |
* | |
* @version 0.1 | |
* @author github.com/webolizzer | |
* If you find it useful, you can buy me a coffee and a Kit-Kat @ paypal.me/webolizzer | |
* Thank you! :) | |
*/ | |
public function save($optinons) { | |
$file = $optinons['file']; | |
$path = $optinons['path']; | |
return exec("wkhtmltopdf $file $path"); | |
} | |
/** | |
* Test installation | |
* | |
* @version 0.1 | |
* @author github.com/webolizzer | |
*/ | |
public function test() { | |
return exec("wkhtmltopdf -V"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment