CN109615803A - A kind of data-printing method and device - Google Patents
A kind of data-printing method and device Download PDFInfo
- Publication number
- CN109615803A CN109615803A CN201811171371.0A CN201811171371A CN109615803A CN 109615803 A CN109615803 A CN 109615803A CN 201811171371 A CN201811171371 A CN 201811171371A CN 109615803 A CN109615803 A CN 109615803A
- Authority
- CN
- China
- Prior art keywords
- data
- printing
- printed
- print media
- 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
- G07—CHECKING-DEVICES
- G07G—REGISTERING THE RECEIPT OF CASH, VALUABLES, OR TOKENS
- G07G5/00—Receipt-giving machines
-
- 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/1208—Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
-
- 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/1242—Image or content composition onto a page
- G06F3/1243—Variable data printing, e.g. document forms, templates, labels, coupons, advertisements, logos, watermarks, transactional printing, fixed content versioning
-
- 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/125—Page layout or assigning input pages onto output media, e.g. imposition
- G06F3/1251—Page layout or assigning input pages onto output media, e.g. imposition for continuous media, e.g. web media, rolls
-
- 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
- G06F3/1257—Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Record Information Processing For Printing (AREA)
Abstract
This application discloses a kind of data-printing methods, comprising: obtains data to be printed;According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing template is suitable for the print media of sizes;Obtain the size for printing the print media of the data to be printed;According to the data to be printed, the printing template, the size of the print media, the page layout information for being directed to the print media is generated;According to the data to be printed and the page layout information, the print command for printing the data to be printed is generated;Export the print command.It solves the problems, such as to be easy error when printing template modification.
Description
Technical field
This application involves field of computer technology, and in particular to a kind of data-printing method, apparatus, electronic equipment and storage
Equipment.
Background technique
It by data-printing at label is normal in catering system currently, data-printing is widely used in all trades and professions
See one of scene.For example, drink information is printed on label, then label is pasted on cup;Alternatively, printing reckoning,
Pre- statement of account etc..These scenes use label machine to carry out data-printing more.
When being printed using label machine, the size according to label print media (i.e. label printing paper) is generally required
Configure printing template, i.e., the print media of different sizes or different size corresponds to different printing templates.In actual environment, mark
Label printing paper size is various, such as 30mm*20mm, 30mm*40mm, 40mm*50mm.If the label of businessman's selection sizes
Printing paper, when needing to modify printing template, technical staff just needs to carry out to suitable for various sizes of a variety of printing templates
Adaptation, to provide the printing template of correspondingly-sized.For example, the label printing paper of two kinds of sizes of the Liang Ge shops of businessman prints in advance
The statement of account needs to modify the corresponding two kinds of printing templates of the pre- statement of account simultaneously when businessman will modify the template of the pre- statement of account.To with a dozen
Print type is related to a variety of printing template modifications when modifying, process is cumbersome to be easy error.
Summary of the invention
The application provides a kind of data-printing method, to be easy error when solving the problems, such as printing template modification.
The application provides a kind of data-printing method, comprising:
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing
Template is suitable for the print media of sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for printing Jie
The page layout information of matter;
According to the data to be printed and the page layout information, generate for printing beating for the data to be printed
Print instruction;
Export the print command.
It is optionally, described to obtain data to be printed, comprising:
Obtain the start command of print out task;
According to the start command of the print out task, data to be printed are obtained.
Optionally, the start command according to the print out task, obtains data to be printed, comprising:
According to the start command of the print out task, inquiry needs the information printed;
The information printed is needed to be converted into format print data by described;
The format print data are determined as the data to be printed.
Optionally, described to determine the printing template for printing the data to be printed according to the data to be printed, packet
It includes:
Determine the corresponding printing type of data to be printed;
It is index with the corresponding printing type of the data to be printed, inquires printing template corresponding with the index;
It is determined as printing template corresponding with the index to be used to print the printing template of the data to be printed.
Optionally, the data to be printed include data category;The corresponding printing type of the determination data to be printed, packet
It includes:
According to the data category that the data to be printed include, the printing type of the data to be printed is determined.
Optionally, the corresponding printing type of determination data to be printed, comprising:
The data to be printed are sorted out;
According to type belonging to the data to be printed sorted out, the printing type of the data to be printed is determined.
Optionally, the type according to belonging to the data to be printed sorted out determines the printing of the data to be printed
Type, comprising:
According to type belonging to the data to be printed sorted out and it is described printing type corresponding relationship, determine described in
The printing type of data to be printed.
Optionally, the corresponding printing type of determination data to be printed, comprising:
The data to be printed are sorted out according to the printing type, determine the corresponding printing class of data to be printed
Type.
Optionally, the size obtained for printing the print media of the data to be printed, comprising:
Obtain the information of the printing entity for printing the data to be printed;
According to the information of the printing entity, the printing configuration information for being used for the print data is determined;
According to the printing configuration information, the size of the print media is obtained.
Optionally, described according to the data to be printed, the printing template, the size of the print media, generate needle
To the page layout information of the print media, comprising:
The print data is filled into the printing template, generates printing content;According to the size of the print media
The printing content is adjusted, the page layout information for being directed to the print media is generated.
Optionally, described that the print data is filled into the printing template, generate printing content, comprising:
Template identifier is identified from the printing template;
The template identifier is replaced using the data to be printed, obtains the printing content.
Optionally, described that content is printed according to the size adjusting of the print media, it generates and is situated between for the printing
The page layout information of matter, comprising:
The print attribute information of the printing content is determined according to the printing template;
According to the size of the print media, the print attribution of the printing content is adjusted, is generated for described
The page layout information of print media.
Optionally, the size according to the print media is adjusted the print attribution of the printing content, raw
At the page layout information for being directed to the print media, comprising:
The width and height of the print media are obtained according to the size of the print media;
According to the width of the printing content, the print attribute information of the printing content and the label print media
And height, determine the page layout information of the printing content.
Optionally, the print attribute information, including a kind of at least following information: font information, line space information;
The size according to the print media is adjusted the print attribution of the printing content, and generation is directed to
The page layout information of the print media, comprising: carried out according to font or line space of the preset ratio to the printing content
Adjustment generates the page layout information for being directed to the print media.
Optionally, the size according to the print media is adjusted the print attribution of the printing content, raw
At the page layout information for being directed to the print media, comprising:
Determine the different degree of the field of the printing content;
According to the size of the print media, the different degree of the field of the printing content, the printing content is beaten
Print attribute is adjusted, and generates the page layout information for being directed to the print media.
Optionally, described according to the data to be printed and the page layout information, generate for print it is described to
The print command of print data, comprising:
Obtain the format information of print command;
According to the data to be printed, the page layout information and the format information of the print command, generates and use
In the print command for printing the data to be printed.
The application provides a kind of data-printing device, comprising:
Data capture unit, for obtaining data to be printed;
Printing template determination unit, for determining for printing the data to be printed according to the data to be printed
Printing template;Wherein, the printing template is suitable for the print media of sizes;
Print media specification acquiring unit, for obtaining the size of the print media for printing the data to be printed;
Page layout determination unit, for according to the data to be printed, the printing template, the print media ruler
It is very little, generate the page layout information for being directed to the print media;
Print command generation unit, for being used for according to the data to be printed and the page layout information, generation
Print the print command of the data to be printed;
Output unit, for exporting the print command.
The application provides a kind of electronic equipment, comprising:
Memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing
Template is suitable for the print media of sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for printing Jie
The page layout information of matter;
According to the data to be printed and the page layout information, generate for printing beating for the data to be printed
Print instruction;
Export the print command.
The application provides a kind of storage equipment, is stored with instruction, and described instruction can be loaded by processor and be executed following
Step:
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing
Template is suitable for the print media of sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for printing Jie
The page layout information of matter;
According to the data to be printed and the page layout information, generate for printing beating for the data to be printed
Print instruction;
Export the print command.
Compared with prior art, the application has the following advantages:
Data-printing method provided by the present application, by determining printing template according to data to be printed;According to number to be printed
According to, printing template, the size of print media, generate be directed to the print media page layout information;It further generates and is used for
Print the print command of the data to be printed;Printing template is suitable for a variety of stamps with the size, when businessman selects sizes
Print media, when having the modification demand for a type of printing template, it is only necessary to modify the printing template of the type, energy
Suitable for various sizes of a variety of print media, to be easy error when solving the problems, such as printing template modification.
Detailed description of the invention
Fig. 1 is a kind of deployed environment for the data-printing method that the application first embodiment provides;
Fig. 2 is the process flow diagram for the data-printing method that the application first embodiment provides;
Fig. 3 is a kind of timing diagram for specific embodiment that the application first embodiment provides;
Fig. 4 is the data-printing schematic device that the application second embodiment provides;
Fig. 5 is the electronic equipment schematic diagram that the application 3rd embodiment provides.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides a kind of data-printing method, apparatus, electronic equipment and storage equipment.In the following embodiments
It is described in detail one by one.
The application first embodiment provides a kind of data-printing method.Below in conjunction with Fig. 1 to Fig. 3 to the data method into
Row explanation.
It is raw according to data to be printed, printing template, the size of print media in data-printing method provided by the present application
At the page layout information for being directed to the print media;The print command for printing the data to be printed is further generated,
And export the print command.In practical application, the method can be deployed in calculating equipment.Referring to FIG. 1, Fig. 1 is shown
A kind of deployed environment of data-printing method provided by the present application.Equipment 101 is calculated in figure disposes the data-printing method;Meter
Calculating equipment 101 can be computer, be also possible to POS (Point of Sale, point-of-sale terminal) device of businessman.Print entity
102, for printing to data, can be printer or label machine.The data to be printed that data-printing is related to can be with
It is to calculate equipment 101 and provide to be also possible to other entity (such as server, database) offers for possessing data to be printed;Data
Calculating 101 local storage space of equipment can be stored in by printing the printing template used, and can also be stored in server-side or number
According to library, obtained during executing the data-printing method by calculating equipment 101.
Data-printing method shown in Fig. 2, comprising: step S201 to step S206.
S201 obtains data to be printed.
This step is to obtain data to be printed.
In the embodiment of the present application, it is illustrated so that the POS device of food and drink businessman A disposes the data-printing method as an example.
POS device connects label machine, and data to be printed are printed as label by label machine, to be printed as the data of label
Content includes following at least one contents: drink information, dish information, pre- point single (that orders in advance checks and accepts document), pre- knot
Single (i.e. cashier exported before checkout the statement for reconciliation), reckoning, settle accounts receipt, member card billing information.Example
Such as, reckoning includes vegetable list, amount of money list;Dish information includes way list, taste list etc..The class of data to be printed
Type may include: text, picture, two dimensional code, bar code.
In the embodiment of the present application, the database connected from POS device obtains data to be printed.Using following processing obtain to
Print data:
Obtain the start command of print out task;
According to the start command of the print out task, data to be printed are obtained.
Wherein, the start command according to the print out task, obtains data to be printed, comprising:
According to the start command of the print out task, inquiry needs the information printed;
The information printed is needed to be converted into format print data by described;
The format print data are determined as the data to be printed.
S102 determines the printing template for printing the data to be printed according to the data to be printed;Wherein, institute
State the print media that printing template is suitable for sizes.
This step is the printing template obtained for printing the data to be printed.
Printing template can be with JSON (JavaScript Object Notation, JS object numbered musical notation) format, XML
The structured data formats such as (eXtensible Markup Language, extensible markup language) format are stored.This Shen
It please be in embodiment, in a specific embodiment, including using following processing generation printing template: according to presetting impression block
Plate gauge then generates printing template.It specifically includes: providing form of type information, such as text, picture, bar code, two dimensional code etc.;
The attribute for determining different type informations, including at least one following: the print position of different type informations, width, height, alignment
Mode, spacing and print conditions.
In the embodiment of the present application, a specific embodiment is that printing template is stored in server-side, can be on webpage
Printing template is edited and saves, by disposing the calculating equipment of the data-printing method, such as POS device or computer,
Printing template is obtained, so as to subsequent further according in the content of printing template and the data to be printed of actual needs printing
Hold, by the content mergence to printing template of data to be printed, prepares for practical printing.
The another embodiment of the embodiment of the present application is determined using following processing for printing the number to be printed
According to printing template:
Determine the corresponding printing type of data to be printed;
It is index with the corresponding printing type of the data to be printed, inquires printing template corresponding with the index;
It is determined as printing template corresponding with the index to be used to print the printing template of the data to be printed.
Wherein, if the data to be printed include data category, the data class for including according to the data to be printed
Not, the printing type of the data to be printed is determined.If in the data to be printed not including data category, by treating
The mode that print data is sorted out determines the printing type of data to be printed.It, can be by there is supervision in the embodiment of the present application
Sort out or the mode of learning of unsupervised classification is treated print data and sorted out.One mode of learning by unsupervised classification is true
Determine the concrete mode of the corresponding printing type of data to be printed, including following processing: the data to be printed are sorted out;Root
According to type belonging to the data to be printed sorted out, determine the printing type of the data to be printed, specifically, according to it is described
The corresponding relationship of type belonging to the data to be printed sorted out and the printing type, determines the printing class of the data to be printed
Type.Another passes through the concrete mode that the mode of learning for having supervision to sort out determines the corresponding printing type of data to be printed, including
Following processing: the data to be printed are sorted out according to the printing type, determine the corresponding printing class of data to be printed
Type.
S103 obtains the size for printing the print media of the data to be printed.
This step is to obtain the size of print media.
The print media is the medium for printing data to be printed.For example, printing paper, label printing paper, printing paper.
In practical application, print media includes a variety of different sizes or different size, such as label printing paper by have 30mm*20mm,
30mm*40mm, 40mm*50mm etc..Using the print media of which kind of size or specification be usually according to different printer or
Different printing demand determines, for example, larger-size print media can be used for printing the information of larger font, gives user
Experience effect can be relatively good, and the lesser print media possible price of size is cheap and good cost performance.Sometimes for same
Type printing document similarly prints content, and businessman may also use various sizes of print media according to different scenes.
In the embodiment of the present application, the ruler for printing the print media of the data to be printed is obtained by following processing
It is very little:
Obtain the information of the printing entity for printing the data to be printed;
According to the information of the printing entity, the printing configuration information for being used for the print data is determined;
According to the printing configuration information, the size of the print media is obtained.
For example, the model of printer and the configuration information of printer are got, to get the ruler of the printing paper used
It is very little.
S104 is generated according to the data to be printed, the printing template, the size of the print media for described
The page layout information of print media.
This step is that the size based on data to be printed, printing template, print media is generated for the print media
Page layout information.
In the embodiment of the present application, the page layout information for being directed to the print media is generated by following processing: will be described
Print data is filled into the printing template, generates printing content;In the printing according to the size adjusting of the print media
Hold, generates the page layout information for being directed to the print media.Page cloth is determined based on the size of printing template and print media
Office's information can make same type printing document correspond to sizes print media, it is only necessary to configure a printing template.Afterwards
When continuous step generates print command, the print command of corresponding different size marking media can be generated, it is multiple without being adapted to
Printing template.
Wherein, printing content is generated by following processing:
Template identifier is identified from the printing template;
The template identifier is replaced using the data to be printed, obtains the printing content.
In the embodiment of the present application, a specific embodiment according to the size adjusting of the print media by printing
Content generates the page layout information for being directed to the print media:
The print attribute information of the printing content is determined according to the printing template;
According to the size of the print media, the print attribution of the printing content is adjusted, is generated for described
The page layout information of print media.
Wherein, it is adjusted using print attribution of following processing to the printing content, generates and be situated between for the printing
The page layout information of matter:
The width and height of the print media are obtained according to the size of the print media;
According to the width of the printing content, the print attribute information of the printing content and the label print media
And height, determine the page layout information of the printing content.
In a specific embodiment provided by the embodiments of the present application, the print attribute information, including at least following one
Kind information: font information, line space information;Correspondingly, according to preset ratio to it is described printing content font or line space into
Row adjustment, generates the page layout information for being directed to the print media.
In another embodiment provided by the embodiments of the present application, the significance level according to the field of printing content is true
Determine page layout information, specifically include:
Determine the different degree of the field of the printing content;
According to the size of the print media, the different degree of the field of the printing content, the printing content is beaten
Print attribute is adjusted, and generates the page layout information for being directed to the print media.
S105 is generated according to the data to be printed and the page layout information for printing the number to be printed
According to print command.
This step is to generate print command.
In the embodiment of the present application, the print command for printing the data to be printed is generated by following processing
Obtain the format information of print command;
According to the data to be printed, the page layout information and the format information of the print command, generates and use
In the print command for printing the data to be printed.
In the embodiment of the present application, the print command of different-format can be generated for different printers.For example, generating TSPL
(telephone system programming language) print command.
S106 exports the print command.
This step is output print command.
Print command is exported in the embodiment of the present application and gives printing entity, for example, printer or label machine.With label
For printer.Label machine receives print command, by data-printing to be printed at label.Continue to use the example of food and drink businessman A
Son.Fig. 3 shows data-printing method described in the POS device actual deployment of food and drink businessman A, by data-printing to be printed at label
Timing diagram, wherein in figure 3.1 and 3.2 shown in processing be that the processing steps of data to be printed is obtained in practical application.Figure
In include:
3.1 cashiers start print out task, and POS device receives the command triggers of print out task, such as triggering printing reckoning.
3.2POS device obtains data to be printed from the database of connection, such as obtains the reckoning, such as inquiry dish
Product list, the amount of money, using the information such as preferential, further include being pre-processed to the obtained primary data of inquiry, according to pre- further
If format is converted to format print data.
3.3 obtain printing template, for example, the printing type for determining data to be printed is reckoning, then obtain from database
Take the printing template of corresponding reckoning.
3.4 generate print command, comprising: generate corresponding print media sizes or rule according to data to be printed and printing template
The print command of lattice.
3.5 send print command, for example, print command is sent to printer.
Corresponding with the application first embodiment, the application second embodiment additionally provides a kind of data-printing device.
Referring to Fig. 4, it illustrates the data-printing schematic devices provided according to the application second embodiment.Due to device
Embodiment is substantially similar to embodiment of the method, so describing fairly simple, relevant part refers to pair of embodiment of the method
It should illustrate.
Data-printing device shown in Fig. 4, comprising:
Data capture unit 401, for obtaining data to be printed;
Printing template determination unit 402, for determining for printing the data to be printed according to the data to be printed
Printing template;Wherein, the printing template is suitable for the print media of sizes;
Print media specification acquiring unit 403, for obtaining the ruler of the print media for printing the data to be printed
It is very little;
Page layout determination unit 404, for according to the data to be printed, the printing template, the print media
Size, generate be directed to the print media page layout information;
Print command generation unit 405, for generating and using according to the data to be printed and the page layout information
In the print command for printing the data to be printed;
Output unit 406, for exporting the print command.
Wherein, the data capture unit 401 is specifically used for:
Obtain the start command of print out task;
According to the start command of the print out task, data to be printed are obtained.
Wherein, the data capture unit 401 is specifically used for:
According to the start command of the print out task, inquiry needs the information printed;
The information printed is needed to be converted into format print data by described;
The format print data are determined as the data to be printed.
Wherein, the printing template determination unit 402 is specifically used for:
Determine the corresponding printing type of data to be printed;
It is index with the corresponding printing type of the data to be printed, inquires printing template corresponding with the index;
It is determined as printing template corresponding with the index to be used to print the printing template of the data to be printed.
Wherein, the data to be printed include data category;The printing template determination unit 402 is specifically used for: according to
The data category that the data to be printed include determines the printing type of the data to be printed.
Wherein, printing template determination unit 402 includes sorting out subelement, and the classification subelement is used for:
The data to be printed are sorted out;
According to type belonging to the data to be printed sorted out, the printing type of the data to be printed is determined.
Wherein, the classification subelement is specifically used for:
According to type belonging to the data to be printed sorted out and it is described printing type corresponding relationship, determine described in
The printing type of data to be printed.
Wherein, the classification subelement is specifically used for:
The data to be printed are sorted out according to the printing type, determine the corresponding printing class of data to be printed
Type.
Wherein, the print media specification acquiring unit 403 is specifically used for:
Obtain the information of the printing entity for printing the data to be printed;
According to the information of the printing entity, the printing configuration information for being used for the print data is determined;
According to the printing configuration information, the size of the print media is obtained.
Wherein, the page layout determination unit 404 is specifically used for:
The print data is filled into the printing template, generates printing content;According to the size of the print media
The printing content is adjusted, the page layout information for being directed to the print media is generated.
Wherein, the page layout determination unit 404 is specifically used for:
Template identifier is identified from the printing template;
The template identifier is replaced using the data to be printed, obtains the printing content.
Wherein, the page layout determination unit 404 is specifically used for:
The print attribute information of the printing content is determined according to the printing template;
According to the size of the print media, the print attribution of the printing content is adjusted, is generated for described
The page layout information of print media.
Wherein, the page layout determination unit 404 is specifically used for:
The width and height of the print media are obtained according to the size of the print media;
According to the width of the printing content, the print attribute information of the printing content and the label print media
And height, determine the page layout information of the printing content.
Wherein, the print attribute information, including a kind of at least following information: font information, line space information;
The page layout determination unit 404 is specifically used for: according to preset ratio to the font or row of the printing content
Spacing is adjusted, and generates the page layout information for being directed to the print media.
Wherein, the page layout determination unit 404 is specifically used for:
Determine the different degree of the field of the printing content;
According to the size of the print media, the different degree of the field of the printing content, the printing content is beaten
Print attribute is adjusted, and generates the page layout information for being directed to the print media.
Wherein, the print command generation unit 405 is specifically used for:
Obtain the format information of print command;
According to the data to be printed, the page layout information and the format information of the print command, generates and use
In the print command for printing the data to be printed.
The application 3rd embodiment additionally provides a kind of electronic equipment for realizing the data-printing method, referring to figure
5, it illustrates the schematic diagrames for a kind of electronic equipment that the application 3rd embodiment provides.
The electronic equipment embodiment provided by the present application describes fairly simple, and relevant part refers to above-mentioned first
The corresponding explanation of embodiment.
Electronic equipment shown in fig. 5, comprising:
Memory 501 and processor 502;
The memory 501 is for storing computer executable instructions, and the processor 502 is for executing the computer
Executable instruction:
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing
Template is suitable for the print media of sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for printing Jie
The page layout information of matter;
According to the data to be printed and the page layout information, generate for printing beating for the data to be printed
Print instruction;
Export the print command.
Optionally, the processor 502 is also used to execute following computer executable instructions:
Obtain the start command of print out task;
According to the start command of the print out task, data to be printed are obtained.
Optionally, the processor 502 is also used to execute following computer executable instructions:
According to the start command of the print out task, inquiry needs the information printed;
The information printed is needed to be converted into format print data by described;
The format print data are determined as the data to be printed.
Optionally, the processor 502 is also used to execute following computer executable instructions:
Determine the corresponding printing type of data to be printed;
It is index with the corresponding printing type of the data to be printed, inquires printing template corresponding with the index;
It is determined as printing template corresponding with the index to be used to print the printing template of the data to be printed.
Optionally, the data to be printed include data category;The processor 502 is also used to execute following computers can
It executes instruction:
According to the data category that the data to be printed include, the printing type of the data to be printed is determined.
Optionally, the processor 502 is also used to execute following computer executable instructions:
The data to be printed are sorted out;
According to type belonging to the data to be printed sorted out, the printing type of the data to be printed is determined.
Optionally, the processor 502 is also used to execute following computer executable instructions:
According to type belonging to the data to be printed sorted out and it is described printing type corresponding relationship, determine described in
The printing type of data to be printed.
Optionally, the processor 502 is also used to execute following computer executable instructions:
The data to be printed are sorted out according to the printing type, determine the corresponding printing class of data to be printed
Type.
Optionally, the processor 502 is also used to execute following computer executable instructions:
Obtain the information of the printing entity for printing the data to be printed;
According to the information of the printing entity, the printing configuration information for being used for the print data is determined;
According to the printing configuration information, the size of the print media is obtained.
Optionally, the processor 502 is also used to execute following computer executable instructions:
The print data is filled into the printing template, generates printing content;According to the size of the print media
The printing content is adjusted, the page layout information for being directed to the print media is generated.
Optionally, the processor 502 is also used to execute following computer executable instructions:
Template identifier is identified from the printing template;
The template identifier is replaced using the data to be printed, obtains the printing content.
Optionally, the processor 502 is also used to execute following computer executable instructions:
The print attribute information of the printing content is determined according to the printing template;
According to the size of the print media, the print attribution of the printing content is adjusted, is generated for described
The page layout information of print media.
Optionally, the processor 502 is also used to execute following computer executable instructions:
The width and height of the print media are obtained according to the size of the print media;
According to the width of the printing content, the print attribute information of the printing content and the label print media
And height, determine the page layout information of the printing content.
Optionally, the print attribute information, including a kind of at least following information: font information, line space information;It is described
Processor 502 is also used to execute following computer executable instructions: according to preset ratio to the font or row of the printing content
Spacing is adjusted, and generates the page layout information for being directed to the print media.
Optionally, the processor 502 is also used to execute following computer executable instructions:
Determine the different degree of the field of the printing content;
According to the size of the print media, the different degree of the field of the printing content, the printing content is beaten
Print attribute is adjusted, and generates the page layout information for being directed to the print media.
Optionally, the processor 502 is also used to execute following computer executable instructions: obtaining the format of print command
Information;
According to the data to be printed, the page layout information and the format information of the print command, generates and use
In the print command for printing the data to be printed.
The application fourth embodiment also provides a kind of storage equipment for the data-printing method, describes to compare
Simply, relevant part refers to the corresponding explanation of above-mentioned first embodiment.
The application provides a kind of storage equipment, is stored with instruction, and described instruction can be loaded by processor and be executed following
Step:
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing
Template is suitable for the print media of sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for printing Jie
The page layout information of matter;
According to the data to be printed and the page layout information, generate for printing beating for the data to be printed
Print instruction;
Export the print command.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
1, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media
Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), such as modulates
Data-signal and carrier wave.
2, it will be understood by those skilled in the art that embodiments herein can provide as the production of method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It can be used moreover, the application can be used in the computer that one or more wherein includes computer usable program code
The computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Form.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the claim of this application defined.
Claims (10)
1. a kind of data-printing method characterized by comprising
Obtain data to be printed;
According to the data to be printed, the printing template for printing the data to be printed is determined;Wherein, the printing template
Print media suitable for sizes;
Obtain the size for printing the print media of the data to be printed;
According to the data to be printed, the printing template, the size of the print media, generate for the print media
Page layout information;
According to the data to be printed and the page layout information, generation refers to for printing the printing of the data to be printed
It enables;
Export the print command.
2. the method according to claim 1, wherein described obtain data to be printed, comprising:
Obtain the start command of print out task;
According to the start command of the print out task, data to be printed are obtained.
3. according to the method described in claim 2, it is characterized in that, the start command according to the print out task, obtains
Data to be printed, comprising:
According to the start command of the print out task, inquiry needs the information printed;
The information printed is needed to be converted into format print data by described;
The format print data are determined as the data to be printed.
4. determination is for printing the method according to claim 1, wherein described according to the data to be printed
The printing template of the data to be printed, comprising:
Determine the corresponding printing type of data to be printed;
It is index with the corresponding printing type of the data to be printed, inquires printing template corresponding with the index;
It is determined as printing template corresponding with the index to be used to print the printing template of the data to be printed.
5. according to the method described in claim 4, it is characterized in that, the data to be printed include data category;The determination
The corresponding printing type of data to be printed, comprising:
According to the data category that the data to be printed include, the printing type of the data to be printed is determined.
6. according to the method described in claim 4, it is characterized in that, the corresponding printing type of determination data to be printed, packet
It includes:
The data to be printed are sorted out;
According to type belonging to the data to be printed sorted out, the printing type of the data to be printed is determined.
7. the method according to claim 1, wherein it is described according to the data to be printed, the printing template,
The size of the print media generates the page layout information for being directed to the print media, comprising:
The print data is filled into the printing template, generates printing content;According to the size adjusting of the print media
The printing content generates the page layout information for being directed to the print media.
8. the method according to the description of claim 7 is characterized in that described be filled into the impression block for the print data
Plate generates printing content, comprising:
Template identifier is identified from the printing template;
The template identifier is replaced using the data to be printed, obtains the printing content.
9. the method according to the description of claim 7 is characterized in that described beat according to the size adjusting of the print media
Content is printed, the page layout information for being directed to the print media is generated, comprising:
The print attribute information of the printing content is determined according to the printing template;
According to the size of the print media, the print attribution of the printing content is adjusted, generates and is directed to the printing
The page layout information of medium.
10. a kind of data-printing device characterized by comprising
Data capture unit, for obtaining data to be printed;
Printing template determination unit, for determining the printing for printing the data to be printed according to the data to be printed
Template;Wherein, the printing template is suitable for the print media of sizes;
Print media specification acquiring unit, for obtaining the size of the print media for printing the data to be printed;
Page layout determination unit, for according to the data to be printed, the printing template, the size of the print media,
Generate the page layout information for being directed to the print media;
Print command generation unit, for generating for printing according to the data to be printed and the page layout information
The print command of the data to be printed;
Output unit, for exporting the print command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811171371.0A CN109615803A (en) | 2018-10-09 | 2018-10-09 | A kind of data-printing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811171371.0A CN109615803A (en) | 2018-10-09 | 2018-10-09 | A kind of data-printing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109615803A true CN109615803A (en) | 2019-04-12 |
Family
ID=66001672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811171371.0A Pending CN109615803A (en) | 2018-10-09 | 2018-10-09 | A kind of data-printing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109615803A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111240609A (en) * | 2020-01-03 | 2020-06-05 | 北京辰森世纪科技股份有限公司 | Data printing method and device, electronic equipment and storage medium |
CN112035076A (en) * | 2020-08-25 | 2020-12-04 | 上海中通吉网络技术有限公司 | JSON-based printing analysis method, device, equipment and printing system |
CN112044801A (en) * | 2020-08-27 | 2020-12-08 | 上海哥瑞利软件有限公司 | Sorting machine cleaning management method and system |
CN113173014A (en) * | 2021-05-10 | 2021-07-27 | 百色学院 | Method, system, equipment and storage medium for printing plane of advertisement propaganda paper |
CN117234442A (en) * | 2023-11-09 | 2023-12-15 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010122893A (en) * | 2008-11-19 | 2010-06-03 | Canon Inc | Variable printing system |
CN101901125A (en) * | 2007-04-20 | 2010-12-01 | 夏普株式会社 | Print control unit and printing equipment |
JP2014021910A (en) * | 2012-07-23 | 2014-02-03 | Brother Ind Ltd | Printing system and template editing method |
CN103955345A (en) * | 2014-04-23 | 2014-07-30 | 中国工商银行股份有限公司 | Data printing method and system |
CN104238964A (en) * | 2013-06-13 | 2014-12-24 | 致伸科技股份有限公司 | Method for adjusting printer output image size automatically |
CN105589666A (en) * | 2014-11-13 | 2016-05-18 | 王者蓝 | Method for printing with template based on original content of paper |
CN105930109A (en) * | 2016-04-06 | 2016-09-07 | 北京红马传媒文化发展有限公司 | Document printing method, system and terminal |
CN106528006A (en) * | 2015-09-10 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Page printing method and device |
CN106940628A (en) * | 2016-01-04 | 2017-07-11 | 平安科技(深圳)有限公司 | Document Method of printing and device |
CN107402729A (en) * | 2016-05-20 | 2017-11-28 | 航天信息软件技术有限公司 | Printing template construction method and stencil marking method |
CN108062210A (en) * | 2017-11-17 | 2018-05-22 | 中国银行股份有限公司 | A kind of method and system that layout is set |
CN108228119A (en) * | 2018-01-11 | 2018-06-29 | 平安万家医疗投资管理有限责任公司 | Method of printing, terminal device and storage medium based on HXML |
-
2018
- 2018-10-09 CN CN201811171371.0A patent/CN109615803A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101901125A (en) * | 2007-04-20 | 2010-12-01 | 夏普株式会社 | Print control unit and printing equipment |
JP2010122893A (en) * | 2008-11-19 | 2010-06-03 | Canon Inc | Variable printing system |
JP2014021910A (en) * | 2012-07-23 | 2014-02-03 | Brother Ind Ltd | Printing system and template editing method |
CN104238964A (en) * | 2013-06-13 | 2014-12-24 | 致伸科技股份有限公司 | Method for adjusting printer output image size automatically |
CN103955345A (en) * | 2014-04-23 | 2014-07-30 | 中国工商银行股份有限公司 | Data printing method and system |
CN105589666A (en) * | 2014-11-13 | 2016-05-18 | 王者蓝 | Method for printing with template based on original content of paper |
CN106528006A (en) * | 2015-09-10 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Page printing method and device |
CN106940628A (en) * | 2016-01-04 | 2017-07-11 | 平安科技(深圳)有限公司 | Document Method of printing and device |
CN105930109A (en) * | 2016-04-06 | 2016-09-07 | 北京红马传媒文化发展有限公司 | Document printing method, system and terminal |
CN107402729A (en) * | 2016-05-20 | 2017-11-28 | 航天信息软件技术有限公司 | Printing template construction method and stencil marking method |
CN108062210A (en) * | 2017-11-17 | 2018-05-22 | 中国银行股份有限公司 | A kind of method and system that layout is set |
CN108228119A (en) * | 2018-01-11 | 2018-06-29 | 平安万家医疗投资管理有限责任公司 | Method of printing, terminal device and storage medium based on HXML |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111240609A (en) * | 2020-01-03 | 2020-06-05 | 北京辰森世纪科技股份有限公司 | Data printing method and device, electronic equipment and storage medium |
CN112035076A (en) * | 2020-08-25 | 2020-12-04 | 上海中通吉网络技术有限公司 | JSON-based printing analysis method, device, equipment and printing system |
CN112044801A (en) * | 2020-08-27 | 2020-12-08 | 上海哥瑞利软件有限公司 | Sorting machine cleaning management method and system |
CN113173014A (en) * | 2021-05-10 | 2021-07-27 | 百色学院 | Method, system, equipment and storage medium for printing plane of advertisement propaganda paper |
CN117234442A (en) * | 2023-11-09 | 2023-12-15 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
CN117234442B (en) * | 2023-11-09 | 2024-04-19 | 金蝶征信有限公司 | Data printing method, device, computer equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109615803A (en) | A kind of data-printing method and device | |
CN100565601C (en) | A kind of bill processing apparatus and method | |
CN106940628B (en) | Document printing method and device | |
CN112000302B (en) | Label generation method, template configuration method, device and storage medium | |
CN108829363A (en) | Business voucher Method of printing and device | |
CN104657274B (en) | software interface test method and device | |
CN108776824A (en) | Bar-code label generation method, device and electronic equipment | |
CN105511818A (en) | Voucher template generating method, and device and system | |
CN111240609A (en) | Data printing method and device, electronic equipment and storage medium | |
US20140258059A1 (en) | Information processing system, information processing apparatus, method of controlling an information processing apparatus, and program | |
JPWO2014103251A1 (en) | Data conversion system, data conversion device, and data conversion method | |
CN108280500A (en) | Coding method, coding/decoding method, relevant apparatus and the equipment of Quick Response Code | |
CN107092587A (en) | A kind of business voucher generation method and device | |
CN111062195A (en) | File processing method, file processing device, equipment and storage medium | |
CN109389786A (en) | A kind of printing invoice method and device | |
CN107612966A (en) | Feed information feedback processing methods and system | |
JP2022128202A (en) | Information processing device, information processing system, and information processing program | |
US20100147960A1 (en) | Methods, devices, and systems for printing bar codes | |
JP2015018510A (en) | Information processing apparatus and information processing program | |
CN107015959A (en) | A kind of method that version is closed to pdf document | |
CN115272530B (en) | Intelligent dynamic cover synthesis method and system for enterprise online education | |
CN111208957A (en) | Payroll printing method | |
JP6147373B2 (en) | Sales data processing apparatus and program | |
JP6008149B2 (en) | Data generation system for printing | |
US20160140102A1 (en) | Quality distributions for automated 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: 20190412 |
|
RJ01 | Rejection of invention patent application after publication |