2. Who Am I?
Software Developer from
Baltimore, Maryland
Works for Planit
Advertising
Writing iOS Apps since 2008
Hockey Player
Pokémaster
3. About FPDF
• First released in 2001
• Written by Olivier Plathey
• Completely free to use
• Open Sourced
• Requires no extensions*
• zlib is required to activate compression
• GD is required for GIF support
4. Where To Get It
• www.fpdf.org/
• Download (ZIP / TAR)
• Tutorials
• Documentation
• User Forum
5. Abilities
• Automatic page breaks
• Automatic line breaks
• Text justification
• Color management
• Links
• Image support
• Page set up customization
• Set document meta data
• Title
• Author
• Keywords
• Supports many languages
6. Output
• Can output finished PDF to
• Browser: $pdf->Output(‘invoice.php’, ‘I’);
• Forced Download: $pdf->Output(‘invoice.php’,
‘D’)
• Save to Server: $pdf->Output(‘pdfs/invoice.php’,
‘F’)
7. Common API Methods
• FPDF
• Constructor method
• FPDF([string orientation [, string unit [. mixed
size]]])
• Cell
• Cell(float w [, float h [, string txt [, mixed border [,
int ln [, string align [, boolean fill [, mixed link]]]]]]]
8. More Common API Methods
• Multiline Cell
• MultiCell(float w, float h, string txt[, mixed border
[, string align [, boolean fill]]])
• Image
• Image(string file[, float x [, float y [, float w [, float
h [, string type [, mixed link]]]]]])
9. Even More Common API Methods
• Line Break
• Ln([float h])
• Set Font
• SetFont(string family [, string style [, float size]])
• Set XY
• SetXY(float x, float y)