PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I set and change the font in FPDF?


To do this is really easy, you simply use the SetFont() function.

Of course, if you wish to use one of the non-core list of fonts, then you will need to install it first. Look in the font directory to see what the default fonts are.

Note that if you go to use Arial it will automatically use Helvetica.

So to set the font to arial for instance you use this:

$pdf->SetFont('Arial','B',12);

... which makes it bold and 12 point.

ASK A QUESTION

More FPDF PHP Questions

How can I find out more about FPDF?

What is FPDF?

How do I output text to a PDF with FPDF?

How do I add a new font to my PDF with FPDF?

How do I add a line break to my PDF in FPDF?



Custom Search