Bitweiser Posted January 7, 2010 Share Posted January 7, 2010 Hello, Ik trying to generate a PDF file with simple text. Some text has to be in bold. I'm using arial.ttf and arialdb.ttf for normal and bold characters. When I use the code below, my PDF-file is generated, al text is generated but no bold!! Why? ... pdf_set_parameter($pdf, "FontOutline", "Arial=http://127.0.0.1\\test\\font\\arial.ttf"); $font = pdf_findfont($pdf, "Arial", "host", 0); pdf_show_xy($pdf, "This is not bold text", 50, 720); pdf_set_parameter($pdf, "FontOutline", "ArialBD=http://127.0.0.1\\test\\font\\arialbd.ttf"); $font = pdf_findfont($pdf, "ArialBD", "host", 0); pdf_show_xy($pdf, "but this should be bold but is not", 50, 698); ... Can anyone help me out? TIA. Link to comment https://forums.phpfreaks.com/topic/187542-no-bold-in-pdf-generation/ Share on other sites More sharing options...
Bitweiser Posted January 7, 2010 Author Share Posted January 7, 2010 OK Found it... I simply forgot the "pdf_setfont($pdf, $newfont,10)" each time I changed font choice. This topic can be closed... Link to comment https://forums.phpfreaks.com/topic/187542-no-bold-in-pdf-generation/#findComment-990184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.