Aw: PDF Rechnung - Firmenadresse unterstrichen
Vielen Dank!
$pdf->SetFont('freesans','U',6);
Set the Font
On the configuration file (config/tcpdf_config.php) set the K_PATH_FONTS constant to the TCPDF fonts path.
On the fourth parameter of the TCPDF class constructor you have to specify if you are using Unicode fonts (true) or old fonts (false).
To set the font in your script you just need to call the SetFont() method. It is mandatory to call this method at least once before printing text or the resulting document would not be valid. The method can be called before the first page is created and the font is retained from page to page:SetFont(string family[,string style[,string size]])
•family : Family font. It can be either a font name or one of the standard families (case insensitive):◦Courier (fixed-width)
◦Helvetica or Arial (synonymous; sans serif)
◦Times (serif)
◦Symbol (symbolic)
◦ZapfDingbats (symbolic)
It is also possible to pass an empty string. In that case, the current family is retained.
•style : Font style. Possible values are (case insensitive):◦empty string: regular
◦B: bold
◦I: italic
◦U: underline
or any combination. The default value is regular.
•size : Font size in points. The default value is the current size. If no size has been specified since the beginning of the document, the value taken is 12.
•fontfile : The font definition file. By default, the name is built from the family and style, in lower case with no spaces.
•subset : If true embedd only a subset of the font (stores only the information related to the used characters); if false embedd full font; if 'default' uses the default value set using setFontSubsetting(). This option is valid only for TrueTypeUnicode fonts. If you want to enable users to change the document, set this parameter to false. If you subset the font, the person who receives your PDF would need to have your same font in order to make changes to your PDF. The file size of the PDF would also be smaller because you are embedding only part of a font.
Example:$pdf->SetFont('times', 'BI', 20, '', 'false');