I have been testing the system for bar code printing for the past two weeks, because the original system uses a universal drive to unify Intermac / ZeBar / DataMAx printing. However, when processing the DataMax printing effect, there is a sawtooth scattering of the printed bar code, which makes the scanner unrecognizable.
I got the printer model DataMax-I-4208 thermal printing model. Frankly speaking, the process of solving the problem is very tormenting. On the one hand, it comes from the limited resources and printing examples provided by the official in this regard.On the other hand, the specific debugging of the device parameters is designed. A series of problem solving methods for C # control DataMax-I-4208 are summarized as follows:
DataMax printing Code128 bar code appears jagged
First, we must understand a concept: the abbreviation of DPI [Dots Per Inch]. The number of dots or lines printed per inch is used to indicate the printer's print resolution. DPI refers to the number of pixels in a unit area, that is, the scanning accuracy. At present, the number of pixels in a square inch area is calculated internationally. The smaller the dpi, the lower the resolution of the scan.
DataMax printer model: DataMax-I-4208-203DPI
When we send the bar code BMP format image generated by the system to the printer by default, the DPI is the default DPI value displayed on the current local system screen. The DPI value is usually 96DPI. This causes the inconsistency of the printer value and the jagged blur printing effect: C # How to set and modify DPI in:
DPI is the number of dots per inch. If the value of DPI is too low, the picture will be blurry after the bitmap is printed with a small number of dots per inch. After setting the DPI value, the picture will obviously become smaller, the resolution will become higher, and the barcode is found to be printed. Scanner can recognize, as for the size can be converted by high-quality scaling through shift replacement: C # control code
Printing is basically OK.
DataMax-I-4208 DPL instruction mode printing
When we print through the universal driving method of the program, the bitmap image sent to the printer is a bitmap image, and the output is printed. The DataMax DPL method more directly controls the barcode printing through the instruction encoding. DAtaMax defines a set of printing instructions completely Different InterMac and Zebar [Zebra] printers. How to get the DPL Program HandleBook programming manual:
First find the drive disk, read the drive content and find:
Run the Do application:
Find the specified printer type: Data Max-I series or I-Class:
Find the developer manual PDF:
The red logo is the driver, and the green logo is the Programmer HandleBook developer manual we need, that is, the DPL instruction set. If you do not have a driver disk, you can download the complete DPL instruction set by the following link:
DataMax-I-Class DPI instruction set PDF download
The original DPL instruction set is all English, and the total number of pages is more than 350 pages. My personal experience is that this DPL Programmer PDF document should not be viewed too blindly, mainly because there are too many contents, and most of you do not use them. , So read the following directory carefully before reading this document, it will be easy to find what you want, which will make you more effective:
Before looking for instructions in the DPL manual, we need to know what factors we need to control by instruction: For the BarCode Code 128 format, a general analysis of the influencing factors is as follows:
Print Speed ​​[If not very fast or very slow, use the default]
Label Location
Chinese Control Chinese character processing-by default, printing Chinese is garbled? Need additional configuration
Label Value
Label Frmat barcode printing format
Now that there is a requirement, the rest of the work is also a process of constantly looking for the output of the print command to test the output: Now we print a most basic string to take a look at the DPL command format:
The DPL document does not explain the syntax format of the printing instruction. Most of them are talking about how to set what kind of instruction to use. It is said that I have probably mastered the basic syntax format of the DPL printing instruction in countless tests. ]:
L: Specify the type of printing L Custom print a barcode
Dll: The next step is to further subdivide the type of printing. Similar barcodes are divided into Code 128 UPC-E or QR codes, etc.
: Similar to C # per line of code; Specify the current command end character
E: It specifies the end of the entire command, which means that the printer will not automatically read the recognition after the E character.
The commands sent to the printer through the serial port are completely correct but DataMax-i-4208 does not reflect them at all. Later, I contacted the manufacturer to understand:
The print command header needs to be converted to a hexadecimal printer to recognize the text effect in TXT after conversion:
ok. Send commands to the printer DataMax-i-4208 through the serial tool and finally start to respond to the printing effect:
The only way to print a successful DPL command is to worry about the quality of the barcode. The command mode is a simple analog printer. It is similar to an ATM cash machine. Different people carry different bank cards, which corresponds to different DPL print commands.You can get different currencies. Dollar RMB etc. corresponds to the print result.
The premise of the driving method is that a complete and clear picture must be generated through the program method, and the data is sent to the printer for printing using its own settings and font to be printed.
Then there is no problem with the test command. How to send it to the printer through C # programming, and then look at how to control the position of the barcode in programming:
Bar code printing has a coordinate position corresponding to X / y on the printing paper.Many people are very confused about the position of the bar code of the DPL instruction. After much verification by many parties, the conclusion is DPL setting:
Row OffSet Set the X position of the corresponding row starting position
Column Offset sets the starting coordinate position of the drinking column, that is, the Y coordinate position
There are two more parameters:
ROW ADJUST (row adjustment) Fine adjustment of the row starting position (ROW OFFSET) in units of points
COLUMN ADJUST (column adjustment) Fine adjustment of the column starting position (COLUMN OFFSET) in dots
Now that I have the DPL parameter name, I want to tell you not to go directly to the DPL 350-page large document and go a little bit to give you a direct and simple way to use PDF search to quickly locate the content you are looking for, although I think this is nothing, but I want to tell Your simple effect is still very good in a non-native document:
Detailed syntax description:
The other settings are basically the same, so the CPL programming requires the DPL instruction format limitation. Similar to the formula where we formulate the X coordinate, that is, the Row Offset value syntax is R0037. First, the X coordinate value range is 0-9999, and the format of the DPL stipulates must be 4 digits. That means setting the X coordinate to 5 DPL standard recognition format: R0005 C # for control:
Hexadecimal control for printing header conversion:
Get font method:
For Chinese fonts, that is, Chinese Simple [Chinese Simplified Format] is double-byte in DataMax, the default is that Chinese is not supported, similar to when we replace the print command with Chinese characters, the printing result is garbled characters? What is the problem. I checked DAtaMAx The official description of Chinese simple found that if you need DataMax to print Chinese, you need to install a font or install a Chinese character card on the printer to recognize it. If you do n’t install a character card, there is another way to use third-party controls to support Chinese printing:
Standard controls: Or can be achieved through third-party barcode software controls such as Codesoft.
Pull and decoration are the cord's functions.
Blinds Cord
WUXI MIFUN INTERNATIONAL TRADE CO.,LTD , https://www.mifunblind.com