Unplanned
Last Updated: 27 Jan 2025 07:23 by ADMIN
Martin Ivanov
Created on: 12 Dec 2024 13:40
Category: Barcode
Type: Bug Report
1
Barcode: Difference in the minimum size where the barcode cannot be read anymore between the new and old barcode implementations

This was reported in the Code11 and Code39 symbologies.

In the old RadBarcode39 and RadBarcode11 controls the minimum width where the barcode cannot be read any longer is around 180px in the specific scenario. 

In the new RadBarcode and its Code11 and Code39 symbologies, the minimum width is different - around 270px. This reproduces when the SizingMode of the symbology is set to Stretch.

To work this around, you can set the SizingMode of the symbology to Snap. Or alternatively, you can use a bigger Width value for the barcode control, and then apply a ScaleTransform to resize it to the smaller size.

private void RadBarcode_Loaded(object sender, RoutedEventArgs e)
{
    var barcode = (RadBarcode)sender;
    var desiredWidth = 250;
    double relativeWidthDelta = desiredWidth / barcode.ActualWidth;
    barcode.LayoutTransform = new ScaleTransform() { ScaleX = relativeWidthDelta };
}

5 comments
ADMIN
Martin Ivanov
Posted on: 27 Jan 2025 07:23

Hello Gabriel,

Thank you for the detailed explanation. We are going to review it again once we start working on a fix.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Gabriel
Posted on: 21 Jan 2025 10:32
Sorry, in my last comment, the barcode on the right—rendered with the 'Snap' SizingMode—could not be read because RenderCheckSum was set to false (whereas it was set to true for the barcodes on the left).
Gabriel
Posted on: 21 Jan 2025 09:37

Hello Martin,

The requirement of “around 270” pixels, which varies by barcode type, isn’t very clear. If a barcode can’t be scanned successfully (even when zoomed in), there’s no real reason to render it at all because it is useless.

Previously, we used the old RadBarCode in “Stretch” mode with a fixed minimum width of 140px for different barcode types without any issues. Our goal is to place a barcode on a design measuring roughly 330×220 pixels, which corresponds to an ISO/IEC RFID 7810 card at 96 dpi—then print it at higher resolutions. Unfortunately, a 270px minimum won’t even fit in portrait orientation.

Using “Snap” alters the size of existing barcodes, and there’s still a minimum width requirement that depends on the barcode type and value. For instance, with “abcABC0123456789” in Code 128, the barcode won’t render below 155px, even though the old version could still read it at 140px.

Finally, even using Snap, the barcode still can't be read...

Example with the attached image, where barcodes on the left are generated with the old components and can be read easily, and barcode on the right are generated with the new RadBarCode and can't be read...

Attached Files:
ADMIN
Martin Ivanov
Posted on: 20 Jan 2025 20:02

Hello Gabriel,

Can you tell me what exactly means very unclear conditions? I mean, how small you would expect the barcode image to be? Or do you have something elese in mind? This information might be helpful when a fix is tailored.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Gabriel
Posted on: 20 Jan 2025 10:36
It's a major bug that will prevent the barcode from being read under very unclear conditions...