条形码是由控制器通过并显示在视图中的字符串:如何产生鉴于条形码
@shelfEdge.Barcode
我如何得到这个条形码格式显示,仅下载条形码字体的事并将其添加到课堂?
任何想法表示欢迎
UPDATE 伊夫使用后在Free Barcode API for .NET从安德烈·施耐德...
BarcodeLib.Barcode barcode = new BarcodeLib.Barcode()
{
IncludeLabel = true,
Alignment = AlignmentPositions.CENTER,
Width = 300,
Height = 100,
RotateFlipType = RotateFlipType.RotateNoneFlipNone,
BackColor = Color.White,
ForeColor = Color.Black,
};
model.BarcodeImage = barcode.Encode(TYPE.CODE128B, "123456789");
然后在视图@Model.BarcodeImage
但是,这将引发errro:
Compiler Error Message: CS0012: The type 'System.Drawing.Image' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Source Error:
Line 54: </td>
Line 55: <td width="30%">
Line 56: @Model.BarcodeImage
Line 57: </td>
Line 58: </tr>
和我有引用system.drawing项目??
您需要使用第三方组件(ComponentOne的,阅读Aspose等) – Mahmoodvcs
你可以尝试用syncfusion条码 – SivaRajini
感谢您的回复球员,请参阅编辑....谁投了-1请解释你的理由? – John