carl-gq / convert-html
the package of gsdata
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/carl-gq/convert-html
Requires
- php: >=5.6
- h4cc/wkhtmltoimage-amd64: 0.12.x
- h4cc/wkhtmltopdf-amd64: 0.12.x
This package is auto-updated.
Last update: 2025-09-25 21:28:37 UTC
README
安装, 暂时是dev版, composer安装时需要在最后加上:dev-master
composer require carl-gq/convert-html:dev-master
使用
$model = new \CarlGq\ConvertOffice\HtmlConvert();
转换word(doc格式)
$model->toWord($html, $path);
转换pdf
$model->toPdf($html,$path);
$html
内容是html内容
$path
是转换的文件保存位置
转换pdf需要赋予APP_PATH/vender/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
执行权限