Unplanned
Last Updated: 12 May 2021 15:56 by Bernie
Created by: Bernie
Comments: 10
Category: Barcode
Type: Bug Report
1

I think the radbarcode control is generating the wrong barcode. Here is my code;


            RadBarcode theControl = new RadBarcode();
            BarcodeType theType = BarcodeType.PDF417;
            theControl.Type = theType;
            theControl.PDF417Settings.AspectRatio = 10;
            theControl.PDF417Settings.ErrorCorrectionLevel = 0;
            theControl.PDF417Settings.EncodingMode = Telerik.Web.UI.Barcode.PDF417ClassLibrary.EncodingMode.Text;
            theControl.Text = clsJobBarcode.CreateNewJobString(theClass.Job, theClass.Release, theClass.Lot);
            System.Drawing.Image theImage = theControl.GetImage();
            theImage.Save(thePath + "barcode.png", System.Drawing.Imaging.ImageFormat.Png);

The file barcode.png is the output of this code. The input into the barcode is:

theLot
"20338B"
theRelease
"R320"
theJob
"A2552013"
theControl.Text
"A2552013|R343|21102A"

from a breakpoint in my code at the theImage = theControl.GetImage();

I'm reading the barcode with a Zerbra TC-20 mobile computer with a barcode reader. It says the barcode contains "A2552013|DED|21102A".

First off can you guys authenticate the attached barcode does have DED rather than R320?

If so, any ideas what I'm doing wrong?

Thanks,

Bernie

 

Unplanned
Last Updated: 20 Mar 2019 16:36 by ADMIN

Can be observed in the Barcode - Barcode Types online demo.

Barcode Type: Code128

Required Value: IEรถ6014649

Resulted Value: IE996014649



Unplanned
Last Updated: 08 May 2020 17:43 by ADMIN
 

Using an ampersand character in RadBarcode's Text leads to a server-side error. Replacing the symbol with its corresponding HTML entity allows the control to render its text successfully, but the generated image corresponds to the passed entity character.

If RadBarcode1.Text="&" the control generates this (read as "&"):
https://www.screencast.com/t/NuOVjB8EY

while it should be this (read as "&"):
https://www.screencast.com/t/vOhWkUoW

Workaround:

When we generate the image by keeping ShowText = True, then it throws the exception.

When we generate the image by keeping ShowText = false, then it successfully generates the image.

Steps to reproduce:Run the following setup:

ASPX:
        <telerik:RadBarcode ID="RadBarcode1" runat="server" RenderChecksum="false"></telerik:RadBarcode>
CS:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadBarcode1.OutputType = Telerik.Web.UI.BarcodeOutputType.SVG_VML;
        RadBarcode1.Type = Telerik.Web.UI.BarcodeType.Code128;
        RadBarcode1.Text = "string&string"; //leads to server-side error
        //RadBarcode1.Text = "string&amp;string"; //leads to wrongly generated barcode

        RadBarcode1.LineWidth = 0;
        RadBarcode1.ShowText = true;
        RadBarcode1.ShowChecksum = false;
        RadBarcode1.GetImage();
    }

Unplanned
Last Updated: 08 Jun 2018 19:59 by ADMIN
WORKAROUNDS:
- set OutputType to SVG_VML
- set ShowChecksum to false

Sample problematic setups:   

<telerik:RadBarcode runat="server" ID="RadBarCode2" Text="238.339.6814" Type="Code93Extended" OutputType="EmbeddedPNG" ShowChecksum="true"></telerik:RadBarcode>

<telerik:RadBarcode runat="server" ID="RadBarCode1" Text="238.339.6814" Type="Code93" OutputType="EmbeddedPNG" ShowChecksum="true"></telerik:RadBarcode>