I have seen some examples of wrapping text with PHP and GD to generate image with specified width. But how can I make it to fit with a specified height also, I mean if I have very long text, the script will try to write as much text as possible with wrapping within an image of specified dimension (such as 300x300px)?
Share
I found this piece of code by sk89q, and judging by comments on his blog, it should work on 5.3 :
http://www.sk89q.com/2008/08/ttf-textbox-in-php/
full code source here :
http://www.sk89q.com/pastebin/php/imagettftextboxopt.phps
hope this helps !