row-bloom/browsershot-renderer
最新稳定版本:v0.2.0
Composer 安装命令:
composer require row-bloom/browsershot-renderer
包简介
Table rows to pdf cards
关键字:
README 文档
README
Important
This is a sub-split, for development, pull requests and issues, visit: https://github.com/row-bloom/row-bloom
Installation
composer require row-bloom/browsershot-renderer
use RowBloom\RowBloom\Support; use RowBloom\BrowsershotRenderer\BrowsershotRenderer; app()->get(Support::class); ->registerInterpolatorDriver(BrowsershotRenderer::NAME, BrowsershotRenderer::class)
Requires:
Depends on Chrome binary and NodeJs Puppeteer library.
- PHP >= 8.1
spatie/browsershot dependencies:
- ext-exif
- ext-fileinfo
- ext-json
- ext-mbstring
Usage
use RowBloom\BrowsershotRenderer\BrowsershotRenderer; use RowBloom\RowBloom\Interpolators\PhpInterpolator; use RowBloom\RowBloom\RowBloom; app()->get(RowBloom::class) ->addTable([ ['title' => 'Title1', 'body' => 'body1'], ['title' => 'Title2', 'body' => 'body2'], ]) ->setInterpolator(PhpInterpolator::class) ->setTemplate(' <h1><?= $title ?></h1> <p>Bold text</p> <div><?= $body ?></div> ') ->setRenderer(BrowsershotRenderer::class) ->save(__DIR__.'/foo.pdf');
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-26