$font = pdf_findfont($pdf, "Arial", "winansi", 1); if ($font) { echo 'ok'; } else { echo 'smth bad..'; }