RenderBarCode EAN13 vs Width

Posted by: ivan.stanojkovski on 20 February 2025, 11:38 am EST

  • Posted 20 February 2025, 11:38 am EST

    Hi

    I am working with the RenderBarCode control, specifically using the BarCodeEnum.EAN_13 type, and I would like to ask if it’s possible to dynamically adjust the barcode’s resolution when rendering. My goal is to display the EAN13 barcode within a smaller space than the default size, while maintaining high quality and sharpness.

    Here is an example of our current implementation:

    Dim barcode As New RenderBarCode(BarCodeEnum.EAN_13) With {
        .X = New Unit(766, UnitTypeEnum.Twip),
        .Y = New Unit(1588, UnitTypeEnum.Twip),
        .ShowText = True,
        .Text = "860601860500",
        .Height = 0.5,
        .Width = 0.5
    }
    C1PrintDocument1.Body.Children.Add(barcode)
    C1PrintPreviewControl1.Document = C1PrintDocument1

    In this setup, the barcode width and height are set to 0.5, but I am looking for a way to dynamically adjust the resolution so that the barcode fits within a smaller area without losing quality or data. Is there a way to achieve this?

    Thank you in advance for your assistance!

  • Posted 21 February 2025, 5:08 am EST

    Hi,

    We are currently discussing this requirement with our developers. [Internal Tracking ID: C1WIN-33712]

    We will update you on this as soon as we hear back from them.

    Thanks & regards,

    Aastha

  • Posted 6 March 2025, 1:42 pm EST

    Dear Aastha,

    Could you please provide any new information or let me know the current status?

    Thank you in advance.

  • Posted 6 March 2025, 11:29 pm EST

    Hi Ivan,

    Thanks for reaching out.

    This issue is still under discussion. We will update you on this as soon as we get any updates.

    Thanks & regards,

    Aastha

  • Posted 27 March 2025, 5:04 pm EST

    Dear Aastha

    I hope this message finds you well.

    I would like to kindly follow up on the status of the ongoing discussion regarding this topic. Could you please provide any insight into what is causing the delay in feedback from your developers? If there are any specific challenges or obstacles, I would greatly appreciate it if you could share that information.

    If a solution is still under evaluation, any updates on the progress would be much appreciated. We understand that such matters can take time, but any clarity on the situation would be very helpful, as we are keen to move forward with the implementation.

    Thank you for your continued support, and I look forward to hearing from you soon.

    Best regards,

  • Posted 28 March 2025, 7:20 am EST

    Hi Ivan,

    We are very sorry for all the inconvenience this may have caused you.

    Our developers researched on this issue and tried to implement your requirement, but they found out that barcodes must be a certain bar width, so the width is determined by the Barcode value. Therefore, it is not possible to scale down the barcode after a certain limit.

    We apologize for the inconvenience. Thanks for your understanding.

    Kind Regards,

    Aastha

  • Posted 12 May 2025, 8:02 am EST

    Aastha, thank you, but I have one additional question on this topic, as it is truly crucial for us to push this through to the end and find the best possible solution.

    If we cannot resolve this using RenderBarCode directly within C1PrintDocument, could you please provide an explanation and an example of how we can use C1BarCode to generate an image with sharp edges—so that it doesn’t appear blurry when added to the C1PrintDocument?

    We discussed this topic once before in the task linked here: https://developer.mescius.com/forums/winforms-edition/c1barcode-and-c1printdocument-not-playing-like-they-used-to.

    Looking forward to your response.

  • Posted 13 May 2025, 6:03 am EST

    Hello Ivan,

    Thanks for sharing the forum thread. Yes, you can use RenderImage to display a small barcode.

    We tested this method and didn’t find any issues. As for the barcode appearing blurry, we didn’t encounter any problems scanning it. Even at maximum zoom in C1PrintDocument, the image remained sufficiently clear. We believe this workaround is the most suitable approach to meet your requirement.

    Sample: PrintDoc_VB.zip

    Regards,

    Uttkarsh.

  • Posted 13 May 2025, 11:26 am EST

    Hello Uttkarsh,

    Thank you for your response and for providing the sample.

    I agree with you that scanning barcodes directly from the screen using a phone or scanner often works well. However, in our real-world scenarios, clients typically print the barcodes using laser or inkjet printers. In such cases, the quality of the toner or ink can sometimes be suboptimal, and the additional blurriness introduced by compression or rendering around the barcode lines becomes a significant issue—especially when scanning products directly from shelves.

    Because of this, I would like to better understand why C1PrintDocument applies compression to PNG images when they are attached. Why doesn’t it simply render the image as-is, without any additional processing? Is there a way to configure the component to retain the original image quality?

    Also, is it possible to increase the resolution or DPI settings used by C1PrintDocument so that the printed output is clearer?

    We need to find a reliable solution to this, and I really appreciate your support and understanding.

    Best regards,

    Ivan

  • Posted 14 May 2025, 1:54 am EST

    Hello Ivan,

    We have shared your concerns with the development team for their insights and will get back to you once we have more information.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels