Jump to content

matthewod

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by matthewod

  1. One more issue I am having with this project is my font is not setting to my $font_path. Maybe I'll double check my path to my font but any addition info would be helpful! Thanks
  2. I am working on setting up an on the fly business card generator and I am having some issues! For some reason I cannot center my text. Here is my code: $image_width = 600; $x_name = (($image_width - strlen($name))/2); $x_address = (($image_width - (strlen($address_line)))/2); $x_contact = (($image_width - strlen($contact_line))/2); imagettftext($jpg_image, 20, 0, 300, 220, $black, $font_path, $name); imagettftext($jpg_image, 16, 0, $x_address, 300, $white, $font_path, $address_line); imagettftext($jpg_image, 16, 0, $x_contact, 325, $white, $font_path, $contact_line); imagejpeg($jpg_image); Where X is the left margin. All my variables are working fine. But this what I am getting: http://www.fgbmfamerica.org/business-card-preview.php?first_name=First&last_name=Last&address=Address&city=Anywhere&state=TN&postal=55555&phone=555-555-3340&[email protected] I am not sure what I am doing wrong but any help would be appreciated! Thank you!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.