Nov 2, 2015 at 3:12 PM
Edited Nov 4, 2015 at 11:34 AM
I created a SSRS Report which contains a few Code128 Barcodes. The Barcodes are generated using the latest zxing.net library. I would like to include tabs (char(9)) in an Code128 Barcode. But it fail with the following exception message:
System.ArgumentException: Bad character in input:
Needless to say that it works like a charm without the tabulator character.
The GetBarCodeHorizontal is used in the report to generate the barcodes. However, for testing purpose i wrapped it into a visual studio vb project:
Public Function GetBarCodeHorizontal(ByVal s As String, ByVal width As Integer) As Byte()
Dim writer As New ZXing.BarcodeWriter()
Dim ms As System.IO.MemoryStream = New System.IO.MemoryStream()
writer.Format = ZXing.BarcodeFormat.CODE_128
writer.Options = New ZXing.Common.EncodingOptions
writer.Options.Width = width
writer.Options.Height = 60
writer.Options.PureBarcode = False
Dim bmp As System.Drawing.Bitmap = writer.Write(s)
Dim imagedata As Byte()
imagedata = ms.GetBuffer()
Private Sub MainWindow_OnLoaded(sender As Object, e As RoutedEventArgs)
Dim barCodeHorizontal = GetBarCodeHorizontal("3999999 80 1XXXXXX8 r1XX3", 200)
Catch ex As Exception
- How can i solve this problem?
- Is this a limitation of the zxing library?
- Is there any suitable workaround (or maybe even another library)?
Thank you for your help.