vixriihi/html2pdf
Composer 安装命令:
composer require vixriihi/html2pdf
包简介
php wrapper to wkhtmltopdf
README 文档
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);
统计信息
- 总下载量: 127
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-27