2 // imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text )
8 header('Content-type: image/jpeg');
10 // Create Image From Existing File -- going to have to make this a reqired size??? 2550x3300
11 $jpg_image = imagecreatefromjpeg('files/Green-Party-petition-1-page-001.jpg');
13 // Allocate A Color For The Text
14 $black = imagecolorallocate($jpg_image, 0, 0, 0);
16 // Set Path to Font File
17 $font_path = 'files/coolvetica rg.ttf';
18 $font_path_sig = 'files/Claston Script.ttf';
22 $SIGNED = date('Y-m-d');
24 if ( $_COOKIE['pCOUNTY'] == 'Baltimore City'){
26 imagettftext($jpg_image, 50, 0, 115, 365, $black, $font_path, 'X');
29 imagettftext($jpg_image, 50, 0, 220, 260, $black, $font_path, str_replace('County','',$_COOKIE['pCOUNTY']) );
33 imagettftext($jpg_image, 50, 0, 350, 1070, $black, $font_path, $_COOKIE['pNAME']);
36 imagettftext($jpg_image, 50, 0, 400, 1300, $black, $font_path, $_COOKIE['pADDRESS']);
39 imagettftext($jpg_image, 50, 0, 1900, 1070, $black, $font_path, date('m d Y',strtotime($DOB)));
42 imagettftext($jpg_image, 50, 0, 1900, 1200, $black, $font_path, date('m d Y',strtotime($SIGNED)));
46 imagettftext($jpg_image, 40, 0, 50, 3050, $black, $font_path, $_COOKIE['pNAME']);
48 imagettftext($jpg_image, 40, 0, 50, 3100, $black, $font_path, $_COOKIE['pADDRESS1']);
50 imagettftext($jpg_image, 40, 0, 50, 3120, $black, $font_path, $_COOKIE['pADDRESS2']);
52 imagettftext($jpg_image, 40, 0, 50, 3150, $black, $font_path, $_COOKIE['pPHONE']);
55 imagettftext($jpg_image, 40, 0, 2150, 3150, $black, $font_path, date('m / d / y',strtotime($SIGNED)));
58 // Send Image to Browser
59 imagejpeg($jpg_image);
62 imagedestroy($jpg_image);