Hi,
I've used the following code to create a QR code:
I've used the following code to create a QR code:
Aspose.BarCode.BarCodeBuilder barcode = new Aspose.BarCode.BarCodeBuilder();
MemoryStream stream = new MemoryStream();
// set property value
UTF8Encoding enc = new UTF8Encoding();
byte[] bytes = enc.GetBytes(definition.Value);
// set property value
UTF8Encoding enc = new UTF8Encoding();
byte[] bytes = enc.GetBytes(definition.Value);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
stringBuilder.Append((char)bytes[i]);
}
barcode.CodeText = stringBuilder.ToString();
for (int i = 0; i < bytes.Length; i++)
{
stringBuilder.Append((char)bytes[i]);
}
barcode.CodeText = stringBuilder.ToString();
// set encoder mode to binary and pass value encoded in order to allow umlauts, special characters etc.
barcode.QREncodeMode = Aspose.BarCode.QREncodeMode.Binary;
barcode.QREncodeMode = Aspose.BarCode.QREncodeMode.Binary;
In the current release of Aspose.Barcode this doesn't work anymore. The Enum value "Binary" of QREncodeMode seems to be removed.
'Aspose.BarCode.QREncodeMode' does not contain a definition for 'Binary'.
How to replace the code above in the right way? I needed the Binary mode for getting umlauts and special characters properly to the QR code.