From 0e0d5f79f6fad042af6b83534d2f57556d8345c4 Mon Sep 17 00:00:00 2001 From: Velz2020 Date: Sat, 2 Nov 2019 16:02:58 +0530 Subject: [PATCH] BACK END WATER MARK DISBALED --- api/application/controllers/PD_Controller.php | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/api/application/controllers/PD_Controller.php b/api/application/controllers/PD_Controller.php index 36071f77..f906a020 100644 --- a/api/application/controllers/PD_Controller.php +++ b/api/application/controllers/PD_Controller.php @@ -7077,34 +7077,34 @@ public function getCompaniesListsFromGeneralFormRawJSON_post() fwrite( $ifp, base64_decode( $temp_data[ 1 ] ) ); fclose( $ifp ); - // ################### start img water marking with text + // // ################### start img water marking with text - $imagetobewatermark = imagecreatefromstring(file_get_contents($output_file)); - $location_watermarktext="Location: ".$doc['link']; - $font = APPPATH."docs/robold.ttf"; //metion font and it's location - $fontsize="12"; - $x = imagesx($imagetobewatermark); - $y = imagesy($imagetobewatermark); + // $imagetobewatermark = imagecreatefromstring(file_get_contents($output_file)); + // $location_watermarktext="Location: ".$doc['link']; + // $font = APPPATH."docs/robold.ttf"; //metion font and it's location + // $fontsize="12"; + // $x = imagesx($imagetobewatermark); + // $y = imagesy($imagetobewatermark); - $water_mark_text_color = imagecolorallocate($imagetobewatermark, 225, 0, 0); - imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext); + // $water_mark_text_color = imagecolorallocate($imagetobewatermark, 225, 0, 0); + // imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 30), $water_mark_text_color, $font, $location_watermarktext); - imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a')); - imagejpeg($imagetobewatermark,$output_file,100);//save as png file in ouputfile location - //################# end img water marking with text + // imagettftext($imagetobewatermark, $fontsize, 0, 120, ($y - 10), $water_mark_text_color, $font, 'Date: '.date('Y-m-d h:i:s a')); + // imagejpeg($imagetobewatermark,$output_file,100);//save as png file in ouputfile location + // //################# end img water marking with text - //###########image water marking with logo - $pd_logo = imagecreatefromstring(file_get_contents(APPPATH.'docs/icon.png')); - $curret_file = imagecreatefromstring(file_get_contents($output_file)); - $sx = imagesx($curret_file); - $sy = imagesy($curret_file); - // imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool - imagecopyresampled ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); + // //###########image water marking with logo + // $pd_logo = imagecreatefromstring(file_get_contents(APPPATH.'docs/icon.png')); + // $curret_file = imagecreatefromstring(file_get_contents($output_file)); + // $sx = imagesx($curret_file); + // $sy = imagesy($curret_file); + // // imagecopyresized ( resource $dst_image , resource $src_image , int $dst_x , int $dst_y , int $src_x , int $src_y , int $dst_w , int $dst_h , int $src_w , int $src_h ) : bool + // imagecopyresampled ( $curret_file , $pd_logo ,5, ($sy - 54) , 0 , 0 , 50 , 50 , 50 , 54 ); - imagejpeg($curret_file,$output_file,100);// save png image in specified location - //###########end of image water marking with logo + // imagejpeg($curret_file,$output_file,100);// save png image in specified location + // //###########end of image water marking with logo $tempdoc = $output_file; $tempdocname = $temp_file_name;