Indigo PDF
PDF adapters for PDF libraries., (*1)
Supported libraries:
* WkHTMLtoPDF (native)
* TCPDF, (*2)
Install
Via Composer, (*3)
``` json
{
"require": {
"indigophp/pdf": "dev-master"
}
}, (*4)
## Usage
``` php
use Indigo\Pdf\Adapter\TcpdfAdapter as Pdf;
// Setup config array
$options = array(
'orientation' => 'P',
'size' => 'A4'
);
// Instantiate adapter
$pdf = new Pdf($options);
// Add a page
$pdf->addPage('test.html', array('orientation' => 'L'));
// Save it to file
$pdf->save('test.pdf');
// Output to the browser
$pdf->output('test.pdf');
Note: This is only a basic interface. If you need advanced usage, get the library itself and use that: $pdf->getInstance()
, (*5)
Library documentation
Testing
bash
$ phpunit
, (*6)
Contributing
Please see CONTRIBUTING for details., (*7)
Credits
License
The MIT License (MIT). Please see License File for more information., (*8)