I am able to embed fonts before, using the code below.
pdf_set_parameter($pdf, "FontOutline", "Times=$fontdir/times.ttf");
$font = pdf_findfont($pdf, "Times", "winansi", 1);
pdf_setfont($pdf,$font,$font_size);
$p->setfont( $font,$fontsize);
But it seems this is now deprecated in new PDFLib version. I am now trying the code below as shown in the cookbook.
$p->set_option("FontOutline=Times=".$fontdir."/times.ttf");
$times_font = $p->load_font("Times", "unicode","");
$p->setfont( $times_font,$fontsize);
I am getting this error message: PDFlibException: Option ‘FontOutline’ has odd number of values…
Please help.