rudissaar/yii2-fpdf

FPDF plugin and wrapper for Yii2 framework.

Installs: 16 183

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

v1.1.7 2018-01-16 13:23 UTC

This package is auto-updated.

Last update: 2024-11-17 10:03:45 UTC


README

FPDF plugin and wrapper for Yii2 framework.

Getting Started

FPDF

FPDF is copy of FPDF 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

<?php

...

use rudissaar\fpdf\FPDF;

...

$pdf = new FPDF();
$pdf->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

Basic usage

<?php

...

use rudissaar\fpdf\FPDFPlus;

...

$pdf = new FPDFPlus();
$pdf->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