tohidhabiby / htmltoimage
使用wkhtmltoimage从HTML生成图像
1.0.0
2019-07-04 18:38 UTC
Requires
- php: ^7.1.3
Requires (Dev)
- mockery/mockery: ^1.2
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-09-05 06:47:26 UTC
README
此软件包使用wkhtmltoimage软件,因此您应在服务器上安装此软件。
安装
您可以通过composer安装此软件包
composer require tohidhabiby/htmltoimage
用法
使用此代码并设置变量,然后您将在您的路径中获得一个图像。
use Tohidhabiby\HtmlToImage\HtmlToImage; $htmlToImage = new HtmlToImage(); $htmlToImage->url($url) ->path($path) ->cropHeight($height) // optonal Set height for cropping ->cropWidth($width) // optonal Set width for cropping ->coordinateX($x) // optonal Set x coordinate for cropping ->coordinateY($y) // optonal Set y coordinate for cropping ->generate();
变更日志
有关最近更改的更多信息,请参阅CHANGELOG。
贡献
有关详细信息,请参阅CONTRIBUTING。
鸣谢
许可
MIT许可(MIT)。有关更多信息,请参阅许可文件。
PHP软件包模板
此软件包是使用PHP软件包模板生成的。