Zend Framework 3 module for pdfapi.io service
Installation
pdfapi.io Zend Framework module can be installed with Composer. Run this command:, (*1)
composer require pdfapi/zf3-pdfapi-module
or add following line in your project composer.json:, (*2)
"require": {
"pdfapi/zf3-pdfapi-module": "^1.0"
},
Usage
Run command, (*3)
composer update
Add your module.config.php file following lines, (*4)
'pdfapi' => [
'apiKey' => 'API_KEY',
],
or copy pdfapi.global.php.dist to your config/autload directory and rename it pdfapi.global.php, (*5)
Add PdfApi module to your modules.config.php, (*6)
return [
'PdfApi',
'Application',
];
Use factories to get the pdfapi instance into controllers or services, (*7)
'controllers' => [
'factories' => [
Controller\IndexController::class => function ($cm) {
return new IndexController($cm->get(PdfApi::class));
},
],
],
Use it in the code like this: https://github.com/pdfapi/zf3-sample-app/blob/master/module/Application/src/Controller/IndexController.php, (*8)
For getting everything up and running quickly we have created sample skeleton app, where we use PdfApi module. Source code is located in this repository: https://github.com/pdfapi/zf3-sample-app, (*9)
For getting API KEY you need to register account at https://pdfapi.io. Generating API KEY will take you 10 seconds. And it is free. Really., (*10)