RadBarcodeQR - Does it support additional languages?

2 Answers 73 Views
BarCode
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Ohad asked on 21 Dec 2021, 03:09 PM

Hi,

Is there a way I can insert text in Hebrew and scan it?

Because by default I see that it only supports English.

Thanks.

Ivan Petrov
Telerik team
commented on 22 Dec 2021, 04:56 PM

Hello Ohad,

I was not able to read a QR code that contained Hebrew text. I will do some more research as both Unicode and Ascii contain Hebrew characters. I'll come back to you when I have more info.

2 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 05 Jan 2022, 04:25 PM

Hello Ohad,

Thank you for your patience with this.

I was able to dig into our QR code's source code and found that it requires a specific setup to be able to encode Hebrew. The settings in question are the CodeMode set to Byte and the ECIMode set to Unicode. Here is my test code:

<telerik:RadBarcode x:Name="barcode" Value="משלך באמצעות מחולל קוד">
    <telerik:RadBarcode.Symbology>
        <telerik:QRCode SizingMode="Snap" CodeMode="Byte" ECIMode="UTF8" />
    </telerik:RadBarcode.Symbology>
</telerik:RadBarcode>

If there is anything else I can help you with, feel free to write back.

Regards,
Ivan Petrov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 09 Jan 2022, 03:40 PM | edited

 

Thank you.

With RadBarcodeQR I was able to display it with its Text bounded to an empty string.

But with the RadBarcode when its value is bounded to an empty string it is not displayed.

Is it possible to display the RadBarcode even though it is bound to an empty string?

Ivan Petrov
Telerik team
commented on 11 Jan 2022, 01:39 PM

RadBarcode specifically checks whether the assigned value is null or empty string and clears its visual elements in this case. You can use a single space to generate an "empty" barcode.
0
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
answered on 27 Jan 2022, 08:24 AM

Is there a way to create RadBarCode through the Code behind without displaying it in the UI

and giving it Symbology like you gave here in the example above and printing it?

 

Thanks,

Ivan Petrov
Telerik team
commented on 01 Feb 2022, 11:13 AM

The current RadBarcode implementation does not provide means to create an image out of a barcode set up in memory. Could share some details on the scenario you are trying to achieve? 
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 01 Feb 2022, 01:35 PM

Yes,

for example, I want to show the user a BarCode in size 10x10 and white but when I want to print it I want to print when it has a

white background and the barcode itself is black and its size is 50x50

Ivan Petrov
Telerik team
commented on 04 Feb 2022, 01:00 PM

After some experimenting, I found a somewhat hacky solution. It consists of creating an off-screen window with a barcode on it and then exporting this barcode to a file.

Here is what it looks like in code:

RadBarcode bc = new RadBarcode()
{
	Value = "Example text",
	Width = 400,
	Height = 400,
	Symbology = new QRCode()
	{
		SizingMode = SizingMode.Stretch,
		CodeMode = CodeMode.Byte,
		ECIMode = ECIMode.UTF8
	}
};

Window w = new Window()
{
	WindowStartupLocation = WindowStartupLocation.Manual,
	Content = bc
};

w.Top = -w.Height;
w.Show();

string extension = "png";

SaveFileDialog dialog = new SaveFileDialog()
{
	DefaultExt = extension,
	FileName = "QRBarCode",
	Filter = "Png (*.png)|*.png"
};

if (dialog.ShowDialog() == true)
{
	using (Stream stream = dialog.OpenFile())
	{
		Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(bc, stream, new PngBitmapEncoder());
	}
}

w.Close();

If you have any questions, do not hesitate to write back.

Tags
BarCode
Asked by
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Ivan Petrov
Telerik team
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Share this question
or