This project has moved and is read-only. For the latest updates, please go here.

advanced barcode manipulation on thermal printers for industrial

Jan 27, 2016 at 10:12 AM
Edited Jan 28, 2016 at 1:02 PM
I need to print different barcodes with different symbologies on industrial printers .
Until now I used the native printer languages ( Zebra , Intermec , sato , datamax , cab , thoshiba etc ).
With so many different printers i'm considering gdi printing mode.
Now, since the industrial printers have poor resolution 203 or 300 dpi, i need to manipulate the minimum size of the bar code 128 .
the output image will be black and white 1 bit.
Also I can not use the FNC1 character to become cod128 EAN128; zxing return invalid character error and i don't found in manual any method or function.
For example I can not print a ( 01 ) 80345678901234 ( 10 ) 1122334 ( 3103 ) 012345
Ean 128 barcode.
Any idea ?

[Edit]
Fnc1 now work whit chr(241)
This is the code
Dim grPage As Graphics

' Label width 10cm (800 pixel)
' Label lenght 11cm (870 pixel)
imgBitmap = New Bitmap(800, 880)     
imgBitmap.SetResolution(203.0F, 203.0F) 'printer native resolution
        
grPage = Graphics.FromImage(imgBitmap)
grPage.PageUnit = GraphicsUnit.Pixel
grPage.PixelOffsetMode = PixelOffsetMode.None
grPage.SmoothingMode = Drawing2D.SmoothingMode.None
grPage.TextRenderingHint = Text.TextRenderingHint.SingleBitPerPixel
        
Dim BW As New ZXing.BarcodeWriter()
' Ean 128 Example
' Ai 10 = 223466
' Ai 3103 = 010120 
Dim text As String = Chr(241) & "10223466" & Chr(241) & "3103010120"
Dim imgBar As Image
BW.Format = BarcodeFormat.CODE_128
BW.Options.PureBarcode = True
BW.Options.Height = 40
BW.Options.Width = 0 ' minimum value . __I wonder how do you set the minimum size of the bar.__
BW.Options.Margin = 0

imgBar = BW.Write(text)
grPage.DrawImageUnscaled(imgBar, 10, 10)
And this image explain the problem
Image