Download the PHP package milanzor/cakephp-wkhtmltopdf without Composer
On this page you can find all versions of the php package milanzor/cakephp-wkhtmltopdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download milanzor/cakephp-wkhtmltopdf
More information about milanzor/cakephp-wkhtmltopdf
Files in milanzor/cakephp-wkhtmltopdf
Download milanzor/cakephp-wkhtmltopdf
More information about milanzor/cakephp-wkhtmltopdf
Files in milanzor/cakephp-wkhtmltopdf
Vendor milanzor
Package cakephp-wkhtmltopdf
Short Description CakePHP 2.x View and Component for WkHtmlToPdf
License MIT
Package cakephp-wkhtmltopdf
Short Description CakePHP 2.x View and Component for WkHtmlToPdf
License MIT
Please rate this library. Is it a good library?
Informations about the package cakephp-wkhtmltopdf
WkHtmlToPdf in CakePHP 2
Provides a View and a Component for generating PDF's through view's in Cake 2. Uses WkHtmlToPdf.
Currently only supports WkHtmlToPdf AMD64!
How to use
composer require milanzor/cakephp-wkhtmltopdf
- Load the plugin in Cake
- Enable parsing of extension
pdf
in your routes:Router::parseExtensions('pdf');
- Enable the RequestHandler to handle
.pdf
requests using the following snippet in your(App)Controller
:
Now when you call a page, e.g. http://yoursite.local/invoices/view.pdf, the RequestHandler will offhand the request to this plugin's PdfView. Resulting in your view + layout files to be rendering into a PDF.
Available options
In your Controller methods, you can set the following viewVars:
- To force a file download:
$this->set('_download', 'filename-without-.pdf-extension');
- To stream the pdf to the browser:
$this->set('_stream', true);
- Save the file:
$this->set('_save', '/full/path/to/file.pdf');
- Additional WkHtmlToPdf options can be passed to the WkHtmlToPdf PHP instance using:
$this->set('WkHtmlToPdf_options', []);
For these options, see https://github.com/mikehaertl/phpwkhtmltopdf
Questions?
Feel free to make an issue or PR!
All versions of cakephp-wkhtmltopdf with dependencies
PHP Build Version
Package Version
Requires
cakephp/cakephp Version
2.*
mikehaertl/phpwkhtmltopdf Version ^2.3
h4cc/wkhtmltopdf-amd64 Version ^0.12.4
mikehaertl/phpwkhtmltopdf Version ^2.3
h4cc/wkhtmltopdf-amd64 Version ^0.12.4
The package milanzor/cakephp-wkhtmltopdf contains the following files
Loading the files please wait ....