PHPackages                             pcrt/yii2-latex - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. pcrt/yii2-latex

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

pcrt/yii2-latex
===============

Alternative Gii generator for Yii2 framework

1.0.21(6y ago)1297BSD-3-ClausePHPPHP &gt;=5.6.0

Since Jan 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/pcrt/yii2-latex)[ Packagist](https://packagist.org/packages/pcrt/yii2-latex)[ RSS](/packages/pcrt-yii2-latex/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (12)Used By (0)

Yii2-Latex
==========

[](#yii2-latex)

Latex2PDF formatter for Yii2 .

This extension "format" Latex responses to PDF files (by default Yii2 includes HTML, JSON and XML formatters). Great for reports in PDF format using Latex views/layouts.

\##Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require pcrt/yii2-latex "*"

```

or add

```
"pcrt/yii2-pdf": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, modify your application configuration to include:

```
return [
	'components' => [
		...
		'response' => [
			'formatters' => [
				'pdf' => [
					'class' => 'pcrt\latex\Latex2PdfResponseFormatter',
					'latexbin' => '/usr/local/bin/pdflatex',
					'buildpath' => '/folder/you/prefer' // for default use current folder
					'keepfile' => false // if true not clean debug file ( debug purpose only )
 				],
			]
		],
		...
	],
];
```

For default the buildpath variable is set on your @webroot folder .

In the controller:

```
class MyController extends Controller {
	public function actionPdf(){
		Yii::$app->response->format = 'latex';
		$this->layout = '//print'; // A siple template without any html code
		return $this->render('myview', []);
	}
}
```

License
-------

[](#license)

Yii2-Latex is released under the BSD-3 License. See the bundled `LICENSE.md` for details.

Useful URLs
===========

[](#useful-urls)

- [Latex Manual](https://www.latex-project.org/)

Enjoy!

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 68% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

11

Last Release

2450d ago

Major Versions

0.9.7 → 1.0.72019-03-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f6ad6343f484e9e2ee1c530ec7c4067ad974f540cff580dce786b8953f3fdd1?d=identicon)[protocolli](/maintainers/protocolli)

---

Top Contributors

[![fr00ller](https://avatars.githubusercontent.com/u/722758?v=4)](https://github.com/fr00ller "fr00ller (17 commits)")[![pcrt](https://avatars.githubusercontent.com/u/44270932?v=4)](https://github.com/pcrt "pcrt (8 commits)")

---

Tags

reportyii2latex

### Embed Badge

![Health badge](/badges/pcrt-yii2-latex/health.svg)

```
[![Health](https://phpackages.com/badges/pcrt-yii2-latex/health.svg)](https://phpackages.com/packages/pcrt-yii2-latex)
```

###  Alternatives

[ruskid/yii2-csv-importer

Helper to import csv files into database

37356.4k4](/packages/ruskid-yii2-csv-importer)[arogachev/yii2-excel

ActiveRecord import and export based on PHPExcel for Yii 2 framework

6480.3k1](/packages/arogachev-yii2-excel)[custom-it/yii2-excel-report

An extension for generate excel file from GridView content

381.9k](/packages/custom-it-yii2-excel-report)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
