Page 1 of 1

Help needed with text on image

Posted: Fri Mar 13, 2015 10:22 am
by marypainter
First of all, I have zero knowledge of Php. I know html and can embed php codes in my pages but cannot tweak php scripts beyond a certain level.I want to make a free invitations website in which user can personalise the image by adding their own text to it. I looked for free scripts and found this great tutorial. http://papermashup.com/php-gd-generate- ... embedding/ . Now what I need more is that the user should be able to add more than three lines and if a line contains more than 10 words then paragraph should be formed on the image.

The example text that a user will be adding would be something like

You’re invited to a
Baby Shower
in honor of
XYZ and ZYX
Saturday – May 3 – 2p-4p
At This Place and this address
and some more text and more text

Please guide me how can I do that?

Re: Help needed with text on image

Posted: Fri Mar 13, 2015 1:18 pm
by requinix
Can you post an example of what you'd like? I understand the idea, it's just that the general-purpose solution is a bit complicated while there are easier ways of doing specific things. I'm thinking about issues like whether the text fills the image, or whether you want centering, or whether you may need to use word-wrapping.

Also take a look around the internet. Many people have wanted to do this kind of thing before so I'm sure there's information out there on the subject that may be useful.

Of note is ImageMagick. Has a number of commands that do things that are close to, or will be a part of, what you need.