barcode

结合WebSocket,实现远程二维码生成应用

▼魔方 西西 提交于 2019-12-10 04:10:03
在上一篇文章中介绍了通过WebSocket实现服务端和客户端的图像传输。基于这个实现,可以把二维码生成器放在服务端,轻松实现远程解决方案。 参考原文: Barcode Generator with HTML5 WebSocket 准备工作 下载 Barcode SDK for .NET 阅读 - 通过WebSocket连接,实现Image从服务器到浏览器的传输 二维码远程生成 在工程中添加DynamicBarcode.dll,在属性中设置Copy to Output Directory为Copy always,这样dll就会和exe文件在同一个目录下。 添加一张背景图。对收到的消息编码。通过一个接口,生成二维码,并把二维码画到背景图上。 float scale = 3; short sImageIndex = 0; dynamicDotNetTwain.MaxImagesInBuffer = 1; bool isLoaded = dynamicDotNetTwain.LoadImage("test.png"); dynamicDotNetTwain.AddBarcode(sImageIndex, Dynamsoft.DotNet.TWAIN.Enums.Barcode.BarcodeFormat.QR_CODE, message, "", 0, 0, scale);

QR codes Limits

佐手、 提交于 2019-12-10 01:54:41
问题 I have to generate codes with custom fields: id of field+name of field+values of the field. How long is the data I can encode inside the QRcode? I need to know how many fields\values I can insert. Should I use XML or JSON or CSV? What is most generic and efficient? 回答1: XML / JSON will not qualify for a QR code's alphanumeric mode since it will include lower-case letters. You'll have to use byte mode. The max is 2,953 characters. But, the practical limit is far less -- perhaps a few hundred

Zebra Printer C# code to print barcode label

喜夏-厌秋 提交于 2019-12-09 23:52:00
问题 This is my *.prn file: I8,A,001 Q0001,0 q831 rN S5 D10 ZT JF O R20,0 f100 N B775,188,2,1,2,6,160,B,"SM00020000" X0,199,1,0,200 P1 SM00020000 being the barcode. string s = "I8,A,001\n\n\nQ0001,0\nq831\nrN\nS5\nD10\nZT\nJF\nO\nR20,0\nf100\nN\nB775,188,2,1,2,6,160,B,\"SM00020000\",199,1,0,200\nP1\n"; PrintDialog pd = new new PrintDialog(); pd.PrinterSettings = new System.Drawing.Printing. pd.PrinterSettings.PrinterName = "ZDesigner GT800 (EPL)"; RawPrinterHelper.SendStringToPrinter(pd

C#实现扫描枪扫描二维码并打印

感情迁移 提交于 2019-12-09 17:27:56
1.使用usb口输入的扫描枪,这里实现使用了winform 首先创建一个CS文件 using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; namespace am_sign { class BardCodeHooK { public delegate void BardCodeDeletegate(BarCodes barCode); public event BardCodeDeletegate BarCodeEvent; public struct BarCodes { public int VirtKey;//虚拟吗 public int ScanCode;//扫描码 public string KeyName;//键名 public uint Ascll;//Ascll public char Chr;//字符 public string BarCode;//条码信息 public bool IsValid;//条码是否有效 public DateTime Time;//扫描时间 } private struct EventMsg {

Trapping second keyboard input in (ubuntu) linux

不羁的心 提交于 2019-12-09 14:46:04
问题 I have written a program that gets input from a usb second keyboard (actually a barcode scanner). The problem is that if another window is active the data is input there rather than in my program. Could someone give me advice on what I'm doing wrong? #include <stdio.h> #include <string.h> int main(int argc, char * argv[]){ FILE * fp_in; char * data; fp_in = fopen("/dev/input/by-id/usb-04d9_1400-event-kbd","r"); if(fp_in == NULL){ fprintf(stderr,"Failed to open input by id\n"); } fp_in = fopen

Something wrong with my barcode (Code 128)

主宰稳场 提交于 2019-12-09 10:56:55
问题 It was easy to generate a 3 of 9 barcode using Font() 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); Its working. I see the barcode and Im able to scan it. Now I would like to use something else, like Code 128 For that I need to install the Font (done) and just change Font f = new Font("Free 3 of 9", 80); to Font f = new Font("Code 128", 80

Maximum length of a Code 128 barcode

冷暖自知 提交于 2019-12-09 02:49:25
问题 I need to create a Code 128 barcode with a maximum of 44 characters. What is the maximum number of characters supported by the Code 128 barcode format? I came to know that Code 128 can encode all 128 characters of ASCII, but I cannot determine the maximum number of characters it supports. 回答1: The specification for Code 128 (ISO/IEC 15417) leaves the maximum length undefined and states that this is something that should be defined by any derivative application [*] standard: 4.7.1 Symbology

Missing GS1 Symbol Identifiers with zxing and zbar

孤人 提交于 2019-12-08 19:41:35
问题 I am trying to validate GS1 Barcodes with zxing or zbar. The GS1 specification says in 7.8 that GS1 Barcodes must start with a specific Symbology Identifier: ]C1 = GS1-128 ]e0 = GS1 DataBar and GS1 Composite Symbols ]d2 = GS1 DataMatrix ]Q3 = GS1 QR Code But zxing only shows the symbol identifier for CODE-128 (with or without --gs1), not for the rest. ZBar show the symbol identifier not at all. Is my understanding of the specification correct? Is there anyway to extract those identifier from

Reading numbers from hand scanner or bar code reader in C#

烈酒焚心 提交于 2019-12-08 10:44:42
问题 Can any body who did some work on related thing tell me how can I achieve this? What I want to achieve is to read number (printing on my boxes) from scanner and put that number in database. The numbers can be product IDs. What I need to know From where to start What is type of hand scanner can i choose for this can i read these numbers by c# too adn what classes supports this? any tutorial available? 回答1: As extensively explained here: https://stackoverflow.com/questions/613881/how-to-read-a

How to Print images on paper using PrintDocument

假如想象 提交于 2019-12-08 07:01:08
问题 My problem is that is that my code prints the images overlapping each other. I do not know how to change the x and y positions. The printer should print 3 images per row and then move to the next row. private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { for (int serial = 0; serial < SaveBeforePrint.Count; serial++) { String intercharacterGap = "0"; String str = '*' + SaveBeforePrint[serial].ToUpper() + '*'; int strLength = str.Length; for (int i = 0; i <