I'm trying to make my text underlined in FPDF
but it seems to be impossible... I'm not using HTML. I'm using an DejaVu
unicode font, which supports UTF-8, and also its my first time working with the FPDF.
Is that even possible? Please give me some solutions.
The setUnderline() function is an inbuilt function in PHP | Spreadsheet_Excel_Writer which is used to set the underline of the text. Parameters: This function accepts single parameter $underline.
php'); class PDF extends FPDF { function WordWrap(&$text, $maxwidth) { $text = trim($text); if ($text==='') return 0; $space = $this->GetStringWidth(' '); $lines = explode("\n", $text); $text = ''; $count = 0; foreach ($lines as $line) { $words = preg_split('/ +/', $line); $width = 0; foreach ($words as $word) { $ ...
Try this :
$fpdf->SetFont('Dejavu','U'); //Where "U" means underline.
See also (in german) http://www.fpdf.de/funktionsreferenz/?funktion=SetFont
See also (in english) http://www.fpdf.org/en/doc/setfont.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With