With the code identified below, we can reliably create numerical and uppercase only QR codes. If we attempt to encode a mixed case or special character string, the QR code that is created becomes corrupted. In this example, the resulting QR code is attached and the code comes out as s:00H:AT000 instead of "ThisIsATest". What are we missing? We are using version 2.4.1.0, is an update in order? Let me know.
Sample code:
Dim ActiveBarCode As String = "ThisIsATest"
Dim stream1 As MemoryStream = New MemoryStream
Dim BarCodeLicense As Aspose.BarCode.License = New Aspose.BarCode.License()
BarCodeLicense.SetLicense("Aspose.BarCode.lic")
Dim BarCode As Aspose.BarCode.BarCodeBuilder
BarCode = New BarCodeBuilder()
BarCode.SymbologyType = Symbology.QR
BarCode.AspectRatio = 1
BarCode.BorderVisible = False
BarCode.xDimension = 1
BarCode.yDimension = 1
BarCode.Resolution = New Aspose.BarCode.Resolution(300, 300, ResolutionMode.Graphics)
BarCode.CodeLocation = CodeLocation.Below
BarCode.EnableChecksum = True
BarCode.Margins.Top = 0
BarCode.Margins.Right = 0
BarCode.Margins.Bottom = 0
BarCode.Margins.Left = 0
BarCode.ImageQuality = ImageQualityMode.Default
BarCode.PrinterName = "Example"
BarCode.QRErrorLevel = QRErrorLevel.LevelH
BarCode.CodeText = ActiveBarCode
BarCode.Save(stream1, System.Drawing.Imaging.ImageFormat.Gif)
BarCode.Dispose()
context.Response.Clear()
context.Response.Buffer = False
context.Response.BufferOutput = True
context.Response.ContentType = "image/gif"
stream1.Position = 0
Dim bytesRead As Integer = stream1.Read(imgBuffer, 0, 256)
While bytesRead > 0
context.Response.OutputStream.Write(imgBuffer, 0, bytesRead)
bytesRead = stream1.Read(imgBuffer, 0, 256)
End While
imgBuffer = Nothing
stream1.Dispose()