pdfable Create PDFs from web pages with PHPWkHtmlToPdf

PDFable

  1. Documentation
  2. Requirements
  3. Example
  4. Changelog

PDFable is a Yii extension to create PDFs from web pages with PHPWkHtmlToPdf.

Documentation

For the documentation please have a look at the project page on github.

Requirements

PHPWkHtmlToPdf depends on wkhtmltopdf. So make sure, you have a wkhtmltopdf binary installed on your system.

This extension was developed on Yii 1.1.x. But it should work on other versions, too.

Example

Here's just a quick example:

<?php
class DemoController extends Controller                                                                                      
{                                                                                                                            
    public function behaviors()                                                                                              
    {                                                                                                                        
        return array(                                                                                                        
            'pdfable'=>array(                                                                                                
                'class' => 'ext.pdfable.Pdfable',                                                                            
            ),                                                                                                               
        );                                                                                                                   
    }

    public function actionPdfDemo()                                                                                          
    {                                                                                                                        
        // Render this view as PDF and display inline in the browser:                                                        
        $this->renderPdf('pdfDemo');                                                                                         
    }
}

Changelog

1.0.1
1.0.0
  • Initial release
14 0
27 followers
1 794 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Tags: behavior, PDF
Developed by: Mike
Created on: Nov 16, 2012
Last updated: 5 years ago

Downloads

show all

Related Extensions