+ All Categories
Home > Technology > Introduction to FPDF

Introduction to FPDF

Date post: 30-Jul-2015
Category:
Upload: jeremy-curcio
View: 182 times
Download: 1 times
Share this document with a friend
Popular Tags:
15
Introduction to FPDF Jeremy Curcio Open West - May 9, 2015
Transcript
Page 1: Introduction to FPDF

Introduction to FPDFJeremy Curcio

Open West - May 9, 2015

Page 2: Introduction to FPDF

Who Am I?

Software Developer from Baltimore, Maryland

Works for Planit Advertising

Writing iOS Apps since 2008

Hockey Player

Pokémaster

Page 3: Introduction to FPDF

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

Page 4: Introduction to FPDF

Where To Get It

• www.fpdf.org/

• Download (ZIP / TAR)

• Tutorials

• Documentation

• User Forum

Page 5: Introduction to FPDF

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

Page 6: Introduction to FPDF

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’)

Page 7: Introduction to FPDF

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]]]]]]]

Page 8: Introduction to FPDF

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]]]]]])

Page 9: Introduction to FPDF

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)

Page 10: Introduction to FPDF

Ready?

Lets Build Something!

Page 11: Introduction to FPDF

Other Capabilities

• Headers and Footers

• Links

• Color

• Add existing documents

Page 12: Introduction to FPDF

Extendability

• Many extensions to FPDF are available

• Bookmark support

• Barcodes

• Circles/Ellipses

• Watermark

• Plus many more

Page 13: Introduction to FPDF

Final Thoughts

• Easy to make

• Highly versatile

• Hugely customizable

Page 14: Introduction to FPDF

Questions?

Page 15: Introduction to FPDF

Resources

Code/Slides available at www.jcurcio.com

joind.in/14056


Recommended