What do I need to do in PHP so that the imagepstext () and imagepsloadfont () functions work?
I am creating a catalog for a collection of fonts and a large part of it are Post Script. I found these functions (imagepsloadfont e imagepstext), however, already test on several servers (bitnami, UsbWebserver, Apache2triad, etc). I also tested directly on my hosting server (Host Gator) and always gives error:
Fatal error: Call to undefined function imagepsloadfont () in /home/eiboc860/public_html/post_script/manual.php on line 6 Fatal error: Call to undefined function imagepstext () in /home/eiboc860/public_html/post_script/manual.php on line 7
<?php $im = imagecreatetruecolor(350, 45); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 0, 0, 349, 44, $white); $font = imagepsloadfont("12 Sabon Bold 07232.pfb"); // or locate your .pfb files on your machine imagepstext($im, "Testing... It worked!", $font, 32, $white, $black, 32, 32); imagepsfreefont($font); header("Content-type: image/png"); imagepng($im); imagedestroy($im); ?>
I've tried with all 5.x versions. Would anyone know to tell me if there is any feature to install for the functions to work or some other method for printing with Post Script fonts in image?