|
Posted by Chris F.A. Johnson on 07/25/07 08:48
On 2007-07-25, Pennywise@DerryMaine.Gov wrote:
> "Chris F.A. Johnson" <cfajohnson@gmail.com> wrote:
>
>>On 2007-07-25, grantroelofs@gmail.com wrote:
>>> I have web course on a website that I would like to generate a
>>> certificate for when completed. I would like the certificate to be
>>> presented to the user as a single graphic. This means getting the
>>> persons name and date into the graphic. I don't want HTML text
>>> overlaying a background image. I would also like the option for the
>>> user to upload an image which could also be put into the certificate.
>>> I want the user to be able to download this image, the big reason I
>>> want it all in a single graphic. Can someone offer me some advice on
>>> how to make these images automatically. I do want the quality to look
>>> as professional as possible.
>
>> That can be done with ImageMagick.
>
> instead it can modify an already existing image
> http://en.wikipedia.org/wiki/ImageMagick
>
> He would need something that could generate images (persons name and
> such) as layers, then flatten the image.
With ImageMagick, a command like this could be used to put the
text "John Doe" onto the image xx.png:
convert -font "-*-helvetica-bold-r-normal--*-240-*-*-*-*-*-*" \
-fill black -draw "text 160,100 'John Doe'" \
xx.png xxx.png
Unfortunately, convert requires an X server, so it cannot be used
in a CGI (or is there a way?).
Another possibility is to write a PostScript file (see
<http://woodbine-gerrard.com/testing/xx.cgi>); ideally it should be
converted to PDF, but that, too, requires X.
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
[Back to original message]
|