steinbauerit / neos-headlesschrome
此包最新版本(0.0.1)没有可用的许可信息。
Neos Flow 包,用于使用无头 Chrome 打印为 PDF。
0.0.1
2023-08-06 17:09 UTC
Requires
- neos/flow: ^7.0 || ^8.0 || ^8.1 || ^8.2 || ^8.3
This package is not auto-updated.
Last update: 2024-09-16 20:36:48 UTC
README
注意:此包处于开发中!
安装
只需运行
composer require steinbauerit/neos-headlesschrome
在您的机器上安装 chromium
例如,在 alpine linux 上
apk update
apk upgrade
apk add chromium
确定您的 Chrome 安装的二进制文件位置
which chromium-browser
配置
SteinbauerIT: Neos: HeadlessChrome: chromeExecutable: '/usr/bin/chromium-browser' defaultAttributes: - 'disable-gpu' - 'no-margins' - 'no-sandbox'
使用方法
use SteinbauerIT\Neos\HeadlessChrome\Print2Pdf; $print2Pdf = new Print2Pdf(); $print2Pdf->setSource($source); $print2Pdf->setTargetDirectory($targetPath); $print2Pdf->setAttributes( ['foo', 'bar'] ); $result = $print2Pdf->execute(); // Path to the printed PDF
作者
- 公司:STEINBAUER IT GmbH
- 电子邮件:patric.eckhart@steinbauer-it.com
- 网址:http://www.steinbauer-it.com