View Full Version : Wrapping text using imagettftext

07-08-2005, 12:52 AM
I have this long blob of text that I'm passing in to display as png, but of course the text doesn't wrap and so it's cut off. Is there a way to fix it?

I tried imagettfbbox and imagecreatefromstring, but I can't seem to specify the font file to use or choose the text color. Any ideas?

07-08-2005, 03:20 PM
There are a few ideas in the user comments for imagestring(), here (http://uk.php.net/manual/en/function.imagestring.php), such as creating the text as an image first then resizing it and adding it to your original image, or wrapping the text to fit the image.