Results 1 to 2 of 2

Thread: gd library - text

  1. #1
    Join Date
    Mar 2007
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default gd library - text

    hi.. my problem is that i hv a form in which der are text fields like recipient name senders name and msg which are to be entered by user. after submitting this form, he text entered has to be printed to an image of a gift cert. i hv to do this using gd library. i could do it partly but am not able to align the text or give line breaks etc. can someone pls help.
    its really really urgent..
    thanks in advance..suk
    ps-- i hv attached the cert how it should look after inserting the text..
    my code
    PHP Code:
    <?php
    header
    ("Content-type: image/gif");
    $string "This certificate entitles" ;
    /*$string.=$_POST['r_name'];
    $string.  "Message from";
    $string.=$_POST['y-mail'];
    $string.$_POST['msg'];*/
    $im     imagecreatefromgif("Images/sample-certificate.gif");
    $orange imagecolorallocate($im22021060);
    $px     = (imagesx($im) - 7.5 strlen($string)) / 2;
    imagestring($im3$px9$string$orange);
    imagegif($im);
    imagedestroy($im);
    ?>

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    sry i don't noe wat u r talkin about. pls use english not "net spk". ty.

    (Sorry, I don't know what you are talking about. Please use English not "internet talk". Thanks.)
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •