An open API service indexing awesome lists of open source software.

https://github.com/rudissaar/yii2-fpdf

FPDF plugin and wrapper for Yii2 framework.
https://github.com/rudissaar/yii2-fpdf

composer-package fpdf packagist pdf-generation yii2-extension yii2-fpdf yii2-framework

Last synced: 3 months ago
JSON representation

FPDF plugin and wrapper for Yii2 framework.

Awesome Lists containing this project

README

        

# yii2-fpdf

FPDF plugin and wrapper for Yii2 framework.

## Getting Started

### FPDF

`FPDF` is copy of [FPDF](http://www.fpdf.org/) class and it has all methods and properties like original one.
To include FPDF class add following line to your PHP file:

`use rudissaar\fpdf\FPDF;`

After that you can use FPDF class anywhere in your file or inherit another class from it.

#### Basic usage
```
AddPage();
$pdf->SetFont('Arial', 'B', 15);
$pdf->Cell(40, 10, 'Hello World');
$pdf->Output('F', '/tmp/hello.pdf');

...
```
### FPDFPlus (enchanted class)

This package comes with extra methods that can be very useful for you.

View source: [FPDFPlus](https://github.com/rudissaar/yii2-fpdf/blob/master/FPDFPlus.php)

#### Basic usage
```
AddPage();
$pdf->SetFont('Arial', 'B', 15);
$pdf->WriteLnEncoded(10, 'Apple: £10');
$pdf->Output('F', '/tmp/price.pdf');

...
```

## Reference Manual

http://www.fpdf.org/en/doc/index.php