CN107193509A - A kind of method for realizing any Windows fonts Chinese character printing - Google Patents
A kind of method for realizing any Windows fonts Chinese character printing Download PDFInfo
- Publication number
- CN107193509A CN107193509A CN201710288783.1A CN201710288783A CN107193509A CN 107193509 A CN107193509 A CN 107193509A CN 201710288783 A CN201710288783 A CN 201710288783A CN 107193509 A CN107193509 A CN 107193509A
- Authority
- CN
- China
- Prior art keywords
- chinese character
- bitmap
- printing
- realizing
- label
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1205—Improving or facilitating administration, e.g. print management resulting in increased flexibility in print job configuration, e.g. job settings, print requirements, job tickets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Record Information Processing For Printing (AREA)
Abstract
The invention provides a kind of method for realizing any Windows fonts Chinese character printing, including following steps:The bitmap of specific dimensions is created by GDI, with white filling;According to the starting position of setting, Chinese character information to be printed is drawn on bitmap using GDI, color uses black;The picture of generation is converted into the recognizable character format of target printer, and exported to target printer;According to the print position of setting, the picture after printing conversion.A kind of method for realizing any Windows fonts Chinese character printing of the present invention, it is possible to use zebra printer realizes the printing of any Windows fonts Chinese character label, meets the demand of personalized labels printing;The software control printer printing label also write by oneself, meets the production requirement of production line automation printing.
Description
Technical field
The invention belongs to print field, more particularly, to a kind of method for realizing any Windows fonts Chinese character printing.
Background technology
Currently, it is in factory to use label machine printed product label more, and it is exactly zebra brand to be most widely used
Label machine.Under the background that automation printing demand is improved constantly, user is mostly by the software of oneself come abstract factory
Printer prints label.
Traditional zebra label machine is using software subsidiary at random, though the Chinese of any Windows fonts can be printed
Word, but the printing of dynamic labels can not be applied to.And in actual use, in order to meet automation printing demand, user needs
Dynamic label is printed using the automated software control printer of oneself.User is beaten using automated software abstract factory
, it is necessary to using the special control language of zebra printer when print machine is printed, and this language is used to support printing Chinese character label.
Therefore, in order to realize printing to dynamic labels, it is necessary to propose it is a kind of be used for zebra printer realize it is any
The method of Windows font Chinese character printings.
The content of the invention
In view of this, the present invention is directed to propose a kind of method for realizing any Windows fonts Chinese character printing, by using
Chinese character is converted into the mode of picture dot chart, to realize that the automation to dynamic Chinese character label is printed.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
A kind of method for realizing any Windows fonts Chinese character printing, including following steps:
1) bitmap of specific dimensions is created by GDI, with white filling;
2) according to the starting position of setting, Chinese character information to be printed is drawn on bitmap using GDI, color is using black
Color;
3) picture of generation is converted into the recognizable character format of target printer, and exported to target printer;
4) according to the print position of setting, the picture after printing conversion.
Further, in the step 1, the size of bitmap depends on label sizes and the resolution ratio of target printer.
Further, in the step 2, the method to set up of starting position is:When drawing Chinese character on bitmap, it will print
The first Chinese character of the first row be converted into pixel number to the distance on the left of label and the Chinese character to the distance on label top, with this
As starting position, the drafting to all information to be printed is completed.
Further, in the step 3, the picture of generation is converted into the recognizable character format method of target printer
For:Since the upper left corner of bitmap, every 8 points in bitmap are represented with a hexadecimal character, i.e. the binary system of the data
A point in each correspondence bitmap in byte, first point of correspondence bitmap since byte highest order, the like,
Until the bitmap rightmost side, often go and add newline after terminating;
The color of the corresponding point of each in byte is compared with grey RGB, the value of this is determined;If the face
Color rgb value is less than grey RGB, and corresponding position is 1;If being more than, corresponding position is 0;
If the points of the row of certain in bitmap are less than 8, the byte low level of correspondence binary number is set to 0.
Further, in the step 4, before target printer printing, it need to measure on the left of label apart from printer label
Distance on the left of outlet, and by calculating, be converted into pixel quantity, the position of printing is set with this.
Further, in the step 4, target printer is printed using graphics mode.
Relative to prior art, a kind of method for realizing any Windows fonts Chinese character printing of the present invention has
Following advantage:Oneself draws the bitmap of information to be printed, and drawn web page bitmap is converted into what target printer can recognize that
Character format, realizes the printing of any Windows fonts Chinese character dynamic labels, meets individual requirements;That is write with oneself is soft
Part control printer printing label, can meet the production requirement of production line automation printing.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the print implementing method described in the embodiment of the present invention.
Embodiment
It should be noted that in the case where not conflicting, the embodiment in the present invention and the feature in embodiment can phases
Mutually combination.
Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
A kind of method for realizing any Windows fonts Chinese character printing, including following steps:
1) bitmap of specific dimensions is created by GDI, with white filling;
2) according to the starting position of setting, Chinese character information to be printed is drawn on bitmap using GDI, color is using black
Color;
3) picture of generation is converted into the recognizable character format of target printer, and exported to target printer;
4) according to the print position of setting, the picture after printing conversion.
It is worth noting that, in the step 1, the size of bitmap depends on the resolution of label sizes and target printer
Rate.
For example:The use of model GK888t zebra printer resolution is 200DPI (point/inch), label sizes are width
76mm, high 38mm, then:
Width:76mm=2.992126 inch in width pixels:2.992126*200=598.4252
Highly:38mm=1.496063 inch height pixels:1.496063*200=299.2126
Therefore, dimension of picture size should be set as:The pixels of 599 pixel * 300.
It is worth noting that, in the step 2, the method to set up of starting position is:, will when drawing Chinese character on bitmap
The first Chinese character of the first row of printing is converted into pixel number to the distance on the left of label and the Chinese character to the distance on label top,
In this, as starting position, the drafting to all information to be printed is completed.
For example:The first Chinese character of the first row is away from 8mm on the left of label, away from label top 8mm, then
8mm=0.314960629921259 inches
0.314960629921259 inch of * 200DPI=63 pixel
Then the first row Chinese character, word are drawn using GDI apart from the position of the pixel of bitmap top 63 apart from the pixel of the bitmap left side 63
Body can select any Windows fonts, and color uses black.By that analogy, complete to the Chinese characters of all desired printings and
The drafting of figure.
It is worth noting that, in the step 3, the picture of generation is converted into the recognizable character format of target printer
Method is:Since the upper left corner of bitmap, every 8 points in bitmap are represented (such as with a hexadecimal character:F0), i.e. the number
According to binary system (1,111 0000) byte in each correspondence bitmap in a point, since byte highest order correspondence position
First point of figure, the like, until the bitmap rightmost side,
The color of the corresponding point of each in byte and grey RGB (187,187,187) are compared, the position is determined
Value;If this color rgb value is less than grey RGB, corresponding position is 1;If being more than, corresponding position is 0;
If the points of the row of certain in bitmap are less than 8, the byte low level of correspondence binary number is set to 0;
Each byte is represented with hexadecimal character, character string is reconnected into, line feed is often added in row terminator-string
Symbol.
For example:The rgb value of the first eight point of the picture upper left corner is respectively (00,00,00), (00,00,00), (00,00,00),
(00,00,00), (00,00,00), (00,00,00), (00,00,00), the character that (00,00,00) is then converted into is FF.
It is worth noting that, in the step 4, target printer is printed using graphics mode.In target printer printing
, it is necessary to set label left end relative to the distance of printer printable area leftmost edge before picture.Label is on a printer
After installing, the distance on the left of measurement label on the left of printer label outlet, and pixel quantity is converted into by calculating,
The position of printing is set with this.So target printer according to the print position set, in conjunction with by bitmap-converted into beat
The recognizable character string information printing picture of print machine, so as to realize the printing of any Windows Chinese characters label.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
God is with principle, and any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.
Claims (6)
1. a kind of method for realizing any Windows fonts Chinese character printing, it is characterised in that:Including following steps:
1) bitmap of specific dimensions is created by GDI, with white filling;
2) according to the starting position of setting, Chinese character information to be printed is drawn on bitmap using GDI, color uses black;
3) picture of generation is converted into the recognizable character format of target printer, and exported to target printer;
4) according to the print position of setting, the picture after printing conversion.
2. a kind of method for realizing any Windows fonts Chinese character printing according to claim 1, it is characterised in that:Institute
State in step 1, the size of bitmap depends on label sizes and the resolution ratio of target printer.
3. a kind of method for realizing any Windows fonts Chinese character printing according to claim 1, it is characterised in that:Institute
State in step 2, the method to set up of starting position is:When drawing Chinese character on bitmap, the first Chinese character of the first row that will be printed is arrived
Distance and the Chinese character on the left of label are converted into pixel number to the distance on label top, in this, as starting position, complete
Drafting to all information to be printed.
4. a kind of method for realizing any Windows fonts Chinese character printing according to claim 1, it is characterised in that:Institute
State in step 3, the picture of generation is converted into the recognizable character format method of target printer is:Opened from the upper left corner of bitmap
Begin, every 8 points in bitmap are represented with a hexadecimal character, i.e., each correspondence position in the binary system byte of the data
A point in figure, first point of correspondence bitmap since byte highest order, the like, until the bitmap rightmost side, often go
Newline is added after end;
The color of the corresponding point of each in byte is compared with grey RGB, the value of this is determined;If the color
Rgb value is less than grey RGB, and corresponding position is 1;If being more than, corresponding position is 0;
If the points of the row of certain in bitmap are less than 8, the byte low level of correspondence binary number is set to 0.
5. a kind of method for realizing any Windows fonts Chinese character printing according to claim 1, it is characterised in that:Institute
State in step 4, before target printer printing, the distance on the left of printer label outlet on the left of label need to be measured, and lead to
Calculating is crossed, pixel quantity is converted into, the position of printing is set with this.
6. a kind of method for realizing any Windows fonts Chinese character printing according to claim 1, it is characterised in that:Institute
State in step 4, target printer is printed using graphics mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288783.1A CN107193509A (en) | 2017-04-27 | 2017-04-27 | A kind of method for realizing any Windows fonts Chinese character printing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710288783.1A CN107193509A (en) | 2017-04-27 | 2017-04-27 | A kind of method for realizing any Windows fonts Chinese character printing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107193509A true CN107193509A (en) | 2017-09-22 |
Family
ID=59872638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710288783.1A Pending CN107193509A (en) | 2017-04-27 | 2017-04-27 | A kind of method for realizing any Windows fonts Chinese character printing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107193509A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109597592A (en) * | 2018-12-03 | 2019-04-09 | 珠海趣印科技有限公司 | A kind of App text intelligence Enhancement Method |
CN110164399A (en) * | 2019-07-01 | 2019-08-23 | 深圳市卡迪智能科技有限公司 | 8 bit depth type matrix storage optimization methods |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030197892A1 (en) * | 2002-04-22 | 2003-10-23 | Chohiko Fukuoh | Print server apparatus and network print system |
CN101408836A (en) * | 2007-10-09 | 2009-04-15 | 北京书生国际信息技术有限公司 | Print implementing method |
CN104050155A (en) * | 2014-07-01 | 2014-09-17 | 西安诺瓦电子科技有限公司 | Text editing device and method |
CN103632375B (en) * | 2013-12-10 | 2016-09-21 | 三峡大学 | A kind of image scrambling evaluation method and device |
CN106095349A (en) * | 2016-06-14 | 2016-11-09 | 无锡天脉聚源传媒科技有限公司 | A kind of signature Method of printing and device |
-
2017
- 2017-04-27 CN CN201710288783.1A patent/CN107193509A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030197892A1 (en) * | 2002-04-22 | 2003-10-23 | Chohiko Fukuoh | Print server apparatus and network print system |
CN101408836A (en) * | 2007-10-09 | 2009-04-15 | 北京书生国际信息技术有限公司 | Print implementing method |
CN103632375B (en) * | 2013-12-10 | 2016-09-21 | 三峡大学 | A kind of image scrambling evaluation method and device |
CN104050155A (en) * | 2014-07-01 | 2014-09-17 | 西安诺瓦电子科技有限公司 | Text editing device and method |
CN106095349A (en) * | 2016-06-14 | 2016-11-09 | 无锡天脉聚源传媒科技有限公司 | A kind of signature Method of printing and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109597592A (en) * | 2018-12-03 | 2019-04-09 | 珠海趣印科技有限公司 | A kind of App text intelligence Enhancement Method |
CN110164399A (en) * | 2019-07-01 | 2019-08-23 | 深圳市卡迪智能科技有限公司 | 8 bit depth type matrix storage optimization methods |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7447361B2 (en) | System and method for generating a custom font | |
US20130335424A1 (en) | Character display method and device | |
US7379197B2 (en) | Apparatus for controlling printer to improve printing speed and method thereof | |
US20160171334A1 (en) | Identifying user marks using patterned lines on pre-printed forms | |
JPWO2008015825A1 (en) | Written font data and character output system | |
KR101525064B1 (en) | Method of toner saving, system of toner saving, and image forming appartus | |
CN107193509A (en) | A kind of method for realizing any Windows fonts Chinese character printing | |
CN104133809B (en) | Font style bolding method | |
US10963689B2 (en) | Image processing apparatus and method for controlling image processing apparatus | |
US10839206B2 (en) | Information processing device and method performing character recognition on document image data masked or not based on text image count | |
US10936893B2 (en) | Information processing device and method for document image extraction, composite image generation, and OCR processing including display of reading resolution instructions based on character density | |
CN101324960A (en) | Signal display device, printer and signal display method | |
CN103559271A (en) | Method for generating bitmap font library with gray level | |
US9940557B2 (en) | Document printing using hardware-dependent fonts | |
JP2009070232A (en) | Print data generation apparatus | |
Parhami | Evolutionary changes in Persian and Arabic scripts to accommodate the printing press, typewriting, and computerized word processing | |
CN102810169B (en) | Special-shaped two-dimensional matrix barcode construction method | |
US10007871B2 (en) | Image processing apparatus, image processing method, and storage medium that converts drawing data generated by an application program into print data to be printed | |
CN115366545B (en) | Character printing method and system for receipt printer | |
US8891112B2 (en) | Information processing apparatus and recording medium for increasing precision in detecting blank space | |
US20160110146A1 (en) | Printing device, control method of a printing device, and storage medium | |
US12008829B2 (en) | System and method for improved OCR efficacy through image segmentation | |
CN104714763A (en) | Method for printing electronic signature on mobile terminal | |
JP2004326659A (en) | Image processor | |
KR101048309B1 (en) | Method and apparatus for printing document |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |
|
RJ01 | Rejection of invention patent application after publication |