vixriihi / html2pdf
php wrapper to wkhtmltopdf
Installs: 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/vixriihi/html2pdf
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2026-01-18 00:25:17 UTC
README
This is a php wrapper for wkhtmltopdf.
Requirements
- php > 5.4.0
- wkhtmltopdf
Basic usage
use Vixriihi\Html2Pdf; $html = '<h1>Working</h1>'; $html2pdf = new Html2Pdf(); $pdf = $html2pdf->convert($html); header("Content-type: application/octet-stream"); header("Content-disposition: attachment;filename=hmtl.pdf"); echo $pdf;
All options for wkhtmltopdf are accessible with method setParameter
$html2pdf = new Html2Pdf(); $html2pdf->setParam('page-size','A3'); $html2pdf->setParam('dpi',96);