laurentmuller / fpdf2
FPDF 2 is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.
1.8.4.16
2024-04-27 07:42 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- phpunit/phpunit: ^10.0
- psalm/plugin-phpunit: ^0.18
- rector/rector: ^1.0
- vimeo/psalm: ^5.0
This package is auto-updated.
Last update: 2024-04-27 07:44:39 UTC
README
This repository is clone of fpdf.org with typed variables, enumerations and PHP 8.2 dependencies.
PdfDocument
is a PHP class, which allows to generate PDF files with pure PHP.
F from FPDF2 stands for Free: you may use it for any kind of usage and
modify it to suit your needs.
Installation with Composer
If you're using Composer to manage dependencies, you can use
composer require laurentmuller/fpdf2:^1.8
Or you can include the following in your composer.json
file:
{ "require": { "laurentmuller/fpdf2": "^1.8" } }
Usage:
$pdf = new PdfDocument(); $pdf->addPage(); $pdf->setFont(PdfFontName::ARIAL, PdfFontStyle::BOLD, 16); $pdf->cell(40, 10, 'Hello World!'); $pdf->output();
Tutorials: