Expand description
fpdf Copyright (C) 2025 Maik Steiger
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
A PDF document generator with high level support for text, drawing and images.
This crate is inspired by its founding PHP library: https://www.fpdf.org/
The implementation is heavily inspired by GoFPDF: https://codeberg.org/go-pdf/fpdf/
Structs§
- Annotation
Attachment - Annotated attachment.
- Attachment
- Attachment.
- BString
- CMYK
Color Name - Date
Time - Font
Desc - Font descriptor specifies metrics and other attributes of a font, as distinct from the metrics of individual glyphs (as defined in the pdf specification).
- Fpdf
- Fpdf is the principal structure for creating a single PDF document.
- FpdfTTF
- FpdfTpl
- A concrete implementation of the Template trait.
- Grid
- HTML
Basic - HTML
Link - Image
Info - Stores size, color and other information about an image.
- Image
Options - Stores image options for parsing.
- Link
- Margin
- Offset
- PageBox
- RGB
- Describe an RGB color.
- SVGBasic
- Aggregates the information needed to describe a multi-segment basic vector image.
- SVGBasic
Segment - Template
Size - Tpl
- Tpl is shadowing Fpdf and it is used for writing a template. It has most of the facilities of a Fpdf, but cannot add more pages. Tpl is used directly only during the limited time a template is writeable.
- Transform
Matrix - Vec2
- Container for two floating-point values with double-point precision.
Enums§
- Blend
- Select a blend mode.
- Color
Space - Color space of an image object.
- Fpdf
Error - Any FPDF error that can happen during runtime execution.
- Image
Type - Layout
- Describe the layout of a PDF page.
- Month
- Orientation
- Orientation state of a PDF page.
- Page
Size - Specify the page size.
- Unit
- Define a unit of measurement that translates to a PDF page.
- Unit
Selector - Unit
Vec2 - Vec2 with unit type annotation attached.
- Zoom
Mode - Zoom mode for displaying content on a PDF page.
Constants§
Traits§
- Font
Loader - Is used to read fonts (JSON font specification and zlib compressed font binaries) from arbitrary locations (e.g. files, zip files).
- Defines the trait used for various methods. It is implemented by the Fpdf struct, as well as templates.
- Template
- Templates are object, that can be written to, then used and re-used any number of times within a document.