Jump to content

No bold in PDF generation


Bitweiser

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.