FPDF Creator & Producer
Understanding PDF metadata that shows FPDF as the Creator or Producer — learn how this lightweight free PHP class generates PDF documents programmatically without external dependencies.
📄 About This PDF Metadata
When you examine a PDF file's properties and see FPDF [version] as the Producer, it indicates that the document was generated using FPDF — a free PHP class that creates PDF files programmatically. The Producer field automatically shows "FPDF" followed by the version number.
Sample PDF Metadata from FPDF:
Title: Invoice #12345
Author: Acme Corporation
Creator: Invoice Generator v2.0
Producer: FPDF 1.86
Creation Date: 2025-01-27 10:30:00
PDF Version: 1.3
By default, FPDF sets the Producer field to "FPDF [version]" automatically. The Creator field can be customized using SetCreator() to show your application name. All other metadata fields (Title, Author, Subject, Keywords) are set using dedicated methods.
PDF Creator
Set with SetCreator() — shows the application that generated the PDF (e.g., "Invoice System", "Report Generator").
PDF Producer
Automatically set to FPDF [version] — identifies the underlying library that produced the PDF file.
📚 What is FPDF?
FPDF (Free PDF) is a PHP class that allows you to generate PDF files with pure PHP code, without using any external libraries like PDFlib. Created by Olivier Plathey, FPDF was first released in October 2001 and has become one of the most widely used PHP PDF libraries. The "F" in FPDF stands for "Free" — you can use it for any purpose and modify it freely.
Library Information
| Author: | Olivier Plathey |
| First Released: | October 2001 (v1.0) |
| Current Version: | 1.86 (June 2023) |
| Website: | fpdf.org |
| Language: | PHP |
Technical Details
| License: | Permissive (Free for any use) |
| Dependencies: | None (pure PHP) |
| PHP Version: | PHP 5.1+ |
| PDF Version: | 1.3 (default) |
| Composer: | setasign/fpdf |
Key Features:
Completely Free
No license fees, use for any purpose including commercial
No Dependencies
Pure PHP — no external libraries or extensions required
Lightweight
Single class file, minimal footprint, fast execution
FPDF Core Capabilities:
- Page format and margins (A4, Letter, custom)
- Header and footer management
- Automatic page breaks and line breaks
- Text alignment and justification
- JPEG and PNG image support
- TrueType, Type1, and encoding support
- Colors (draw, fill, text)
- Links (internal and external)
- Page compression (zlib)
- Document properties (metadata)
⚙️ How FPDF Creates PDFs
FPDF generates PDF files by building the PDF structure directly in memory using PHP code:
PDF Generation Workflow:
Create Instance
new FPDF()
Add Content
Pages, text, images
Set Metadata
Title, Author, etc.
Output PDF
File, browser, string
Basic Example:
<?php
require('fpdf.php');
$pdf = new FPDF();
$pdf->SetTitle('My Document');
$pdf->SetAuthor('John Doe');
$pdf->SetCreator('My Application');
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 10, 'Hello World!');
$pdf->Output('F', 'document.pdf');
?>
🔀 FPDF Derivatives & Extensions
FPDF's simplicity has inspired numerous derivative libraries that extend its functionality:
TCPDF
Feature-rich library based on FPDF with Unicode, HTML/CSS support, barcodes, QR codes, and digital signatures.
Most comprehensivemPDF
HTML to PDF converter based on FPDF and HTML2FPDF. Excellent CSS support and UTF-8/multilingual handling.
Best for HTML conversiontFPDF
Unicode/UTF-8 extension for FPDF. Adds TrueType font support with Unicode encoding.
Unicode supportFPDI
Extension by Setasign to import existing PDFs as templates. Works with FPDF, TCPDF, and tFPDF.
PDF import/templates💡 Choosing the Right Library
FPDF: Simple PDFs, lightweight, no dependencies • TCPDF: Complex documents, Unicode, barcodes • mPDF: HTML/CSS to PDF conversion • tFPDF: FPDF + Unicode fonts
📤 How to Use FPDF
FPDF is easy to install and use in any PHP project:
Installation:
# Using Composer (recommended)
composer require setasign/fpdf
# Or download manually from fpdf.org
# and include the fpdf.php file in your project
Creating a PDF with Custom Metadata:
<?php
require('vendor/autoload.php'); // Composer
$pdf = new FPDF('P', 'mm', 'A4');
// Set document metadata
$pdf->SetTitle('Invoice #12345');
$pdf->SetAuthor('Acme Corporation');
$pdf->SetCreator('Acme Invoice System v2.0');
$pdf->SetSubject('Monthly Invoice');
$pdf->SetKeywords('invoice, billing, payment');
// Add content
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(0, 10, 'Invoice #12345', 0, 1, 'C');
// Output options
$pdf->Output('I', 'invoice.pdf'); // Browser inline
$pdf->Output('D', 'invoice.pdf'); // Force download
$pdf->Output('F', 'invoice.pdf'); // Save to file
$pdf->Output('S'); // Return as string
?>
Common Methods:
| Method | Description |
|---|---|
AddPage() | Add a new page to the document |
SetFont() | Set font family, style, and size |
Cell() | Print a cell (text box) |
MultiCell() | Print text with automatic line breaks |
Image() | Insert JPEG or PNG image |
Line() | Draw a line |
Rect() | Draw a rectangle |
Link() | Add internal or external link |
Output() | Output the PDF document |
🔍 Understanding PDF Metadata
FPDF provides methods to set all standard PDF metadata fields:
| Metadata Field | FPDF Method | Description | Default Value |
|---|---|---|---|
| Title | SetTitle(string, isUTF8) |
Document title | Empty |
| Author | SetAuthor(string, isUTF8) |
Document author | Empty |
| Subject | SetSubject(string, isUTF8) |
Document subject | Empty |
| Keywords | SetKeywords(string, isUTF8) |
Searchable keywords | Empty |
| Creator | SetCreator(string, isUTF8) |
Application that created the document | Empty |
| Producer | Automatic | Library that produced the PDF | FPDF [version] |
| Creation Date | Automatic | When the document was created | Current timestamp |
⚠️ UTF-8 Encoding Note
All metadata methods accept an optional isUTF8 parameter (default: false). Set to true if your strings are UTF-8 encoded: $pdf->SetTitle('日本語タイトル', true);
Sample Producer Values:
| FPDF Version | Producer Value |
|---|---|
| FPDF 1.86 | FPDF 1.86 |
| FPDF 1.85 | FPDF 1.85 |
| FPDF 1.84 | FPDF 1.84 |
| FPDF 1.83 | FPDF 1.83 |
| FPDF 1.7 | FPDF 1.7 |
Derivatives Show Different Producer Values:
| Library | Producer Value |
|---|---|
| TCPDF | TCPDF [version] |
| mPDF | mPDF [version] |
| tFPDF | tFPDF [version] or FPDF [version] |
| fpdf2 (Python) | py-pdf/fpdf2 [version] |
🛠️ Troubleshooting
Common issues when using FPDF:
PDF Shows Blank or Corrupt
Cause: Output sent before calling Output(), whitespace before <?php, or BOM characters in PHP files.
Solution: Ensure no output (including whitespace) is sent before Output(). Remove BOM from files. Check for echo/print statements before PDF output. Use ob_clean() if necessary.
Font Not Working
Cause: Custom fonts not properly installed, wrong font path, or missing font metrics file.
Solution: Use built-in fonts (Arial, Courier, Helvetica, Times, Symbol, ZapfDingbats) or generate font files using the makefont script. Set FPDF_FONTPATH constant if fonts are in a custom directory.
Special Characters Display Incorrectly
Cause: FPDF uses ISO-8859-1 (Latin1) encoding by default. UTF-8 or other encodings won't display correctly.
Solution: Convert text using iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $text) or use tFPDF/TCPDF for full Unicode support. For metadata, set the isUTF8 parameter to true.
Image Not Displaying
Cause: Wrong image path, unsupported format (only JPEG and PNG), or corrupted image file.
Solution: Use absolute paths or paths relative to the script. Verify the image exists and is a valid JPEG or PNG. For PNG, ensure GD extension is enabled. Check file permissions.
"FPDF error: Some data has already been output"
Cause: Something was sent to the browser before the PDF output.
Solution: Check for whitespace or HTML before <?php. Use ob_start() at the beginning of your script and ob_end_clean() before Output(). Remove any echo, print, or error messages.
❓ Frequently Asked Questions
When a PDF shows "FPDF [version]" as the Producer, it means the PDF was generated using FPDF, a free PHP class for PDF creation. The Producer field automatically shows the library name and version number (e.g., "FPDF 1.86"). This field cannot be easily changed as it's hardcoded in the library to identify the PDF generation engine.
Yes, FPDF is completely free. The "F" in FPDF stands for "Free" — you can use it for any purpose including personal, commercial, and educational projects. You can also modify it to suit your needs. There are no license fees, subscriptions, or restrictions on usage.
FPDF was first released in October 2001 (version 1.0) by Olivier Plathey. The library has been continuously maintained for over 20 years. Version 1.2 (November 2001) added the metadata methods (SetAuthor, SetCreator, SetKeywords, SetSubject, SetTitle). The current version is 1.86, released in June 2023.
FPDF has limited Unicode support. By default, it uses ISO-8859-1 (Latin1) encoding. For full UTF-8/Unicode support, you should use tFPDF (a Unicode-enabled fork of FPDF), TCPDF, or mPDF. These libraries provide native Unicode support including CJK (Chinese, Japanese, Korean), Arabic, Cyrillic, and other scripts.
FPDF requires PHP 5.1 or higher and works with all modern PHP versions including PHP 7.x and PHP 8.x. It requires the zlib extension for compression (optional but recommended) and GD extension for PNG image support. There are no other dependencies.
TCPDF is based on FPDF but includes many additional features: native Unicode/UTF-8 support, HTML/CSS rendering, barcodes and QR codes, digital signatures, PDF/A compliance, RTL language support, and more. Use FPDF for simple, lightweight PDFs. Use TCPDF for complex documents requiring advanced features.
No, FPDF cannot edit existing PDFs directly. However, you can use FPDI (a Setasign extension) together with FPDF to import existing PDF pages as templates, then add content on top of them. This allows you to fill forms, add watermarks, or overlay content on existing PDFs.
🛠️ Related Tools
PDF Metadata Viewer
Free tool to view PDF metadata including Creator, Producer, and version information.
View PDF Metadata →📝 Summary: FPDF PDF Metadata
- Author: Olivier Plathey
- First released: October 2001
- Producer shows FPDF [version]
- License: Free for any use
- Pure PHP — no dependencies
- Current version: 1.86 (June 2023)
- Metadata via Set*() methods
- Derivatives: TCPDF, mPDF, tFPDF
- Default encoding: ISO-8859-1
- Supports: JPEG, PNG images