Welcome to MYWEB SOLUTIONS

barcode-test

Written by Super User. Posted in Uncategorised

{source}
<!-- You can place html anywhere within the source tags -->


<script language="javascript" type="text/javascript">
    // You can place JavaScript like this
    
</script>
<?php
//header('Content-Type: image/png');
   require_once 'Image/Barcode2.php';
   /* Data that will be encoded in the bar code */
   
$img= "Pendrive 16GB";
$im = $img;
$type='code128';
$newFileName = $img.".png";
 
 
  // $showText = false;
 
   /* The third parameter can accept any from the following,
    * jpg, png and gif.
    */

$bc= new Image_Barcode2();
 // $img = $barcode->draw($bar_code_data, 'code128', 'png',true,40,1,$showText);
imagepng($bc->draw($im, 'code128', 'png', false), $newFileName);
//$bc->draw($im, 'code128', 'png', true);

//return $img;
//imagepng($im,'barcode.png');
imagedestroy($im);

// We're done
echo '<img src=$newFileName />';
?>
{/source}