Esempio n. 1
0
 private Image GenerateBarcode(string text)
 {
     try
     {
         using (MemoryStream mStream = new MemoryStream())
         {
             BarcodeSymbology _symbology = BarcodeSymbology.Code128;
             Image            image      = BarcodeDrawFactory.GetSymbology(_symbology).Draw(text, maxBarHeight: 70);
             image.Save(mStream, ImageFormat.Jpeg);
             return(image);
         }
     }
     catch (Exception exception)
     {
         return(null);
     }
 }
Esempio n. 2
0
 public Barcode(BarcodeSymbology symbology, SizeF size) : this(symbology, size, BarcodeOrientation.Horizontal)
 {
 }
Esempio n. 3
0
 public Barcode(BarcodeSymbology symbology) : this(symbology, SizeF.Empty, BarcodeOrientation.Horizontal)
 {
 }