CN109062521A - A kind of print data processing method and device, computer installation, storage medium - Google Patents

A kind of print data processing method and device, computer installation, storage medium Download PDF

Info

Publication number
CN109062521A
CN109062521A CN201810802447.9A CN201810802447A CN109062521A CN 109062521 A CN109062521 A CN 109062521A CN 201810802447 A CN201810802447 A CN 201810802447A CN 109062521 A CN109062521 A CN 109062521A
Authority
CN
China
Prior art keywords
vector
character
print data
dot
data
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
CN201810802447.9A
Other languages
Chinese (zh)
Other versions
CN109062521B (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.)
Zhuhai Baiyin Automation Equipment Co ltd
Original Assignee
Zhuhai Smarnet Equipment Co ltd
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 Zhuhai Smarnet Equipment Co ltd filed Critical Zhuhai Smarnet Equipment Co ltd
Priority to CN201810802447.9A priority Critical patent/CN109062521B/en
Publication of CN109062521A publication Critical patent/CN109062521A/en
Application granted granted Critical
Publication of CN109062521B publication Critical patent/CN109062521B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • G06F3/1208Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management

Abstract

The present invention provides a kind of print data processing method and device, computer installation, storage medium, this method comprises: obtaining vector print data;To in vector print data vector artwork and vector character carry out dot matrix conversion respectively, obtain dot lattice printing data;Dot matrix print data is sent to printer.To in vector print data vector artwork and vector character carry out dot matrix conversion respectively, comprising: obtain the corresponding character outline of vector character;Character outline is zoomed in and out with pre-set dimension, obtains the coordinate of the character outline as unit of pixel;Rasterization process is carried out according to coordinate pair character outline;Generate the corresponding dot character of vector character.The device provides execution module for this method.Computer installation has processor, and above-mentioned print data processing method may be implemented when executing program in processor.Storage medium is stored with computer program, to realize above-mentioned print data processing method.Dot-matrix printer printing vector data quality can be improved in the present invention.

Description

A kind of print data processing method and device, computer installation, storage medium
Technical field
The present invention relates to print data process fields, specifically, being related to a kind of print data processing method, further relate to apply The print data processing apparatus of this method.A kind of computer installation for realizing the above method is further related to, further relating to can be real The storage medium of the existing above method.
Background technique
Dot-matrix printer is when being printed, it usually needs the print data of host computer is obtained, and host computer is beaten to dot matrix It include vector print data in the print data that print machine is sent, it is therefore desirable to which vector print data is converted into dot lattice printing number According to being printed.Traditional software for editing is printed by printer driver, can include picture, text by what is editted Vector print data merges processing, is converted into dot lattice printing data so that dot-matrix printer is printed, but this side Text and the picture effect distortion that formula prints are serious, influence printing effect.
Summary of the invention
The first object of the present invention is to provide at a kind of print data of raising dot-matrix printer printing vector data quality Reason method.
The second object of the present invention is to provide at a kind of print data of raising dot-matrix printer printing vector data quality Manage device.
The third object of the present invention is to provide a kind of computer installation of raising dot-matrix printer printing vector data quality.
The fourth object of the present invention is to provide a kind of storage medium of raising dot-matrix printer printing vector data quality.
In order to realize above-mentioned first purpose, print data processing method provided by the invention includes: to obtain vector printing number According to;To in vector print data vector artwork and vector character carry out dot matrix conversion respectively, obtain dot lattice printing data;To beating Print machine sends dot matrix print data.To in vector print data vector artwork and vector character carry out dot matrix conversion respectively, wrap It includes: obtaining the corresponding character outline of vector character;Character outline is zoomed in and out with pre-set dimension, is obtained as unit of pixel The coordinate of character outline;Rasterization process is carried out according to coordinate pair character outline;Generate the corresponding dot character of vector character.
By above scheme as it can be seen that print data processing method of the invention is before carrying out vector data printing, first by vector Data conversion makes the print parameters setting for needing the data fit dot-matrix printer printed, to improve dot matrix at dot array data The print quality of printer printing vector data.In addition, print data includes image data and/or lteral data, pass through difference Dot matrix conversion to vector artwork and vector character, different types of data use different conversion regimes, make dot-matrix printer The vector character come out and vector artwork of printing are more clear, and quality is more preferably.In addition, in the dot matrix conversion for carrying out vector character When, character outline corresponding to character first in acquisition vector character, and processing is zoomed in and out to the character outline of character, it obtains Coordinate after scaling processing carries out rasterization process to character outline corresponding to character after obtaining coordinate information, to generate The corresponding dot character of vector character.Processing is zoomed in and out by the character outline to character, can get character in printing when institute The coordinate data needed, makes the size of character more meet the requirement of printing.It is rasterized additionally by the character outline to character Processing, makes high-resolution vector data be converted into the dot array data of low resolution, so that vector data more coincidence lattice prints The print parameters of machine.
In further embodiment, according to coordinate pair character outline carry out rasterization process, comprising: obtain character outline with Pixel is the intersecting point coordinate of the grid of unit;Pixel filling is carried out to character outline according to preset rules, obtains the word of rasterisation Symbol.
It can be seen that when being rasterized to character outline, it is first determined character outline and the grid as unit of pixel The intersecting point coordinate of lattice determines each pixel to judge distribution situation of the character outline in grid as unit of by pixel Grid falls into the area in character outline, so as to use preset rules to carry out pixel filling to character outline, is rasterized Character.
In further embodiment, in vector print data vector artwork and vector character carry out dot matrix conversion respectively, Include: that vector artwork is subjected to gray processing processing, obtains gray processing picture;Binary conversion treatment is carried out to gray processing picture, is obtained Binaryzation picture;Gaussian filtering is carried out to binaryzation picture;Filtered binaryzation picture is converted to dot matrix picture.
It can be seen that vector artwork is converted into gray processing picture, and to ash when carrying out dot matrix conversion to vector artwork Degreeization picture carries out binary conversion treatment, can filter convenient for vector artwork is converted to dot matrix picture to the picture after binaryzation Wave class hour, binaryzation picture was more smooth, the distortion factor was reduced, so that the quality that vector artwork is converted into dot matrix picture can be improved.
In order to realize above-mentioned second purpose, print data processing apparatus provided by the invention includes: data acquisition module, is used In acquisition vector print data;Data conversion module, for the vector artwork and vector character difference in vector print data Dot matrix conversion is carried out, dot lattice printing data are obtained;Data transmission blocks send dot matrix print data to printer.Data conversion Module in vector print data vector artwork and vector character carry out dot matrix conversion respectively, comprising: obtain vector character pair The character outline answered;Character outline is zoomed in and out with pre-set dimension, obtains the coordinate of the character outline as unit of pixel;Root Rasterization process is carried out according to coordinate pair character outline;Generate the corresponding dot character of vector character.
By above scheme as it can be seen that print data processing apparatus of the invention is before carrying out vector data printing, first by vector Data conversion makes the print parameters setting for needing the data fit dot-matrix printer printed, to improve dot matrix at dot array data The print quality of printer printing vector data.In addition, print data includes image data and/or lteral data, pass through difference Dot matrix conversion to vector artwork and vector character, different types of data use different conversion regimes, make dot-matrix printer The vector character come out and vector artwork of printing are more clear, and quality is more preferably.
In order to realize above-mentioned third purpose, computer installation provided by the invention includes processor, which is used for Each step of above-mentioned print data processing method is realized when executing the computer program stored in memory.
In order to realize above-mentioned 4th purpose, storage medium provided by the invention is stored thereon with computer program, and calculates Machine program realizes each step of above-mentioned print data processing method when being executed by processor.
Detailed description of the invention
Fig. 1 is the flow chart of print data processing method embodiment of the present invention.
Fig. 2 is the effect picture for carrying out rasterization process in print data processing method embodiment of the present invention to character outline.
Fig. 3 is the structural block diagram of print data processing apparatus embodiment of the present invention.
The invention will be further described with reference to the accompanying drawings and embodiments.
Specific embodiment
The intelligent terminal that print data processing method of the invention is applied to carry out data transmission with dot-matrix printer is set It is standby upper, it is preferred that intelligent terminal includes the intelligent terminals such as desktop computer, laptop, tablet computer, mobile phone. Print data processing method, which can be realized, is converted into dot array data for vector data, and is sent to dot array data and is sent to dot lattice printing Machine is printed.Print data processing apparatus of the invention is applied to the intelligent terminal that can carry out data transmission with dot-matrix printer In equipment, and for realizing above-mentioned print data processing method.Also, the present invention also provides a kind of computer installations, should Computer installation includes processor, and processor can be with the instruction of executing application, to realize above-mentioned print data processing Each step of method.Computer program is stored on the storage medium of offer of the invention, and computer program is by processor Each step of above-mentioned print data processing method is realized when execution.
Print data processing method embodiment:
Such as Fig. 1, print data processing method of the invention is first carried out step S1, obtains when carrying out print data processing Take vector print data.In the acquisition for carrying out that vector print data need to be carried out when the processing of vector print data.Obtain vector printing Data can obtain in such a way that data import, or be obtained by way of editor.For example, the editing interface in software passes through The print data importing for importing the virtual key of print data printing for the text or picture that need to print is clicked, to be sweared Measure print data;Or the editor of text and picture is carried out by the editing interface in software, acquisition vector is beaten after completing editor Printing evidence.
After obtaining vector print data, step S2 is executed, to the vector artwork and vector character point in vector print data Not carry out dot matrix conversion, obtain dot lattice printing data.In order to enable printing effect of the vector data in dot-matrix printer more It is good, before being printed, vector print data need to be converted into dot array data, so that the data that need to be printed more coincidence lattice prints The parameter setting of machine.Wherein, include vector artwork and/or vector character in vector print data, therefore carrying out dot matrix conversion When, it needs to carry out dot matrix conversion to vector artwork and to vector character respectively.
To in vector print data vector artwork and vector character carry out dot matrix conversion respectively the step of include: by vector Picture carries out gray processing processing, obtains gray processing picture;Binary conversion treatment is carried out to gray processing picture, obtains binaryzation picture; Gaussian filtering is carried out to binaryzation picture;Filtered binaryzation picture is converted to dot matrix picture.
When executing the step by vector artwork progress gray processing processing, turn the algorithm of gray scale using cromogram rgb pixel Carry out gray processing processing, wherein the algorithm that cromogram rgb pixel turns gray scale is the common knowledge of those skilled in the art, herein It repeats no more.After obtaining gray processing picture, binary conversion treatment is carried out to gray processing picture, it, can benefit when carrying out binary conversion treatment It is carried out with existing known Binarization methods, details are not described herein, in the present embodiment, is shaken and is calculated using Floyd-steinberg Method carries out binaryzation.
After obtaining binaryzation picture, gaussian filtering is carried out to binaryzation picture.In the present embodiment, those skilled in the art is utilized Two-dimensional Gaussian function well known to member carries out gaussian filtering, two-dimensional Gaussian function are as follows:Wherein, x, Y is pixel coordinate, and σ is the standard deviation of Gaussian Profile.When carrying out gaussian filtering, the standard deviation of Gaussian Profile can be set, To construct weight matrix using Gaussian function, and utilize the gray scale of all pixels point in weight matrix calculating binaryzation picture Value, to obtain filtered binaryzation picture.
For example, setting σ=1, the weighted value and weighted average of each pixel are calculated by Gaussian function, filtering half is obtained The weight matrix that diameter is 1 is as follows:
0.07511361 0.12384140 0.07511361
0.12384140 0.20417996 0.12384140
0.07511361 0.12384140 0.07511361
Assuming that the gray value of each pixel is as follows:
11 12 13
35 36 37
18 19 20
The gray value of each pixel obtains the gaussian filtering of central pixel point multiplied by weighted value corresponding in weight matrix Gray value:
0.82624969 1.486096838 0.976476903
4.33444911 7.350478401 4.582131917
1.35204494 2.35298666 1.502272159
It repeats the above steps to all pixels point, then the image after gaussian filtering can be obtained.
In addition, in vector print data vector artwork and vector character carry out dot matrix conversion respectively the step of also wrap It includes: obtaining the corresponding character outline of vector character;Character outline is zoomed in and out with pre-set dimension, is obtained as unit of pixel Coordinate;Rasterization process is carried out according to coordinate pair character outline;Generate the corresponding dot character of vector character.
It include vector character in the vector print data of acquisition, it is therefore, first in the dot matrix conversion for carrying out vector character First obtain the corresponding character outline of vector character.The font of each vector fonts is described by mathematic curve, it is wrapped The borderline key point of font is contained, vector font can then can be obtained by obtaining these mathematical vectors in the derivative information etc. of line Accord with corresponding character outline.
In the present embodiment, the corresponding character outline of vector character is obtained by GetGlyphOutline function.With For TrueType vectorial characters, TrueType file structure has following common information:
head Font head: the global information of font
cmap Character code is mapped as pel index to the mapping of pel by character code
glyf Primitive data: pel outline definition and grid adjustment instruction
maxp Greatest requirements table: required Memory Allocation situation summarizes data in font
loca Position table index: being the position of pel first index translation
name Name table: copyright notice, fontname, font Praenomen, style name etc.
hhea Horizontal layout information
hmtx Level measurement information
post The PostScript FontInfo directory entry and PostScript of all pels
OS/2 The distinctive specification of OS/2 and Windows
When obtaining profile information, the coding mode of vector character need to be determined (such as with the coding staff of standard GB/T 18030 Formula), the corresponding encoded radio of vector character is obtained according to coding mode.Vector is obtained then according to encoded radio inquiry code mapping table The corresponding call number of character finally obtains the initial position of character outline according to call number by GetGlyphOutline function And profile information etc., to obtain the corresponding profile information of vector character.Character is obtained using GetGlyphOutline function Profile is known to the skilled person technology, and details are not described herein.
After getting the corresponding character outline of vector character, character outline is zoomed in and out with pre-set dimension, obtains character Coordinate of the profile as unit of pixel.Pre-set dimension can need the size printed to be set according to the resolution ratio and character of printer It sets.For example, the size that printer resolution is 180dpi and character needs print is 14.5 pounds, then the character outline of character is contracted Character outline after scaling is placed in the grid of 180 pixels of per inch by the character outline for putting into 14.5 pounds of fonts, to obtain Obtain the coordinate of the occupied pixel of character outline.
After obtaining coordinate of the character outline as unit of pixel, rasterization process is carried out according to coordinate pair character outline.Root The step of carrying out rasterization process according to coordinate pair character outline includes: the friendship for obtaining character outline with the grid as unit of pixel Point coordinate;Pixel filling is carried out to character outline according to preset rules, obtains the character of rasterisation.In the profile information got The information such as Bessel line and straightway including profile point coordinate and description profile.When carrying out rasterization process, character wheel Exterior feature is placed in the grid as unit of pixel, and there are intersection points for character outline and grid, obtains intersecting point coordinate.Obtain intersecting point coordinate Afterwards, pixel filling is carried out to character outline according to preset rules, then can get the character of rasterisation.Preset rules can be by program Developer's setting, can also be configured, in the present embodiment, referring to fig. 2, the character outline of character " edge " is placed on by user In grid as unit of pixel, when a certain pixel falls in the area that the area in character outline is greater than the pixel half When, then the pixel is filled as black.
To character outline progress rasterization process, after the character for obtaining rasterisation, the corresponding dot-matrix of vector character is generated Symbol.When the character outline to rasterisation carries out dot matrix conversion, to be placed with the grid as unit of pixel of character outline into Row scanning, when the pixel scanned is filler pixels point, is then denoted as " 1 ", when the pixel scanned is not filled out It when filling pixel, is then denoted as " 0 ", to obtain the dot array data of character.
After obtaining dot lattice printing data, step S3 is executed, sends state confirmation instruction to printer, confirmation printer is in Normal operating conditions.In optional scheme, before sending state confirmation instruction to printer, judge whether and dot-matrix printer Port successful connection.Can by printer side send detection signal, and by whether receive answer signal to determine whether It is successfully connected with dot-matrix printer.In successful connection, inquiry status command is sent to printer, obtains the current fortune of printer Row state, confirmation printer work normally.Printer modes inquiry is the well-known technique of those skilled in the art, no longer superfluous herein It states.
After confirmation printer works normally, step S4 is executed, sends dot matrix print data to printer.Dot-matrix printer Print data can be printed after receiving print data.
It should be noted that step S3 can be executed before step S1, just to arrow after confirmation printer can work normally It measures print data and carries out dot matrix conversion process.For example, after the virtual key that editing interface clicks printing, first to dot lattice printing Machine sends state confirmation instruction, after confirmation printer is in normal operating conditions, turns obtaining vector print data progress dot matrix It changes, sends it to printer after conversion acquisition dot lattice printing data and printed.
Print data processing apparatus embodiment:
Such as Fig. 3, print data processing apparatus of the invention includes that data acquisition module 1, data conversion module 2, state are true Recognize module 3 and data transmission blocks 4.
Data acquisition module 1 is for obtaining vector print data.Vector need to be carried out when carrying out the processing of vector print data The acquisition of print data.Data acquisition module 1 obtains vector print data and can obtain in such a way that data import, or passes through The mode of editor obtains.For example, the editing interface in software will be needed by clicking the virtual key of importing print data printing The text of printing or the print data of picture import, to obtain vector print data;Or pass through the editing interface in software The editor of text and picture is carried out, obtains vector print data after completing editor.
Data conversion module 2 be used for in vector print data vector artwork and vector character carry out respectively dot matrix turn It changes, obtains dot lattice printing data.In order to keep printing effect of the vector data in dot-matrix printer more preferable, printed Before, vector print data need to be converted into dot array data by data conversion module 2, so that the data that need to be printed more coincidence lattice prints The parameter setting of machine.Wherein, include vector artwork and/or vector character in vector print data, therefore carrying out dot matrix conversion When, it needs to carry out dot matrix conversion to vector artwork and to vector character respectively.
Data conversion module 2 in vector print data vector artwork and vector character carry out the step of dot matrix conversion respectively Suddenly include: that vector artwork is subjected to gray processing processing, obtain gray processing picture;Binary conversion treatment is carried out to gray processing picture, is obtained Obtain binaryzation picture;Gaussian filtering is carried out to binaryzation picture;Filtered binaryzation picture is converted to dot matrix picture.
Data conversion module 2 utilizes cromogram rgb pixel when executing the step by vector artwork progress gray processing processing The algorithm for turning gray scale carries out gray processing processing, wherein the algorithm that cromogram rgb pixel turns gray scale is the public affairs of those skilled in the art Know common sense, details are not described herein.After obtaining gray processing picture, data conversion module 2 carries out binary conversion treatment to gray processing picture, When carrying out binary conversion treatment, carried out using existing known Binarization methods, details are not described herein, in the present embodiment, benefit Binaryzation is carried out with Floyd-steinberg dither algorithm.
After obtaining binaryzation picture, data conversion module 2 carries out gaussian filtering to binaryzation picture.In the present embodiment, benefit With well known to a person skilled in the art two-dimensional Gaussian functions to carry out gaussian filtering, two-dimensional Gaussian function are as follows:Wherein, x, y are pixel coordinate, and σ is the standard deviation of Gaussian Profile.When carrying out gaussian filtering, The standard deviation of Gaussian Profile can be set, to construct weight matrix using Gaussian function, and be calculated using weight matrix The gray value of all pixels point in binaryzation picture, to obtain filtered binaryzation picture.
In addition, data conversion module 2 in vector print data vector artwork and vector character carry out respectively dot matrix turn The step of changing further include: obtain the corresponding character outline of vector character;Character outline is zoomed in and out with pre-set dimension, obtain with Pixel is the coordinate of unit;Rasterization process is carried out according to coordinate pair character outline;Generate the corresponding dot character of vector character.
It include vector character in the vector print data of acquisition, therefore, data conversion module 2 is carrying out vector character When dot matrix is converted, the corresponding character outline of vector character is obtained first.The font of each vector fonts is to pass through mathematic curve Come what is described, it contains the borderline key point of font, the derivative information etc. of line, can by obtaining these mathematical vectors, The corresponding character outline of vector character then can be obtained.In the present embodiment, vector character is obtained by GetGlyphOutline function Corresponding character outline obtains character outline using GetGlyphOutline function and is known to the skilled person technology, This is repeated no more.
After data conversion module 2 gets the corresponding character outline of vector character, character outline is carried out with pre-set dimension Scaling obtains coordinate of the character outline as unit of pixel.Pre-set dimension can need to beat according to the resolution ratio and character of printer The size of print is configured.For example, the size that printer resolution is 180dpi and character needs print is 14.5 pounds, then by word The character outline of symbol is scaled to the character outline of 14.5 pounds of fonts, and the character outline after scaling is placed in 180 pixels of per inch Grid in, to obtain the coordinate of the occupied pixel of character outline.
After data conversion module 2 obtains coordinate of the character outline as unit of pixel, carried out according to coordinate pair character outline Rasterization process.The step of data conversion module 2 carries out rasterization process according to coordinate pair character outline includes: to obtain character wheel The wide intersecting point coordinate with the grid as unit of pixel;Pixel filling is carried out to character outline according to preset rules, obtains grating The character of change.It include the letter such as profile point coordinate and the Bessel line and the straightway that describe profile in the profile information got Breath.When carrying out rasterization process, character outline is placed in the grid as unit of pixel data conversion module 2, character wheel Wide there are intersection points with grid, obtain intersecting point coordinate.After obtaining intersecting point coordinate, pixel is carried out to character outline according to preset rules and is filled out It fills, data conversion module 2 then can get the character outline of rasterisation.Preset rules can be arranged by application developer, can also To be configured by user, in the present embodiment, referring to fig. 2, the character outline of character " edge " is placed on the grid as unit of pixel In lattice, when a certain pixel, which falls in the area in character outline, is greater than the area of the pixel half, then the pixel is clicked through Row is filled with black.
After data conversion module 2 carries out rasterization process to character outline, the corresponding dot character of vector character is generated.? When carrying out dot matrix conversion to the character outline of rasterisation, the grid as unit of pixel for being placed with character outline is swept It retouches, when the pixel scanned is filler pixels point, is then denoted as " 1 ", when the pixel scanned is not filling picture It when vegetarian refreshments, is then denoted as " 0 ", to obtain the dot array data of character.
State confirmation module 3 is used to send state confirmation instruction to printer, and confirmation printer is in normal operating conditions. In optional scheme, before state confirmation module 3 sends state confirmation instruction to printer, judge whether and dot-matrix printer Port successful connection.State confirmation module 3 can be by sending detection signal to printer side, and by whether receives response letter Number to determine whether being successfully connected with dot-matrix printer.In successful connection, state confirmation module 3 sends inquiry shape to printer State order, obtains the current operating status of printer, and confirmation printer works normally.Printer modes inquiry is art technology The well-known technique of personnel, details are not described herein.
Data transmission blocks 4 are used to send dot matrix print data to printer.After dot-matrix printer receives print data Print data can be printed.
Computer installation embodiment:
The computer installation of the present embodiment include: processor, memory and storage in memory and can be in processor The computer program of upper operation, such as inquiry and interactive program.Processor realizes above-mentioned print data when executing computer program Step in processing method embodiment.Alternatively, processor realizes that above-mentioned print data processing apparatus is real when executing computer program Apply the function of each module in example.
For example, computer program can be divided into one or more modules, one or more module, which is stored in, is deposited It in reservoir, and is executed by processor, to complete the present invention.One or more modules can be the system that can complete specific function Column count machine program instruction section, the instruction segment is for describing implementation procedure of the computer program in computer installation.
For example, computer installation, which can be mobile phone, desktop PC, notebook and palm PC etc., calculates equipment. Computer installation may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that computer installation can To include more or fewer components, certain components or different components are perhaps combined, such as computer installation can also wrap Include input-output equipment, network access equipment, bus etc..
For example, processor can be central processing unit (Central Processing Unit, CPU), it can also be His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.Processor is the control centre of computer installation, utilizes each portion of various interfaces and the entire computer installation of connection Point.
Memory can be used for storing computer program and/or module, and processor is stored in memory by operation or execution Interior computer program and/or module, and the data being stored in memory are called, realize the various function of computer installation Energy.For example, memory can mainly include storing program area and storage data area, wherein storing program area can storage program area, Application program needed at least one function (such as sound receive capabilities, sound are converted into literal function etc.) etc.;Storing data Area, which can be stored, uses created data (such as audio data, text data etc.) etc. according to mobile phone.In addition, memory can be with It can also include nonvolatile memory, such as hard disk, memory, plug-in type hard disk, intelligence including high-speed random access memory Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Storage medium embodiment:
If the integrated module of the computer installation of above-described embodiment is realized in the form of SFU software functional unit and as only Vertical product when selling or using, can store in a computer readable storage medium.Based on this understanding, it realizes All or part of the process in above-mentioned print data processing method embodiment can also be instructed relevant by computer program Hardware is completed, and computer program can be stored in a computer readable storage medium, which holds by processor When row, it can be achieved that the step of above-mentioned print data processing method embodiment.Wherein, computer program includes computer program generation Code, computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..It deposits Storage media may include: can carry computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that calculating The content that machine readable medium includes can carry out increase and decrease appropriate, example according to the requirement made laws in jurisdiction with patent practice Such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and telecommunications letter Number.
It can be seen from the above, vector data is first converted into dot array data before carrying out vector data printing by the present invention, make to need The print parameters for the data fit dot-matrix printer to be printed are arranged, to improve the printing of dot-matrix printer printing vector data Quality.In addition, print data includes image data and/or lteral data, pass through the point respectively to vector artwork and vector character Battle array conversion, different types of data use different conversion regimes, the vector character and arrow come out for printing dot-matrix printer Spirogram piece is more clear, and quality is more preferably.In addition, obtaining word in vector character first in the dot matrix conversion for carrying out vector character The corresponding character outline of symbol, and processing is zoomed in and out to the character outline of character, the coordinate after obtaining scaling processing is sat Rasterization process is carried out to character outline corresponding to character after marking information, to generate the corresponding dot character of vector character. Processing is zoomed in and out by the character outline to character, the character coordinate data required in printing is can get, makes the big of character The small requirement for more meeting printing.Rasterization process is carried out additionally by the character outline to character, makes high-resolution vector number According to the dot array data for being converted into low resolution, so that the print parameters of vector data more coincidence lattice printer.
It should be noted that the above is only a preferred embodiment of the present invention, but the design concept invented is not limited thereto, All insubstantial modifications made using this design to the present invention, are also fallen within the scope of protection of the present invention.

Claims (10)

1. a kind of print data processing method, comprising: obtain vector print data;To the polar plot in the vector print data Piece and vector character carry out dot matrix conversion respectively, obtain dot lattice printing data;The dot lattice printing data are sent to printer;Its It is characterized in that:
The vector artwork and vector character in the vector print data carries out dot matrix conversion respectively, comprising:
Obtain the corresponding character outline of vector character;
The character outline is zoomed in and out with pre-set dimension, obtains the coordinate of the character outline as unit of pixel;
Rasterization process is carried out according to character outline described in the coordinate pair;
Generate the corresponding dot character of the vector character.
2. print data processing method according to claim 1, it is characterised in that:
The character outline according to the coordinate pair carries out rasterization process, comprising:
Obtain the intersecting point coordinate of the character outline with the grid as unit of pixel;
Pixel filling is carried out to the character outline according to preset rules, obtains the character of rasterisation.
3. print data processing method according to claim 1, it is characterised in that:
The vector artwork and vector character in the vector print data carries out dot matrix conversion respectively, further includes:
The vector artwork is subjected to gray processing processing, obtains gray processing picture;
Binary conversion treatment is carried out to the gray processing picture, obtains binaryzation picture;
Gaussian filtering is carried out to the binaryzation picture;
Filtered binaryzation picture is converted to dot matrix picture.
4. print data processing method according to any one of claims 1 to 3, it is characterised in that:
Before the dot lattice printing data to printer transmission, the method also includes:
State confirmation instruction is sent to the printer, confirms that the printer is in normal operating conditions.
5. a kind of print data processing apparatus, comprising: data acquisition module, for obtaining vector print data;Data conversion mould Block, for in the vector print data vector artwork and vector character carry out dot matrix conversion respectively, obtain dot lattice printing Data;Data transmission blocks send the dot lattice printing data to printer;It is characterized by:
The data conversion module in the vector print data vector artwork and vector character carry out dot matrix conversion respectively, Include:
Obtain the corresponding character outline of vector character;
The character outline is zoomed in and out with pre-set dimension, obtains the coordinate of the character outline as unit of pixel;
Rasterization process is carried out according to character outline described in the coordinate pair;
Generate the corresponding dot character of the vector character.
6. print data processing apparatus according to claim 5, it is characterised in that:
Data conversion module character outline according to the coordinate pair carries out rasterization process, comprising:
Obtain the intersecting point coordinate of the character outline with the grid as unit of pixel;
Pixel filling is carried out to the character outline according to preset rules, obtains the character of rasterisation.
7. print data processing apparatus according to claim 5, it is characterised in that:
The data conversion module in the vector print data vector artwork and vector character carry out dot matrix conversion respectively, Further include:
The vector artwork is subjected to gray processing processing, obtains gray processing picture;
Binary conversion treatment is carried out to the gray processing picture, obtains binaryzation picture;
Gaussian filtering is carried out to the binaryzation picture;
Filtered binaryzation picture is converted to dot matrix picture.
8. according to the described in any item print data processing apparatus of claim 5 to 7, it is characterised in that:
Described device further include:
State confirmation module, for being sent to the printer before the dot lattice printing data to printer transmission State confirmation instruction, confirms that the printer is in normal operating conditions.
9. a kind of computer installation, it is characterised in that: the computer installation includes processor, and the processor is deposited for executing The step of the print data processing method as described in any one of Claims 1-4 is realized when the computer program stored in reservoir Suddenly.
10. a kind of storage medium, is stored thereon with computer program, it is characterised in that: the computer program is held by processor It is realized when row as described in any one of Claims 1-4 the step of print data processing method.
CN201810802447.9A 2018-07-20 2018-07-20 Print data processing method and device, computer device and storage medium Active CN109062521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810802447.9A CN109062521B (en) 2018-07-20 2018-07-20 Print data processing method and device, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810802447.9A CN109062521B (en) 2018-07-20 2018-07-20 Print data processing method and device, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN109062521A true CN109062521A (en) 2018-12-21
CN109062521B CN109062521B (en) 2022-05-27

Family

ID=64817587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810802447.9A Active CN109062521B (en) 2018-07-20 2018-07-20 Print data processing method and device, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN109062521B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109901803A (en) * 2019-03-12 2019-06-18 江苏沁恒股份有限公司 Mini-printer superadd-print processing method and computer readable storage medium
CN110134347A (en) * 2019-04-30 2019-08-16 深圳市雄帝科技股份有限公司 Image processing method, device, computer equipment and storage medium
CN110784773A (en) * 2019-11-26 2020-02-11 北京奇艺世纪科技有限公司 Bullet screen generation method and device, electronic equipment and storage medium
CN111080664A (en) * 2019-12-30 2020-04-28 合肥联宝信息技术有限公司 Data processing method and device, computer storage medium and computer
CN111752491A (en) * 2019-03-26 2020-10-09 上海宝信软件股份有限公司 Multifunctional dot matrix mark application system and method
CN111813350A (en) * 2020-05-29 2020-10-23 厦门汉印电子技术有限公司 Printing data sending method, device, equipment and storage medium
CN113268207A (en) * 2021-05-12 2021-08-17 武汉先同科技有限公司 Printing control method and system based on image processing technology
CN113362427A (en) * 2021-06-29 2021-09-07 深圳市创想三维科技股份有限公司 Contour generation method and device for bevel edge three-dimensional character, computer equipment and medium
CN113442598A (en) * 2020-03-27 2021-09-28 湖南鼎一致远科技发展有限公司 Thermal transfer printer
CN113806278A (en) * 2021-09-13 2021-12-17 珠海趣印科技有限公司 Word stock chip processing method capable of arbitrarily changing vector word stock and word stock chip

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6327950A (en) * 1986-07-22 1988-02-05 Toshiba Corp Display control system
CN1169561A (en) * 1996-04-22 1998-01-07 惠普公司 Method and apparatus for adaptive adjustment of cache altocation for storage of font data by super-high-speed buffer registor
CN101145243A (en) * 2006-09-15 2008-03-19 精工爱普生株式会社 Method and apparatus for preserving font structure
CN102476507A (en) * 2010-11-23 2012-05-30 天津中兴软件有限责任公司 Printing method of thermal printer
CN103177709A (en) * 2011-12-20 2013-06-26 北大方正集团有限公司 Method and device for displaying characters
CN103631545A (en) * 2013-11-26 2014-03-12 深圳市科曼医疗设备有限公司 Printing method and system
CN106274088A (en) * 2016-08-16 2017-01-04 江苏科技大学 Thermal-sensitive printer printing velocity optimization method based on timeslice segmentation
CN106313907A (en) * 2016-08-16 2017-01-11 江苏科技大学 Thermal printer text printing method and thermal printer text printing system based on image conversion

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6327950A (en) * 1986-07-22 1988-02-05 Toshiba Corp Display control system
CN1169561A (en) * 1996-04-22 1998-01-07 惠普公司 Method and apparatus for adaptive adjustment of cache altocation for storage of font data by super-high-speed buffer registor
CN101145243A (en) * 2006-09-15 2008-03-19 精工爱普生株式会社 Method and apparatus for preserving font structure
CN102476507A (en) * 2010-11-23 2012-05-30 天津中兴软件有限责任公司 Printing method of thermal printer
CN103177709A (en) * 2011-12-20 2013-06-26 北大方正集团有限公司 Method and device for displaying characters
CN103631545A (en) * 2013-11-26 2014-03-12 深圳市科曼医疗设备有限公司 Printing method and system
CN106274088A (en) * 2016-08-16 2017-01-04 江苏科技大学 Thermal-sensitive printer printing velocity optimization method based on timeslice segmentation
CN106313907A (en) * 2016-08-16 2017-01-11 江苏科技大学 Thermal printer text printing method and thermal printer text printing system based on image conversion

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
叶以民: "Chinese TrueType Font Support in X Window", 《JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY》 *
李大森: "基于打印指令的检测数据快速解析与输出系统研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109901803A (en) * 2019-03-12 2019-06-18 江苏沁恒股份有限公司 Mini-printer superadd-print processing method and computer readable storage medium
CN111752491A (en) * 2019-03-26 2020-10-09 上海宝信软件股份有限公司 Multifunctional dot matrix mark application system and method
CN110134347B (en) * 2019-04-30 2022-08-16 深圳市雄帝科技股份有限公司 Image processing method, image processing device, computer equipment and storage medium
CN110134347A (en) * 2019-04-30 2019-08-16 深圳市雄帝科技股份有限公司 Image processing method, device, computer equipment and storage medium
CN110784773A (en) * 2019-11-26 2020-02-11 北京奇艺世纪科技有限公司 Bullet screen generation method and device, electronic equipment and storage medium
CN111080664A (en) * 2019-12-30 2020-04-28 合肥联宝信息技术有限公司 Data processing method and device, computer storage medium and computer
CN111080664B (en) * 2019-12-30 2022-03-08 合肥联宝信息技术有限公司 Data processing method and device, computer storage medium and computer
CN113442598B (en) * 2020-03-27 2023-01-24 湖南鼎一致远科技发展有限公司 Thermal transfer printer
CN113442598A (en) * 2020-03-27 2021-09-28 湖南鼎一致远科技发展有限公司 Thermal transfer printer
CN111813350A (en) * 2020-05-29 2020-10-23 厦门汉印电子技术有限公司 Printing data sending method, device, equipment and storage medium
CN111813350B (en) * 2020-05-29 2022-12-13 厦门汉印电子技术有限公司 Method, device and equipment for sending print data and storage medium
CN113268207A (en) * 2021-05-12 2021-08-17 武汉先同科技有限公司 Printing control method and system based on image processing technology
CN113362427A (en) * 2021-06-29 2021-09-07 深圳市创想三维科技股份有限公司 Contour generation method and device for bevel edge three-dimensional character, computer equipment and medium
CN113362427B (en) * 2021-06-29 2024-03-15 深圳市创想三维科技股份有限公司 Contour generation method, device, computer equipment and medium for hypotenuse three-dimensional word
CN113806278A (en) * 2021-09-13 2021-12-17 珠海趣印科技有限公司 Word stock chip processing method capable of arbitrarily changing vector word stock and word stock chip

Also Published As

Publication number Publication date
CN109062521B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN109062521A (en) A kind of print data processing method and device, computer installation, storage medium
JP4261558B2 (en) Image processing method
KR20190109732A (en) Method and apparatus for synthesizing kanji printed characters images
EP0786757B1 (en) Adjusting contrast in antialiasing
EP0320755A2 (en) Image processing system and method employing combined black and white and gray scale image data
EP3882822A1 (en) Encoded pattern processing method and device , storage medium and electronic device
US20070104350A1 (en) Watermarked information embedding apparatus
CN101331520A (en) Stroke contrast in font hinting
JPH08106276A (en) Display method of text on screen
US6614432B1 (en) Image rendering technique
JP2013061660A (en) Method for generating stroke-based font character for low-resolution display
JP4162670B2 (en) How to generate a silhouetted gray font
JP2018116442A (en) Print control device, page data correction method, raster data generation method, page data correction program, and raster data generation program
JPH05143742A (en) Vector image drawing device
JP4873554B2 (en) Image distribution apparatus and image distribution method
JP4259949B2 (en) Image creating apparatus, image creating program, and recording medium
JP2015115957A (en) Binary periodic to multibit aperiodic halftone and resolution conversion
JP2000500705A (en) Alignment of machine readable codes to printer pixels
JP3952188B2 (en) Image interpolation apparatus, image interpolation method, and image interpolation program
JP2919712B2 (en) Character generation method and apparatus
EP2966596A1 (en) Method for printing a grayscale raster image
CN112162713A (en) File printing method, system and server
CN108898641B (en) Machine-recognizable pattern generation method, generation device, and computer-readable storage medium
JP4259950B2 (en) Image recognition apparatus, image recognition program, and recording medium
JP7327810B2 (en) Image generation program, character recognition system, image generation method, image generation device, and character recognition model

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240204

Address after: 519000 Zone G, second floor, No. 1 plant, No. 15, Nanping Pingbei Second Road, Xiangzhou District, Zhuhai City, Guangdong Province

Patentee after: Zhuhai Baiyin automation equipment Co.,Ltd.

Country or region after: China

Address before: 519000 C area B District, 5 A, 168 building, 168 Road, Yi Sha Road, Ping Sha town, Zhuhai, Guangdong.

Patentee before: ZHUHAI SMARNET EQUIPMENT CO.,LTD.

Country or region before: China