indigophp / fuel-pdf
Fuel PDF package for dfferent PDF libraries
Installs: 47
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:fuel-package
Requires
- composer/installers: ~1.0
- indigophp/pdf: dev-master
This package is not auto-updated.
Last update: 2022-02-01 12:28:23 UTC
README
Fuel wrapper for Indigo PDF
Install
Via Composer
{ "require": { "indigophp/fuel-pdf": "dev-master" } }
Configuration
return array( 'instances' => array( 'default' => function () { $options = array( 'orientation' => 'P', ); $config = array( 'a_meta_charset' => 'UTF-8', 'a_meta_dir' => 'ltr', 'a_meta_language' => 'en', 'w_page' => 'page', ); return new Indigo\Pdf\Adapter\TcpdfAdapter($options, $config); }, 'advanced' => function () { $options = array( 'orientation' => 'P', ); $config = array( 'bin' => '/usr/bin/wkhtmltopdf', 'tmp' => sys_get_temp_dir(), ); return new Indigo\Pdf\Adapter\WkhtmltopdfAdapter($options, $config); } ), 'default' => 'default', );
Usage
$pdf = \Pdf::forge('default'); // Later in your code $pdf = \Pdf::instance('default');
Advanced usage
$options = array( 'orientation' => 'P', ); $config = array( 'bin' => '/usr/bin/wkhtmltopdf', 'tmp' => sys_get_temp_dir(), ); $instance = Indigo\Pdf\Adapter\Wkhtmltopdf($options, $default); $pdf = \Pdf::forge('non_existent', $instance); // Later in your code $pdf = \Pdf::instance('non_existent');
Credits
License
The MIT License (MIT). Please see License File for more information.