问题
I am working to integrate POS system to my site. So I want to generate barcode. I am using SKU as the data fields to encode the formate is XXXXX-XXX-XXX-XXX
.
X is a digit from 0 to 9 so after doing research I found code 128 is the best correct me if I am wrong. The problem with size, The label on items are 2' by 3 1/2' inches, when I generate barcode using barbecue
and resize the image the scanner cannot read the barcode. So could you please explain what is the size constrains and what is the smallest size that I can get in inches.
回答1:
Production of high-quality barcodes requires that the printing process is accurately controlled from end-to-end.
Optimisation of Code 128
There are no mandated size limits imposed on generic uses of Code 128, however specific applications of Code 128 to particular industries will define such constraints. For your in-house purposes only practical constraints will dictate a lower size limit such as the fidelity of your printer and the capabilities of your scanner.
Ensuring that the data is represented within the Code 128 as compactly as possible (for example by using numeric-only data that will be double-density compressed by "Mode C") will reduce the required number of bars and spaces, which will provide more flexibility when sizing the symbol. See this answer for more detail.
Is it practical to drop the dashes from your SKUs perhaps by reconstituting them after scanning? Consider the different widths of Code 128s for your SKUs with and without dashes to see the impact of this:
A quiet zone of at least ten times the X-dimension (width of a narrow bar) must be maintained at either end of the symbol. The quiet zone should be considered an integral part of the Code 128 symbol as this image shows.
Optimisation of Generic Linear Barcodes
When sizing the symbol in general you should aim to maximise the width of the barcode provided that it fits comfortably within the scanner's field of view subject to the following constraints:
Avoid anti-aliasing and if you are using a low-resolution printing process then it is especially important to ensure that the X-dimension of the output symbol is an integer multiple of the printer's pixel size. This way you can avoid lines intended to have the same width from being rasterised to differing widths due to pixel-grazing as demonstrated in this image.
With certain printing processes it may also be necessary for the software to compensate for ink bleed by reducing the width of bars by a fixed amount whilst maintaining accurate edge-to-edge spacing.
The specification for Code 128 (ISO/IEC 15417) describes this latter processes as follows:
Graphics software used to create bar codes on pixel-based printers must scale each bar and space exactly to the pixel pitch of the printer being used. For edge to similar edge decodable symbologies like Code 128 the number of pixels comprising each symbol character must be a fixed and constant integer multiple of the number of modules in the symbol character. // General purpose printing software designed to support a wide range of printers should provide the user the capability of adjusting the X dimension and bar width growth or loss.
This answer demonstrates what happens when these process controls aren't followed.
来源:https://stackoverflow.com/questions/36171092/how-do-you-generate-small-high-density-linear-barcodes-that-scan-reliably