Printed barcode with Barcode39 library does not receive scanned

I am using Barcode39 Library in codeigniter to generate barcodes.

Below is the helper function I am using to generate the barcode.

function generatebarcode12($Qty,$OrderId,$OrderItemId,$ServiceCatId){
    $ci =& get_instance();
    $ci->load->library('Barcode39');


    $ci->load->helper('upload_function');

    $configArr = array(
            'thickness' => 30,
            'resolution' => 1,
            'fontsize' => 2,
            'a1' => 'A',
            'a2' => '',
            'code' => 'code39'
    );

    $ci->load->library('barcode/barcodeclass',$configArr);

    $UploadDirConfig = uploadDirctoryConfig('barcode',$OrderId);

    makeDirectory($UploadDirConfig['main_dir_full_path']);
    makeDirectory($UploadDirConfig['sub_dir_barcode']);
    makeDirectory($UploadDirConfig['sub_child_dir_full_path']);
    $uploadpath = $UploadDirConfig['sub_child_dir_full_path'];

    for ($i=0;$i<$Qty;$i++){
        $barcode = generate_barcode_no($OrderId, $OrderItemId, $ServiceCatId, $Qty);
        $chkunique = checkbarcode_unique($barcode);
        while(!$chkunique){
            $barcode    = generate_barcode_no($OrderId, $OrderItemId, $ServiceCatId, $Qty);
            $chkunique  = checkbarcode_unique($barcode);
        }

        if($barcode){
            $filename = $barcode.'.gif';

            $bc = new Barcode39($barcode);
            // set text size
            $bc->barcode_text_size = 1;
            // set barcode bar thickness (thick bars)
            $bc->barcode_bar_thick = 2;
            // set barcode bar thickness (thin bars)
            $bc->barcode_bar_thin = 1;
            $bc->barcode_height = 50;

            if(file_exists($uploadpath.$filename)){
                $output = true;
                $output = $bc->draw($uploadpath.$filename);//Generate barcode with method2
                //$output = $ci->barcodeclass->generate($barcode,$filename,$uploadpath);//Generate barcode with method1
            }else{
                $output = $bc->draw($uploadpath.$filename);//Generate barcode with method2
                //$output = $ci->barcodeclass->generate($barcode,$filename,$uploadpath);//Generate barcode with method1
            }

            if($output){


                $data = array();
                $data['OrderId']        = $OrderId;
                $data['OrderItemId']    = $OrderItemId;
                $data['Code']           = $barcode;
                $data['ImageName']      = $filename;
                $data['Status']         = 'InProgress';
                $data['CreatedAt']      = get_curr_datetime();
                $data['CreatedBy']      = get_login_user_id();
                grid_add_data($data,TBL_BARCODE);
            }
        }
    }

    return $UploadDirConfig;
}

      

I rotate the generated barcode image 90 degrees using below css code:

#rotate90deg {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

      

I am using TSC TTP-244 Plus for barcode printing and Motorola scanner for barcode scanning.

The main problem is that out of 12 barcodes, only 2 to 3 barcodes are scanned.

Please help me with this.

@Swinders: It is not actually possible to send you an image of a barcode that has not been scanned, but I am attaching a sample barcode that we print to scan.

enter image description here

Hope this helps you!

+3


source to share


1 answer


When you rotate the generated barcode image 90 degrees, you must check if the code is being printed correctly.

I see that sometimes line code (like Code39) when printed on a label will be slightly squashed in places, possibly due to the media not being fed freely. If the thickness of the rods is too thin, the material feeding may be more critical.



Typically printed linear (1D) codes appear to be more reliable when printed onto a label.

0


source







All Articles