TCPDF is an open-source PHP library used for generating PDF documents. One of the useful features of the TCPDF library is the ability to change the header font of a PDF document.
The setHeaderFont method in TCPDF is used to set the font for the PDF header. It takes one argument, which is the name of the font to be used.
Here are some code examples showing how to use the setHeaderFont method in TCPDF:
Example 1:
// Set the header font to Arial $pdf->setHeaderFont(Array('Arial', '', 14));
In this example, we are setting the header font to Arial with a font size of 14 points.
Example 2:
// Set the header font to Times New Roman Bold $pdf->setHeaderFont(Array('times', 'B', 12));
In this example, we are setting the header font to Times New Roman Bold with a font size of 12 points.
These examples use TCPDF PHP package library.
PHP TCPDF::setHeaderFont - 30 examples found. These are the top rated real world PHP examples of TCPDF::setHeaderFont extracted from open source projects. You can rate examples to help us improve the quality of examples.