xsuchy09 / nette-pdf-response
Nette PDF Response
v1.0.0
2020-10-05 07:28 UTC
Requires
- php: >= 7.1
- nette/application: ^3.0
- nette/http: ^3.0
This package is auto-updated.
Last update: 2024-12-05 16:17:17 UTC
README
PdfResponse for Nette.
Install
composer require xsuchy09/nette-pdf-response
Usage
class SomePresenter extends BasePresenter { public function actionDefault() { // $pdfCreator is yours pdf library $pdfCreator = new ... // which will return pdf as data here $data = $pdfCreator->getData(); $response = new \xsuchy09\Application\Responses\PdfResponse($data, 'download.pdf'); $this->sendResponse($response); } }