Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

indigophp-archive/pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indigo PDF

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

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

PDF adapter for PDF libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages