digicomp / flowwkhtmltopdfadapter
Using pdf/snappy for a nice integration of wkhtmltopdf as ViewInterface
Installs: 852
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:neos-package
Requires
- php: >=7.4
- knplabs/knp-snappy: ^1.0.0
- neos/flow: ^7.3.0 | ^8.2
- symfony/process: ^4.0.0 | ^5.0.0 | ^6.0.0
Requires (Dev)
- phpunit/phpunit: ~8.5
README
This package provides a PdfView
for your ActionController
.
Introduction
The PdfView
connects up to three Fluid templates:
header-html
(optional): The defaultPath is@templateRoot/@subpackage/@controller/@action.PDFHead.html
body-html
(required): The defaultPath is@templateRoot/@subpackage/@controller/@action.PDFBody.html
footer-html
(optional): The defaultPath is@templateRoot/@subpackage/@controller/@action.PDFFoot.html
header-html
and footer-html
will only be used if found.
Additionally, you may set ALL options Knp\Snappy
(an abstraction of wkthmltopdf) understands in your Views.yaml
to
configure your PdfView
:
- requestFilter: "isFormat('pdf')" viewObjectName: "DigiComp\\FlowWkhtmlToPdfAdapter\\View\\PdfView" options: marginLeft: "0mm" marginRight: "0mm" marginTop: "0mm" marginBottom: "0mm"
If you have to use wkhtmltopdf with unpatched Qt you could activate the usage of Xvfb, but really: I would not recommend that. ;)