CN102810169A - Special-shaped two-dimensional matrix barcode construction method - Google Patents

Special-shaped two-dimensional matrix barcode construction method Download PDF

Info

Publication number
CN102810169A
CN102810169A CN2011101470903A CN201110147090A CN102810169A CN 102810169 A CN102810169 A CN 102810169A CN 2011101470903 A CN2011101470903 A CN 2011101470903A CN 201110147090 A CN201110147090 A CN 201110147090A CN 102810169 A CN102810169 A CN 102810169A
Authority
CN
China
Prior art keywords
special
shaped
bar code
matrix
dimensional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101470903A
Other languages
Chinese (zh)
Other versions
CN102810169B (en
Inventor
陈江宁
甘景全
偶瑞军
谢宇
李少维
李利
宋颍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aisino Corp filed Critical Aisino Corp
Priority to CN201110147090.3A priority Critical patent/CN102810169B/en
Publication of CN102810169A publication Critical patent/CN102810169A/en
Application granted granted Critical
Publication of CN102810169B publication Critical patent/CN102810169B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a special-shaped two-dimensional matrix barcode construction method. The method includes the steps: acquiring the image print resolution of a printing device; acquiring boundary dimensions of a special-shaped two-dimensional matrix barcode symbol area to be printed on a text; defining module dimensions; defining overall dimensions of a special-shaped two-dimensional matrix barcode symbol; determining a module quantity initial value M as X4/X3; determining the final module quantity M1 and a version V corresponding to the module quantity M1; and defining completed special-shaped two-dimensional matrix barcode parameters meeting the requirements as: the module quantity M1, the version V and the module dimensions, and generating a required special-shaped two-dimensional matrix barcode symbol image by the aid of the standard generating algorithm according to the special-shaped two-dimensional matrix barcode parameters. By the method, support for a printer with unequal image print resolutions to print two-dimensional barcodes in the X direction and in the Y direction is achieved, and requirements of special texts on the two-dimensional barcodes in nonpositive directions are met.

Description

Abnormity matrix two-dimensional barcode construction method
Technical field
The present invention relates to the bar code field, in particular to a kind of special-shaped matrix two-dimensional barcode construction method.
Background technology
Matrix two-dimensional barcode is made up of by X and the splicing of Y direction equal number the module that some length of sides equate; Whole; The matrix two-dimensional barcode symbol also is the square-shaped image symbol that a length of side equates; This module is represented information 0 and 1 respectively through black and white, and matrix two-dimensional barcode can be expressed a packet.Module is big more, and the image of matrix two-dimensional barcode symbol is just big more, and the size of the size of module and matrix two-dimensional barcode symbol is directly proportional.If limited the area of matrix two-dimensional barcode symbol, if want to hold more information so, just need be smaller the dimension definitions of module ground, but the size of module too little and can't identification module, so this is the equal of the index of contradiction.
General matrix two-dimensional barcode pictorial symbol is the side of being generally, and the printing of matrix two-dimensional barcode pictorial symbol uses special-purpose bar code printer printing perhaps to print with the text at its place.In some special application scenarios; This side's matrix two-dimensional barcode symbol and specialized equipment are printed or printing can't be implemented; This application scenario is for example: practical application can't be used bar code printer; Employed PRN device is not supported the image print resolution that directions X is identical with the Y direction again, that is to say the situation of the matrix two-dimensional barcode of not showing normal side; Also have,, hope to print the situation of a rectangular matrix two-dimensional barcode when the region area that text is reserved.The problems referred to above all are that generally existing barcode technology can't fine solution and the problem of realization.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of special-shaped matrix two-dimensional barcode construction method, in order to realize the support to the directions X PRN device different with the Y directional resolution, simultaneously in order to realize making up the matrix two-dimensional barcode pictorial symbol of a non-square.
The invention provides a kind of special-shaped matrix two-dimensional barcode construction method, may further comprise the steps:
Step 1: obtain the image print resolution of PRN device, and calculate the size X1 * Y1 of single print point according to this image print resolution, wherein, X1 is the width of this single print point, and Y1 is the length of this single print point;
Step 2: the boundary dimensions of obtaining special-shaped matrix two dimensional bar code symbol zone to be printed on the text is X2 * Y2; Wherein, X2 is the length on the border in said special-shaped matrix two dimensional bar code symbol zone, and Y2 is the width on the border in said special-shaped matrix two dimensional bar code symbol zone;
Step 3: definition module is of a size of X3 * Y3, wherein, and X3=2 * X1, Y3=Y1;
Step 4: the overall dimensions that defines special-shaped two dimensional bar code symbol is X4 * Y4, wherein, and X4=X2-2 * 3 * X3, Y4=Y2-2 * 3 * Y3 or X4=X2-2 * 4 * X3, Y4=Y2-2 * 4 * Y3;
Step 5: it is X4/X3 that determination module is counted initial value M;
Judge whether M * Y3 is less than or equal to Y4,, otherwise go to step 6 if then go to step 9;
Step 6: make that number of modules initial value M is Y4/Y3;
Step 7: judge whether M * X3 is less than or equal to X4,, otherwise go to step 8 if then go to step 9;
Step 8: the value of number of modules initial value M is subtracted 1, go to step 7;
Step 9:, find out immediate and be less than or equal to the number of modules M1 of number of modules initial value M and the version V corresponding with this number of modules M1 with number of modules initial value M according to the matrix two-dimensional barcode standard;
Step 10: definition is accomplished the special-shaped matrix two-dimensional barcode parameter satisfy the demands and is: number of modules M1, version V and module size X3 * Y3, and generate needed special-shaped matrix two-dimensional barcode glyph image according to this abnormity matrix two-dimensional barcode parameter and the standard generating algorithm of use.
During enforcement; In step 4; The overall dimensions of said special-shaped two dimensional bar code symbol is: under the fixing situation of the area in said special-shaped matrix two dimensional bar code symbol zone, the area in said special-shaped matrix two dimensional bar code symbol zone deduct need reserve around obtain behind the blank area can the actual area of printing two-dimension code.
During enforcement, in step 2, when special-shaped matrix two dimensional bar code symbol zone to be printed on the said text was the form on the invoice, this boundary dimensions was the form size.
Compared with prior art; Special-shaped matrix two-dimensional barcode construction method of the present invention; Realized the support that printer that directions X and Y direction have the image print resolution that does not wait prints two-dimensional bar code and satisfied the demand of special text non-positive dirction two-dimensional bar code
Description of drawings
Fig. 1 is the process flow diagram of special-shaped matrix two-dimensional barcode construction method of the present invention.
Embodiment
The invention provides a kind of special-shaped matrix two-dimensional barcode construction method, in order to realize support, simultaneously in order to realize making up the matrix two-dimensional barcode pictorial symbol of a non-square to the directions X PRN device different with the Y directional resolution.
As shown in Figure 1, special-shaped matrix two-dimensional barcode construction method of the present invention may further comprise the steps:
Step 11: obtain the image print resolution of PRN device, and calculate the size X1 * Y1 of single print point according to this image print resolution, wherein, X1 is the width of this single print point, and Y1 is the length of this single print point;
Step 12: the boundary dimensions of obtaining special-shaped matrix two dimensional bar code symbol zone to be printed on the text is X2 * Y2; Wherein, X2 is the length on the border in said special-shaped matrix two dimensional bar code symbol zone, and Y2 is the width on the border in said special-shaped matrix two dimensional bar code symbol zone;
Special-shaped matrix two dimensional bar code symbol to be printed on the said text is regional, is meant legal bill form;
With special-shaped matrix two dimensional bar code symbol zone to be printed on the said text is that form on the invoice is an example; Each form on the invoice has all been stipulated content separately; Can not cross the border; Accordingly for providing the form of printing two-dimensional bar code, two-dimensional bar code can not out-of-bounds, and the form size is exactly a boundary dimensions;
Step 13: definition module is of a size of X3 * Y3, wherein, and X3=2 * X1, Y3=Y1;
Step 14: the overall dimensions that defines special-shaped two dimensional bar code symbol is X4 * Y4, wherein, and X4=X2-2 * 3 * X3, Y4=Y2-2 * 3 * Y3 or X4=X2-2 * 4 * X3, Y4=Y2-2 * 4 * Y3;
National standard according to two-dimensional bar code; The blank that around two dimensional bar code symbol, need reserve at least 3 module size is so that identification; Under the situation that the area in said special-shaped matrix two dimensional bar code symbol zone is fixed; Step 4 be the area with said special-shaped matrix two dimensional bar code symbol zone deduct need reserve around blank area, obtaining can the actual area of printing two-dimension code, and this area is defined as the overall dimensions of special-shaped two dimensional bar code symbol;
Step 15: it is X4/X3 that determination module is counted initial value M;
Judge whether M * Y3 is less than or equal to Y4,, otherwise go to step 16 if then go to step 19;
Step 16: make that number of modules initial value M is Y4/Y3;
Step 17: judge whether M * X3 is less than or equal to X4,, otherwise go to step 18 if then go to step 19;
Step 18: the value of number of modules initial value M is subtracted 1, go to step 17;
Step 19:, find out immediate and be less than or equal to the number of modules M1 of number of modules initial value M and the version V corresponding with this number of modules M1 with number of modules initial value M according to the matrix two-dimensional barcode standard;
Step 110: definition is accomplished the special-shaped matrix two-dimensional barcode parameter satisfy the demands and is: number of modules M1, version V and module size X3 * Y3, and use standard generating algorithm to generate needed special-shaped matrix two-dimensional barcode glyph image according to this abnormity matrix two-dimensional barcode parameter.
Come the present invention is introduced according to a concrete embodiment below:
Printer uses 9 stylus printers of model as SK810, and the long-pending size restrictions of text surface to be printed is horizontal 20mm, vertical 18 millimeters.
Step 1:SK810 printer image print resolution is 120 * 72dpi, and dpi representes dots per inch, and 1 inch equals 1000mil, calculates the size X1=1000/120=8.33mil of single print point, Y1=1000/72=13.89mil;
Step 2: demand provides X2=20mm, and Y2=18mm is converted to English unit, X2=20mm * 39.37mil/mm=787.4mil, and Y2=18mm * 39.37mil/mm=708.66mil, the conversion of conversion unit is according to 1mm=39.37mil;
Step 3: definition module size, X3=2 * 8.33=16.66mil, Y3=13.89mil;
Step 4: define special-shaped two dimensional bar code symbol overall dimensions, X4=787.4-2 * 3 * 16.66=687.44mil, Y4=708.66-2 * 3 * 13.89mil=625.32mil;
Step 5: determination module is counted initial value M=687.44/16.66=41, and checking 41 * 13.89=569.49mil is less than or equal to 625.32mil, satisfies condition, and is available;
Step 6: look into for example Chinese letter co GB GB/T21049-2007 of matrix two-dimensional barcode standard, the number of modules of version 10 is 41, equates with the number of modules initial value, can be used as the number of modules final value;
Step 7: accomplish parameter-definition, parameter is: number of modules 41, and version 10, the module chi, 16.66 * 13.89mil can make up the special-shaped matrix two-dimensional barcode that satisfies the present embodiment demand by the generating algorithm inside these parameter combined standards.
More than explanation is just illustrative for the purpose of the present invention; And nonrestrictive, those of ordinary skills understand, under the situation of spirit that does not break away from following accompanying claims and limited and scope; Can make many modifications, variation or equivalence, but all will fall in protection scope of the present invention.

Claims (3)

1. a special-shaped matrix two-dimensional barcode construction method is characterized in that, may further comprise the steps:
Step 1: obtain the image print resolution of PRN device, and calculate the size X1 * Y1 of single print point according to this image print resolution, wherein X1 is the width of this single print point, and Y1 is the length of this single print point;
Step 2: the boundary dimensions of obtaining special-shaped matrix two dimensional bar code symbol zone to be printed on the text is X2 * Y2; Wherein, X2 is the length on the border in said special-shaped matrix two dimensional bar code symbol zone, and Y2 is the width on the border in said special-shaped matrix two dimensional bar code symbol zone;
Step 3: definition module is of a size of X3 * Y3, wherein, and X3=2 * X1, Y3=Y1;
Step 4: the overall dimensions that defines special-shaped two dimensional bar code symbol is X4 * Y4, wherein, and X4=X2-2 * 3 * X3, Y4=Y2-2 * 3 * Y3 or X4=X2-2 * 4 * X3, Y4=Y2-2 * 4 * Y3;
Step 5: it is X4/X3 that determination module is counted initial value M;
Judge whether M * Y3 is less than or equal to Y4,, otherwise go to step 6 if then go to step 9;
Step 6: make that number of modules initial value M is Y4/Y3;
Step 7: judge whether M * X3 is less than or equal to X4,, otherwise go to step 8 if then go to step 9;
Step 8: the value of number of modules initial value M is subtracted 1, go to step 7;
Step 9:, find out immediate and be less than or equal to the number of modules M1 of number of modules initial value M and the version V corresponding with this number of modules M1 with number of modules initial value M according to the matrix two-dimensional barcode standard;
Step 10: definition is accomplished the special-shaped matrix two-dimensional barcode parameter satisfy the demands and is: number of modules M1, version V and module size X3 * Y3, and generate needed special-shaped matrix two-dimensional barcode glyph image according to this abnormity matrix two-dimensional barcode parameter and the standard generating algorithm of use.
2. special-shaped matrix two-dimensional barcode construction method as claimed in claim 1; It is characterized in that; In step 4; The overall dimensions of said special-shaped two dimensional bar code symbol is: under the fixing situation of the area in said special-shaped matrix two dimensional bar code symbol zone, the area in said special-shaped matrix two dimensional bar code symbol zone deduct need reserve around obtain behind the blank area can the actual area of printing two-dimension code.
3. the construction method of special-shaped matrix two-dimensional barcode as claimed in claim 1 is characterized in that, in step 2, when special-shaped matrix two dimensional bar code symbol zone to be printed on the said text was the form on the invoice, this boundary dimensions was the form size.
CN201110147090.3A 2011-06-02 2011-06-02 Special-shaped two-dimensional matrix barcode construction method Active CN102810169B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110147090.3A CN102810169B (en) 2011-06-02 2011-06-02 Special-shaped two-dimensional matrix barcode construction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110147090.3A CN102810169B (en) 2011-06-02 2011-06-02 Special-shaped two-dimensional matrix barcode construction method

Publications (2)

Publication Number Publication Date
CN102810169A true CN102810169A (en) 2012-12-05
CN102810169B CN102810169B (en) 2015-07-15

Family

ID=47233873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110147090.3A Active CN102810169B (en) 2011-06-02 2011-06-02 Special-shaped two-dimensional matrix barcode construction method

Country Status (1)

Country Link
CN (1) CN102810169B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103909741A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 Method and apparatus for printing two-dimensional code by use of 9-pin printer in embedded system
CN112183689A (en) * 2020-09-30 2021-01-05 上海中商网络股份有限公司 Graphic code, graphic code generation method and graphic code spray printing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000235632A (en) * 2000-01-26 2000-08-29 Sharp Corp Digital information recording carrier, digital information recording method/device and digital information decoding method/device
CN101334849A (en) * 2008-07-01 2008-12-31 北大方正集团有限公司 Two-dimension code label symbol creation method and apparatus and two-dimension code label structure
JP2009129410A (en) * 2007-11-28 2009-06-11 Iforcom Co Ltd Image information with two-dimensional code, its generator, printer, reading method, reader, reading program, and recording medium
CN102013030A (en) * 2010-12-06 2011-04-13 西安信唯信息科技有限公司 Two-dimension code anti-counterfeit method based on network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000235632A (en) * 2000-01-26 2000-08-29 Sharp Corp Digital information recording carrier, digital information recording method/device and digital information decoding method/device
JP2009129410A (en) * 2007-11-28 2009-06-11 Iforcom Co Ltd Image information with two-dimensional code, its generator, printer, reading method, reader, reading program, and recording medium
CN101334849A (en) * 2008-07-01 2008-12-31 北大方正集团有限公司 Two-dimension code label symbol creation method and apparatus and two-dimension code label structure
CN102013030A (en) * 2010-12-06 2011-04-13 西安信唯信息科技有限公司 Two-dimension code anti-counterfeit method based on network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103909741A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 Method and apparatus for printing two-dimensional code by use of 9-pin printer in embedded system
CN112183689A (en) * 2020-09-30 2021-01-05 上海中商网络股份有限公司 Graphic code, graphic code generation method and graphic code spray printing method
CN112183689B (en) * 2020-09-30 2021-06-25 上海中商网络股份有限公司 Graphic code generation method

Also Published As

Publication number Publication date
CN102810169B (en) 2015-07-15

Similar Documents

Publication Publication Date Title
US8355167B2 (en) Method and apparatus for using pattern color space in print job processing
US7965422B2 (en) Super resolution encoded microprinting through postscript
CN108052491A (en) A kind of automatic processing method and device of certificate document
US7447361B2 (en) System and method for generating a custom font
US10051156B2 (en) System and method for producing correlation and gloss mark images
US20180074999A1 (en) Systems and methods for automatically reformatting publications
CN107423004B (en) Method for printing bill by POS terminal and POS terminal
CN101996336A (en) Method and device for generating and decoding two-dimensional bar code
CN104044353A (en) Image Processing Apparatus, Image Forming Apparatus And Image Processing Method
CN101127089B (en) Implement method for embedding large amount of information on printing media
US20130271521A1 (en) Reduced-ink barcodes
CN102810169B (en) Special-shaped two-dimensional matrix barcode construction method
CN102810170B (en) Quick response matrix code and building method thereof
JP2014049774A (en) Image processing apparatus, image processing method, image recording apparatus, and program
CN101004582A (en) Printing method with small margin or no margin
CN102810171B (en) Chinese-sensible code and construction method thereof
CN101520772B (en) Realizing method of electronic seal
CN102810149B (en) Quick response matrix code position sensing figure and construction method thereof
CN107193509A (en) A kind of method for realizing any Windows fonts Chinese character printing
CN104442054A (en) Two-dimension code printing method and device based on mainframe platform
US11057541B2 (en) Image processing apparatus, printing system, and image processing method
JP2006309354A (en) Digital pen input system
US20150213341A1 (en) Image scaling mechanism
CN104461406B (en) A kind of print-out method and device
JP6166976B2 (en) Data structure of barcode font data, page data generation device, raster data generation device, raster data generation method and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant