php - How to set different Fonts in TCPDF -


i looking solution set more 1 font pdf document created tcpdf.

i want this:

$pdf->setfont('verdana_bold', 'b', 12); $pdf->setfont('verdana', '', 12); 

i need document bold font , regular font. example above doesn't work. when switch 2 lines text bold. when use example above text regular.

i want set font-weight regular css stylesheets.

hope have solution.

you can use custom fonts inside html this:

$fontname=$pdf->addttffont('path/myfont.ttf', '', '', 32); //echo $fontname;  $html='<span style="font-family:'.$fontname'.;font-weight:bold">my text in bold</span>: normal text'; $pdf->writehtmlcell($w=0,$h=0,$x=11,$y=201,$html,$border=0,$ln=0,$fill=false,$reseth=true,$align='l',$autopadding=false); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -