Skip to content

PDF View for Kohana 3 (as Shadowhand's pdf-view)

Notifications You must be signed in to change notification settings

vitch/kohana-mpdf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mPDF View

Extension for Kohana's View class that renders as a PDF instead of HTML. Uses MPDF to render normal HTML views as PDF Files.

Installation

If your application is a Git repository:

git submodule add git://github.com/smgladkovskiy/kohana-mpdf.git modules/mpdf
git submodule update --init --recursive

Or clone the the module separately:

cd modules
git clone git://github.com/smgladkovskiy/kohana-mpdf.git mpdf

Update mPDF

cd modules/mpdf
git submodule update --init

Configuration

Edit application/bootstrap.php and add a the module:

Kohana::modules(array(
    ...
    'mpdf' => 'modules/mpdf',
    ...
));

Usage

Placed in a controller action:

// Load a view using the PDF extension
$pdf = View_MPDF::factory('pdf/example');

// Use the PDF as the request response
$this->response->body($pdf);

About

PDF View for Kohana 3 (as Shadowhand's pdf-view)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%