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.
Installs: 3 931
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.0
- phpunit/phpunit: ^11.0
- dev-main
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0.0
- 1.9.0.9
- 1.9.0.8
- 1.9.0.7
- 1.9.0.6
- 1.9.0.5
- 1.9.0.4
- 1.9.0.3
- 1.9.0.2
- 1.9.0.1
- 1.9.0.0
- 1.8.4.16
- 1.8.4.15
- 1.8.4.14
- 1.8.4.13
- 1.8.4.12
- 1.8.4.11
- 1.8.4.10
- 1.8.4.9
- 1.8.4.8
- 1.8.4.7
- 1.8.4.6
- 1.8.4.5
- 1.8.4.4
- 1.8.4.3
- 1.8.4.2
- 1.8.4.1
- 1.8.4
- 1.8.4-alpha-6
- 1.8.4-alpha-5
- 1.8.4-alpha-4
- 1.8.4-alpha-3
- 1.8.4-alpha-2
- 1.8.4-alpha
This package is auto-updated.
Last update: 2025-03-23 20:14:22 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 generating 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
If you're using Composer to manage dependencies, you can use:
composer require laurentmuller/fpdf2
Alternatively, you can add the requirement "laurentmuller/fpdf2":"^3.0"
to
your composer.json
file and run composer update
. This could be useful when
the installation of FPDF2 is not compatible with some currently installed
dependencies. Anyway, the previous option is the preferred way, since the
composer can pick the best requirement constraint for you.
Basic Usage
use fpdf\Enums\PdfFontName; use fpdf\Enums\PdfFontStyle; use fpdf\PdfDocument; $pdf = new PdfDocument(); $pdf->addPage(); $pdf->setFont(PdfFontName::ARIAL, PdfFontStyle::BOLD, 16); $pdf->cell(40, 10, 'Hello World!'); $pdf->output();
See other examples in the dedicated documents.