Skip to content

ahmadhelmy/yii2-tcpdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 TCPDF

Yii2 TCPDF to load TCPDF libraries in a Yii2 site

CHANGELOG

  • 0.3 - Added example
  • 0.2 - Loaded tcpdf_6_0_075
  • 0.1 - Initial Releases

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require ahmadhelmy/yii2-tcpdf "dev-master"

or add

"ahmadhelmy/yii2-tcpdf": "dev-master"

to the require section of your composer.json file.

CONFIGURATION

  • Add in your configuration file, in component section:
    'component' => [ 
    ...
    		// Yii2 TCPDF
    		'tcpdf' => [
    			'class' => 'ahmadhelmy\tcpdf\TCPDF',
    		],
    		...
    ]
  • Add in your SiteController the action:
    public function actionTcpdf()
        {
    		return $this->render('tcpdf');
    	}
  • Add in your view/site folder the file tcpdf.php from example folder
  • Now you can view the example at the links:
    • Simple URL: index.php?r=site/tcpdf
    • Pretty URL: site/tcpdf
## Insert TCPDF in your extension
  • Load Component Yii2 TCPDF
    \Yii::$app->get('tcpdf');
  • Insert here your TCPDF Code
    ...
  • Close Yii2
    \Yii::$app->end();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages