Ejemplo 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);
     }
 }
Ejemplo n.º 2
0
 public Barcode(BarcodeSymbology symbology, SizeF size) : this(symbology, size, BarcodeOrientation.Horizontal)
 {
 }
Ejemplo n.º 3
0
 public Barcode(BarcodeSymbology symbology) : this(symbology, SizeF.Empty, BarcodeOrientation.Horizontal)
 {
 }