indigophp / pdf
This package is abandoned and no longer maintained.
No replacement package was suggested.
PDF adapter for PDF libraries
dev-develop
2014-02-25 12:47 UTC
Requires
- php: >=5.3.0
- symfony/options-resolver: ~2.4.0
- symfony/process: ~2.4.0
Requires (Dev)
- h4cc/wkhtmltopdf-amd64: dev-master
- tecnick.com/tcpdf: dev-master
Suggests
- h4cc/wkhtmltopdf-amd64: Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.
- tecnick.com/tcpdf: TCPDF is a PHP class for generating PDF documents
This package is not auto-updated.
Last update: 2022-02-01 12:29:10 UTC
README
PDF adapters for PDF libraries.
Supported libraries:
- WkHTMLtoPDF (native)
- TCPDF
Install
Via Composer
{ "require": { "indigophp/pdf": "dev-master" } }
Usage
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()
Library documentation
- WkHTMLtoPDF (This is the best I found)
- TCPDF
Testing
$ phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.