Tag: 条形码

为什么不能将任何字体保存为图像? (但要在我的窗体上显示)

我有点困惑,因为我可以在我的窗体上显示每个字符串的每个字符,但作为图像,它并不总是可能的。 也许我的代码有问题。 但是,让我告诉你我在尝试什么。 起初我有这个: Label l = new Label(); l.Text = “Ì CSharp Δ; this.Font = new Font(“Code 128”, 80); l.Size = new System.Drawing.Size(300, 200); this.Controls.Add(l); this.Size = new Size(300, 200); 嗯这很好。 现在我想尝试使用与image相同的字体保存相同的字符串。 我找到了这段代码,我认为这是怎么做到的 private static Image DrawText(string text, Font font, Color textColor, Color backColor) { //first, create a dummy bitmap just to get a […]

我的条形码有问题(Code 128)

使用Font()很容易生成3个9条形码 Font f = new Font(“Free 3 of 9”, 80); this.Font = f; Label l = new Label(); l.Text = “*STACKOVERFLOW*”; l.Size = new System.Drawing.Size(800, 600); this.Controls.Add(l); this.Size = new Size(800, 600); 它的工作。 我看到条形码,我能够扫描它。 现在我想使用其他东西,比如Code 128因为我需要安装Font(完成)并且只是改变 Font f = new Font(“Free 3 of 9”, 80); to Font f = new Font(“Code 128”, 80); 之后我在窗口看到条形码。 问题是我无法扫描它。 […]

条形码图像到C#中的Code39转换?

我有jpg格式的条形码图像,并希望从中提取条形码#。 请帮忙!

用网络摄像头读取条形码

嘿, 我正在尝试从我的网络摄像头读取EAN-13条形码。 我已经写了一堂课去做那项工作。 我正在从我的网络摄像头拍照,修剪它只显示条形码, 并使用维基百科的代码表读取条形码。 由于某种原因,条形码被修剪,但输出始终为“0-1-1-1-1-1-1-1-1-1-1-1-1”。 我想知道我是否犯了任何愚蠢的错误或误解了什么? 我不想使用任何第三方程序! 这是我现在的代码: public class BarcodeDecoder { static string[] ligerade = new string[] { “0100111”, “0110011”, “0011011”, “0100001”, “0011101”, “0000101”, “0010001”, “0001001”, “0010111” }; static string[] rechtsgerade = new string[ligerade.Length]; static string[] liungerade = new string[ligerade.Length]; static string[] GeradeUG = new string[] { “UUUUUU”, “UUGUGG”, “UUGGUG”, “UUGGGU”, “UGUUGG”, “UGGUUG”, […]

在生成条形码时修复“GDI +中发生了一般错误”

我在C#中编写条形码生成器我可以生成条形码作为位图,并可以在Picturebox(WindowsForms)中显示它们。 另一方面,我无法将条形码保存为gif或jpeg文件。 我的条形码是位图文件,这是我的代码 Bitmap barCode = CreateBarCode(“*”+txtBarCodeStr.Text+”*”); barCode.Save(@”C:\barcode.gif”, ImageFormat.gif); picBox.Image = barCode; MessageBox.Show(“Created”); 我得到以下exception; GDI +中发生了一般错误。

从ASP.NET中的BarCode下面删除文本(C#)

我正在生成条形码生成的条形码工作正常条码也完美地读取它。关于条形码生成的代码: private void GenerateBarCode(string codeInfo) { //Settings for the Image string TypeFaceName = “IDAutomationHC39M”; string imageLocation = Server.MapPath(“2010.png”); //The format of the image file ImageFormat format = ImageFormat.Png; //path of unique file name string path = “D://MyProjects//RepeaterPaging//images//vijendra.png”; //REFERENCING A FONT PrivateFontCollection fnts = new PrivateFontCollection(); fnts.AddFontFile(“IDAutomationHC39M.ttf”); FontFamily fntfam = new FontFamily(TypeFaceName); Font fnt = new […]

从.net(C#)windows应用程序中的条形码扫描器读取数据!

如何从.net Windows应用程序中的条形码扫描器读取数据? 有人可以给出要遵循的步骤顺序吗? 我对此很新。

带文本的条形码使用ItextSharp

我在我的应用程序中使用iTextSharp来生成条形码。 虽然一切都按照我想要的方式工作,但我需要在条形码下显示条形码的值,如附图中的一个showin。 下面是我使用的C#代码: Barcode39 barcodeImg = new Barcode39(); barcodeImg.Code = barcodeValue.ToString(); barcodeImg.CreateDrawingImage(System.Drawing.Color.Black, System.Drawing.Color.White).Save(stream, ImageFormat.Png);

如何使用C#从字符串生成条形码?

是否可以使用c#从字符串生成条形码? 在asp.net中是否有用于生成条形码的内置类? 是否可以检测与系统连接的条形码打印机?

如何validationUPC或EAN代码?

我需要一个C#.NET函数来评估键入或扫描的条形码是否是有效的全球贸易项目编号 (UPC或EAN)。 条形码编号的最后一位是计算机校验位,可确保条形码正确合成。 GTIN校验数字计算器