Ejemplo n.º 1
0
 private byte[] getBarcodeImage(string barcodeSource)
 {
     //Create an instance of BarcodeProfessional class
     using (Neodynamic.Web.MVC.Barcode.BarcodeProfessional bcp = new Neodynamic.Web.MVC.Barcode.BarcodeProfessional())
     {
         //Set the desired barcode type or symbology
         bcp.Symbology = Neodynamic.Web.MVC.Barcode.Symbology.QRCode;
         //Set value to encode
         bcp.Code = barcodeSource;
         //Generate barcode image
         byte[] imgBuffer = bcp.GetBarcodeImage(System.Drawing.Imaging.ImageFormat.Png);
         //Write image buffer to Response obj
         return imgBuffer;
     }
 }