CN106598510B - The method and device of compatible two kinds of printing types - Google Patents

The method and device of compatible two kinds of printing types Download PDF

Info

Publication number
CN106598510B
CN106598510B CN201611028201.8A CN201611028201A CN106598510B CN 106598510 B CN106598510 B CN 106598510B CN 201611028201 A CN201611028201 A CN 201611028201A CN 106598510 B CN106598510 B CN 106598510B
Authority
CN
China
Prior art keywords
printing
content
instruction sequence
control instruction
type
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.)
Active
Application number
CN201611028201.8A
Other languages
Chinese (zh)
Other versions
CN106598510A (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.)
Fujian Star Net eVideo Information Systems Co Ltd
Original Assignee
Fujian Star Net eVideo Information Systems 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 Fujian Star Net eVideo Information Systems Co Ltd filed Critical Fujian Star Net eVideo Information Systems Co Ltd
Priority to CN201611028201.8A priority Critical patent/CN106598510B/en
Publication of CN106598510A publication Critical patent/CN106598510A/en
Application granted granted Critical
Publication of CN106598510B publication Critical patent/CN106598510B/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/1205Improving or facilitating administration, e.g. print management resulting in increased flexibility in print job configuration, e.g. job settings, print requirements, job tickets
    • 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/1224Client or server resources management
    • G06F3/1227Printer definition files
    • 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
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • 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
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1256User feedback, e.g. print preview, test print, proofing, pre-flight checks
    • 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
    • G06F3/1253Configuration of print job parameters, e.g. using UI at the client
    • G06F3/1257Configuration 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)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

The invention belongs to field of computer technology, and in particular to a kind of method and device of two kinds of printing types of compatibility.The method of two kinds of printing types of compatibility of the invention is the following steps are included: configuration printing type and printing content, save as template file;The printing type is that graphic printing and/or port print;According to the printing type of selection, corresponding printing content is obtained from the template file;If selecting graphic printing mode, printing content is sent to printed driver and is printed;If selection port printing type, print control instruction sequence is generated according to printing content, printer is sent to and is printed.Method of the invention can support port printing type and graphic printing mode simultaneously, can be selected as needed, easy to use and flexible.

Description

The method and device of compatible two kinds of printing types
Technical field
The invention belongs to field of computer technology, and in particular to a kind of method and device of two kinds of printing types of compatibility.
Background technique
Printer is a kind of output setting, for computer disposal result to be printed upon associated media.Printer is various Figure and character are printed in the operation and movement of component, the realization of various printing operations on a variety of media, are that can be by a set of Language (order) that printer is identified controls, and the collection that will usually complete the order of above-mentioned function is collectively referred to as printer control Order.Currently used printer control command mainly has: the ESC instruction set of EPSON company, the PCL page of Hewlett-Packard Corporation are retouched Predicate speech, Adobe company PostScript language.
With the continuous development of printer technology, two kinds of printing types: one, port printing type are produced, it will be in printing Appearance is sent to printer in a manner of printer control instruction sequence, and control instruction is construed to the light that can be printed by printer Grid bitmap simultaneously prints.The advantages of this printing type is that print speed is fast, and transmission data are few, and it is small to occupy device memory;But due to Typesetting design can not be carried out to printing content, printing effect is dull, not exquisite enough;This printing type is applied to largely beat Print and the application scenarios not high to printing effect requirements, for example, supermarket's printing shopping receipt etc..Two, graphic printing mode is borrowed Printing content is generated printing bitmap in a computer, then bitmap transmissions is carried out to printer by the processing capacity for helping computer Printing.This mode carries out position map generalization processing using computer generation for printer, can flexibly be arranged printing content Version, printing effect are good;But since be transferred to printer is message bit pattern, efficiency is without printer control language height, printing Speed is slow;And print queue consumes a large amount of memories, is not suitable for the application scenarios for needing largely to print, and is suitble to a small amount of printings and fights each other The higher application scenarios of effect requirements are printed, for example, a small amount of exquisite advertising map of printing.
Printer on the market generally only configures a kind of printing type at present, can only port printing or can only graphic printing, Port printing and graphic printing advantage can not be combined.For example, part printer manufacturer only provides graphic printing mode, user It is printed, is printed inside print routine using graphics mode, without mentioning using the printed driver that manufacturer provides For traditional port printing type, no normal direction printer sends control command and realizes printing speed;Port printing type is only provided Printer then can not carry out bitmap generation processing using computer generation for printer, can not flexibly be arranged printing content Version.
Summary of the invention
It is an object of the present invention to overcoming disadvantage mentioned above, a kind of printing of while compatible port and graphic printing are provided Method, the advantages of combining two kinds of printing types, user can according to need selection printing type.
In order to solve the above-mentioned technical problems, the present invention provides a kind of method of two kinds of printing types of compatibility, including it is following Step:
Printing type and printing content are configured, template file is saved as;The printing type is graphic printing and/or port Printing;
According to the printing type of selection, corresponding printing content is obtained from the template file;
If selecting graphic printing mode, printing content is sent to printed driver and is printed;
If selection port printing type, according to printing content generate print control instruction sequence, be sent to printer into Row printing.
Technical solution of the present invention can configure printing type and printing content, according to the mode and content of configuration, User can arbitrarily select one of printing type, by the technical solution, solve current printer and there was only a kind of printing side Formula, can not support port printing simultaneously and the problem of graphic printing, user can select suitably printing side according to self-demand Formula, easy to use and flexible.
In addition, the present invention also provides a kind of methods of two kinds of printing types of compatibility, comprising the following steps:
Configuration printing content, saves as template file under graphic printing mode;And/or printing is configured under the printing type of port Content simultaneously generates print control instruction sequence according to printing content, saves as instruction sequence files;
According to the printing type of selection, obtains in printing from the template file and perhaps obtained from described instruction sequential file Print control instruction sequence;
If selecting graphic printing mode, printing content is sent to printed driver and is printed;
If selection port printing type, is sent to printer for print control instruction sequence and prints.
By the way that the content that port prints just is configured to instruction sequence files before printing, facilitate user's selection port printing side Formula can will regenerate instruction sequence files to avoid each printing, further increase the speed and effect of port print processing Rate.
Further, described " print control instruction sequence is generated according to printing content ", specifically:
Graphic printing preview graph is generated according to printing content;
It obtains and prints line number, every row item number and each project initial position of content in Print Preview figure to left margin Or the distance of right margin;
According to " line number, every row item number and each project initial position of printing content to left margin or right margin away from From ", printing content each row of data is converted into print control instruction sequence.
By the above-mentioned means, being convenient to print the printing Content Transformation in template file that image prints at port Control instruction sequence, realization can configure image printing content and port printing content simultaneously, facilitate user that any one is selected to beat India side formula.
Further, the template file and described instruction sequential file save in xml format.
Further, the printing content includes static content and dynamic content.
Further, the print control instruction is ESC, PCL or PostScript.
Correspondingly, the present invention also provides a kind of devices of two kinds of printing types of compatibility, comprising:
First processing module saves as template file for configuring printing type and printing content;The printing type is Graphic printing and/or port printing;
Second processing module obtains corresponding printing content from the template file for the printing type according to selection;
Third processing module, if printing content is sent to printed driver for selecting graphic printing mode It is printed;
Fourth processing module generates print control sequence of instructions according to printing content if being used for selection port printing type Column, are sent to printer and are printed.
In addition, the present invention also provides a kind of devices of two kinds of printing types of compatibility, comprising:
First processing module saves as template file for configuration printing content under graphic printing mode;The port and/or Configuration prints content and generates print control instruction sequence according to printing content under printing type, saves as instruction sequence files;
Second processing module obtains in printing from the template file perhaps from institute for the printing type according to selection It states instruction sequence files and obtains print control instruction sequence;
Third processing module, if printing content is sent to printed driver for selecting graphic printing mode It is printed;
Print control instruction sequence is sent to printer if being used for selection port printing type by fourth processing module It is printed.
Further, described " print control instruction sequence is generated according to printing content ", specifically:
Graphic printing preview graph is generated according to printing content;
It obtains and prints line number, every row item number and each project initial position of content in Print Preview figure to left margin Or the distance of right margin;
According to " line number, every row item number and each project initial position of printing content to left margin or right margin away from From ", printing content each row of data is converted into print control instruction sequence.
Further, the template file and described instruction sequential file save in xml format.
In conclusion the beneficial effect of technical solution of the present invention has:
1. by configuring to printing type, and carry out according to the mode of configuration the mode of different print processings, solution Current printer of having determined only has a kind of printing type, port can not be supported to print simultaneously and the problem of graphic printing, and user can be with Suitable printing type, easy to use and flexible are selected according to self-demand.
2. facilitating user's selection port to print by the way that the content that port prints just is configured to instruction sequence files before printing Mode can will regenerate instruction sequence files to avoid each printing, further increase port print processing speed and Efficiency.
3. the method for the compatible two kinds of printing types of the present invention, greatly expands the application scenarios of printer, only needs one and beat Print machine had both been adapted to a large amount of and not high to printing effect requirements application scenarios, can be applicable to print in a small amount and right The demanding application scenarios of printing effect.
Detailed description of the invention
Fig. 1 is a kind of method and step flow chart of two kinds of printing types of compatibility of the invention.
Fig. 2 is the graphic printing preview graph of a specific embodiment of the invention.
Fig. 3 is the method and step flow chart of the compatible two kinds of printing types of another kind of the invention.
Fig. 4 is a kind of structure drawing of device of two kinds of printing types of compatibility of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It is a kind of method and step flow chart of two kinds of printing types of compatibility of the invention such as Fig. 1, comprising the following steps:
Step 1, configuration printing type and printing content, save as template file;The printing type be graphic printing and/ Or port printing;
The printing type of printer can be divided into two kinds: port prints or graphic printing.Port printing type will print content It is sent to printer in a manner of printer control instruction sequence, control instruction is construed to the grating that can be printed by printer Bitmap simultaneously prints.Printing content is generated printing position by the processing capacity of computer by graphic printing mode in a computer Figure, then bitmap transmissions are printed to printer.Printer on the market generally only configures a kind of printing type at present, can only Port printing or can only graphic printing, can not combine port printing and graphic printing advantage.
Technical solution of the present invention, for the above two printing type of compatibility, it is necessary to first to printing type and the printing side The content for needing to print under formula is configured, and the printing content generally includes static content and dynamic content, and static content refers to Be fixed and invariable print entry, dynamic content is that each printing may changed print entry.For example, in the purchase of printing supermarket In the application scenarios of object bill, the new line title (i.e. shopping plaza title) of bill generally falls into static content, prints every time The content come is consistent;And the contents such as user does shopping detail list (including shopping items title, price, quantity), shopping-time Belong to dynamic content, is printed according to the specific shopping environment of each user.For another example, receipt is handled in printing banking Scene in, bank outlets' title is usually static content, and user's name, account, transacting business type, the amount of money, the day of trade Phase etc. is dynamic content, prints different contents according to different transaction.
In addition, whether dynamic content or static content, template the inside will configure each print entry association attributes letter Breath, the title including print entry, print position, height, width, the font of use, font size, font style, font color Etc. information.Preferably, the embodiment of technical solution of the present invention is using XML (Extensible Markup Language, extension Markup language) format save printing template file, XML be for marking electronic document to make it have structural markup language, It can be used to flag data, define data type, be a kind of original language that permission user is defined the markup language of oneself. Good readability, scalability and cross-platform can be realized by carrying out template configuration using XML language.
Preferably, technical solution of the present invention can configure figure printing type and port printing type in same template file Printing content.Concrete mode are as follows: first increase a line port printing configuration mark, such as " end ### at graphic printing template end Mouthful printing ### ", be further added by printing content configuration, wherein printing content can be replicated from the template of graphic printing mode it is identical Content, different printing contents also can be set.Content is printed by configuring graphics mode simultaneously in same template file Content is printed with port mode, can effectively reduce the workload of design printing configuration file.
Step 2, the printing type according to selection obtain corresponding printing content from the template file;
For example, in the case that different printing types respectively correspond a template file, user's selection port printing type, The printing content item specifically needed is then obtained from the printing template file of port;If user selects graphic printing mode, from figure The printing content item specifically needed is obtained in shape printing template file.It is beaten when configuring graphics mode simultaneously in same template file When print content and port mode print content, according to the printing type that user selects, the printing type in the template file is read Under printing content item.
If step 3, selection graphic printing mode, are sent to printed driver for printing content and print;
If the printing type that user selects is graphic printing, printing content is sent to printed driver, by beating Print machine driver will print content using computer resource and generate printing bitmap, then bitmap is transferred directly to printer and is generated It is printed after Print Preview figure.Under this mode, typesetting design can be carried out to printing content, flexible layout prints content, makes Content fineness must be printed, printing effect is improved;But due between computer and printer using bitmap transmissions, in printed drawings Transmission speed is slow in the biggish situation of chip resolution, and print speed is with regard to slow.
If step 4, selection port printing type, print control instruction sequence is generated according to printing content, is sent to and beats Print machine is printed.
If the printing type that user selects is port printing, the control instruction format used according to printer will print Content generates print control instruction sequence, is sent to printer and is printed.Wherein, printing content is generated into print control instruction Sequence, specifically:
Graphic printing preview graph is generated according to printing content;I.e. according to each print entry correlation attribute information, including printing The title of item, print position, height, width, the font of use, font size, font style, font color etc. information are raw At graphic preview interface;
It obtains and prints line number, every row item number and each project initial position of content in Print Preview figure to left margin Or the distance of right margin;Such as Fig. 2, for the graphic printing preview graph of a specific embodiment of the invention, including four row contents, wherein the A line includes a project " Supermarket account-settling list ", and boundary is 3 centimetres From Left for initial position;Second row includes two projects, Respectively " Invoice Number ", " S201610310001 ", boundary is 1.3 centimetres to " Invoice Number " project From Left; Boundary is 2.8 centimetres to " S201610310001 " project From Left;The third line includes two projects, respectively " operator ", " pipe Reason person ", boundary is 1.3 centimetres to " operator " project From Left;Boundary is 2.8 centimetres to " administrator " project From Left;Fourth line " presence next time is welcome including a project!", boundary is 3.5 centimetres From Left for initial position.
According to " line number, every row item number and each project initial position of printing content to left margin or right margin away from From ", printing content each row of data is converted into print control instruction sequence.In above-described embodiment, using the ESC of EPSON company Instruction set first initializes printer instructions (ESC@), and the print control instruction sequence that the first row generates is (FS!0,ESC E 0, ESC D n1 0, HT, " Supermarket account-settling list ", CR, LF), the print control instruction sequence that the second row generates is (FS!0,ESC E 0, ESC D n1 0, HT, " Invoice Number ", HT, " S201610310001 ", CR, LF) ... the rest may be inferred, beats what all rows generated Print control instruction sequence is converted to byte stream and is sent to printer execution in sequence, finally retransmits the instruction of paper feed and cut paper (ESC d 7,GS V 0)。
In the particular embodiment, different according to the type of printer, printer control command can be EPSON company The PostScript language of ESC instruction set, the PCL page description language of Hewlett-Packard Corporation or Adobe company.Since print control refers to Enable transmission is Vector Message, such as, it is desirable that printer prints the order of straight line, as long as two points of incoming straight line head and the tail Coordinate information, printer just can be carried out printing, rather than transmit the information of all the points on entire straight line, such transmitted data amount Few, execution efficiency is high, and print speed is with regard to fast.
Technical solution of the present invention carries out different printings according to the mode of configuration by configuring to printing type The mode of processing solves current printer and there was only a kind of printing type, can not support port printing and graphic printing simultaneously Problem, user can select suitable printing type, easy to use and flexible according to self-demand.For example, when needing flying print When, port mode may be selected and printed;When higher to printing effect requirements, optional graphics mode is printed.
It is the method and step flow chart of the compatible two kinds of printing types of another kind of the invention such as Fig. 3, comprising the following steps:
Configuration printing content, saves as template file under step 1, graphic printing mode;And/or match under the printing type of port It sets printing content and print control instruction sequence is generated according to printing content, save as instruction sequence files;
In this step, the content of image printing and port printing is respectively configured.Specifically, selection graphic printing template, right Printing content is configured, and configures each print entry correlation attribute information, the title including print entry, print position, and height is wide Degree, the font of use, font size, font style, font color etc. information are saved into template file;
Selection port printing template, on the basis of printing content configuration completion, increasing printing Content Transformation is to print The processing of control instruction sequence, step is consistent with aforementioned schemes, specifically: graphic printing preview graph is generated according to printing content. The printing content can be obtained from template file, when image printing it is consistent with the template file content that port prints when, can from times Template file of anticipating obtains printing content.When port printing template file content and image printing template file content not When consistent, printing content is obtained from the template file that port prints and generates image Print Preview figure.Obtain Print Preview figure Distance of line number, every row item number and each project initial position of middle printing content to left margin or right margin;According to " beating Line number, every row item number and each project initial position of content are printed to the distance of left margin or right margin ", content will be printed Each row of data is converted into print control instruction sequence, then saves print control instruction sequence to instruction sequence text in sequence In part, which can equally be saved using XML format.For example, according to the graphic printing of previous embodiment The instruction sequence content of preview graph, generation is as follows:
ESC@
FS!0, ESC E 0, ESC D n1 0, HT, " Supermarket account-settling list ", CR, LF
FS!0, ESC E 0, ESC D n1 0, HT, " Invoice Number ", HT, " S201610310001 ", CR, LF
ESC d 7,GS V 0
Step 2, the printing type according to selection obtain in printing from the template file perhaps from described instruction sequence text Part obtains print control instruction sequence;
If user's selection port printing type, print control instruction sequence is obtained from instruction sequence files;If user Graphic printing mode is selected, then obtains the printing content item specifically needed from graphic printing template file.
If step 3, selection graphic printing mode, are sent to printed driver for printing content and print;
Content will be printed using computer resource by printed driver and generates printing bitmap, then bitmap will directly be transmitted It is printed to printer.
If step 4, selection port printing type, are sent to printer for print control instruction sequence and print.This In step, it is only necessary to it is executed print control instruction sequence is directly sent to printer after dynamic content partial replacement, Without carrying out the conversion process of instruction sequence.For example, according to the graphic printing preview graph of previous embodiment, as long as by Invoice Number After the replacement of the dynamic contents such as number, operator's title, print control instruction sequence is sent to printer and is executed.
The technical program is optimized on the basis of previous technical solution, is first printing by graphic printing Content Transformation Control instruction sequence, and be stored in instruction sequence files.During subsequent progress port printing, as long as from instruction sequence File acquisition print control instruction sequence is simultaneously sent to printer execution, beats so as to avoid configuring under the printing type of port The problem of carrying out print control instruction sequence conversion process every time when printing content, further improves the speed of port printing And efficiency.
It is a kind of structure drawing of device of two kinds of printing types of compatibility of the invention such as Fig. 4, comprising:
First processing module saves as template file for configuring printing type and printing content;The printing type is Graphic printing and/or port printing;
In a preferred embodiment, the template file of the present apparatus saves in xml format, and the printing content includes static state Content and dynamic content, static content refer to that changeless print entry, dynamic content are changed may to beat every time Print item.
In an additional preferred embodiment, figure printing type can be configured in the same template file of the present apparatus and port is beaten The printing content of India side formula.It is printed in content and port mode print by configuring graphics mode simultaneously in same template file Hold, can effectively reduce the workload of design printing configuration file.
Second processing module obtains corresponding printing content from the template file for the printing type according to selection;
Printing content is sent to printer driver journey if being graphic printing for printing type by third processing module Sequence is printed;
Fourth processing module generates print control instruction according to printing content if being port printing for printing type Sequence is sent to printer and is printed.Wherein, " print control instruction sequence is generated according to printing content ", specifically: according to It prints content and generates graphic printing preview graph;Obtain line number, every row item number and each item that content is printed in Print Preview figure Distance of the mesh initial position to left margin or right margin;According to " line number, every row item number and each project of printing content rise Beginning position to left margin or right margin distance ", will printing content each row of data be converted into print control instruction sequence.Specific Application scenarios in, the instruction of print control described in the present apparatus can be the ESC instruction set of EPSON company, PCL pages of Hewlett-Packard Corporation Face description language or the PostScript language of Adobe company.
In a preferred embodiment, the device of two kinds of printing types of a kind of compatibility of the invention can also be, comprising:
First processing module saves as template file for configuration printing content under graphic printing mode;The port and/or Configuration prints content and generates print control instruction sequence according to printing content under printing type, saves as instruction sequence files;
Second processing module obtains in printing from the template file perhaps from institute for the printing type according to selection It states instruction sequence and obtains print control instruction sequence;
Third processing module, if printing content is sent to printed driver for selecting graphic printing mode It is printed;
Print control instruction sequence is sent to printer if being used for selection port printing type by fourth processing module It is printed.
The device of previous two kinds of printing types of compatibility is different from, in the first processing module of the present apparatus, if user selects Port printing type then generates print control instruction sequence according to printing content, specifically: figure is generated according to printing content and is beaten Print preview graph;It obtains and prints line number, every row item number and each project initial position of content in Print Preview figure to left margin Or the distance of right margin;According to " line number, every row item number and each project initial position to left margin or the right side of printing content Printing content each row of data is converted into print control instruction sequence, is saved in instruction sequence files by the distance on boundary ".Pass through The processing of print control instruction sequence will be generated to be included in first processing module, may be implemented once to convert, be used for multiple times, into one Step improves the speed and efficiency of port printing.
Above-mentioned specific embodiment is only explained in detail technical solution of the present invention, the present invention not only only office It is limited to above-described embodiment, all any improvement or replacement according to the principle of the invention should all be within protection scope of the present invention.

Claims (10)

1. a kind of method of two kinds of printing types of compatibility, which comprises the following steps:
Printing type and printing content are configured, template file is saved as;The printing type is that graphic printing and port print;
According to the printing type of selection, corresponding printing content is obtained from the template file;
If selecting graphic printing mode, printing content is sent to printed driver and is printed;
If selection port printing type, print control instruction sequence is generated according to printing content, printer is sent to and is beaten Print.
2. a kind of method of two kinds of printing types of compatibility, which comprises the following steps:
Configuration printing content, saves as template file under graphic printing mode;Simultaneously with configuration printing content under the printing type of port Print control instruction sequence is generated according to printing content, saves as instruction sequence files;
According to the printing type of selection, is obtained in printing from the template file and perhaps obtain printing from described instruction sequential file Control instruction sequence;
If selecting graphic printing mode, printing content is sent to printed driver and is printed;
If selection port printing type, is sent to printer for print control instruction sequence and prints.
3. the method for compatible two kinds of printing types as claimed in claim 1 or 2, which is characterized in that described " according to printing content Generate print control instruction sequence ", specifically:
Graphic printing preview graph is generated according to printing content;
Obtain line number, every row item number and each project initial position to left margin or the right side that content is printed in Print Preview figure The distance on boundary;
According to " printing content line number, every row item number and each project initial position to left margin or right margin distance ", Printing content each row of data is converted into print control instruction sequence.
4. the method for compatible two kinds of printing types as claimed in claim 3, which is characterized in that the template file and the finger Sequential file is enabled to save in xml format.
5. the method for compatible two kinds of printing types as claimed in claim 3, which is characterized in that the printing content includes static state Content and dynamic content.
6. the method for compatible two kinds of printing types as claimed in claim 3, which is characterized in that the print control, which instructs, is ESC, PCL or PostScript.
7. a kind of device of two kinds of printing types of compatibility characterized by comprising
First processing module saves as template file for configuring printing type and printing content;The printing type is figure Printing and port printing;
Second processing module obtains corresponding printing content from the template file for the printing type according to selection;
Third processing module, if printing content is sent to printed driver and is carried out for selecting graphic printing mode Printing;
Fourth processing module generates print control instruction sequence, hair according to printing content if being used for selection port printing type Printer is given to be printed.
8. a kind of device of two kinds of printing types of compatibility characterized by comprising
First processing module saves as template file for configuration printing content under graphic printing mode;With port printing type Lower configuration prints content and generates print control instruction sequence according to printing content, saves as instruction sequence files;
Second processing module obtains in printing from the template file perhaps from the finger for the printing type according to selection Sequential file is enabled to obtain print control instruction sequence;
Third processing module, if printing content is sent to printed driver and is carried out for selecting graphic printing mode Printing;
Print control instruction sequence is sent to printer and carried out by fourth processing module if being used for selection port printing type Printing.
9. the device of compatible two kinds of printing types as claimed in claim 7 or 8, which is characterized in that described " according to printing content Generate print control instruction sequence ", specifically:
Graphic printing preview graph is generated according to printing content;
Obtain line number, every row item number and each project initial position to left margin or the right side that content is printed in Print Preview figure The distance on boundary;
According to " printing content line number, every row item number and each project initial position to left margin or right margin distance ", Printing content each row of data is converted into print control instruction sequence.
10. the device of compatible two kinds of printing types as claimed in claim 9, which is characterized in that the template file and described Instruction sequence files save in xml format.
CN201611028201.8A 2016-11-18 2016-11-18 The method and device of compatible two kinds of printing types Active CN106598510B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611028201.8A CN106598510B (en) 2016-11-18 2016-11-18 The method and device of compatible two kinds of printing types

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611028201.8A CN106598510B (en) 2016-11-18 2016-11-18 The method and device of compatible two kinds of printing types

Publications (2)

Publication Number Publication Date
CN106598510A CN106598510A (en) 2017-04-26
CN106598510B true CN106598510B (en) 2019-09-20

Family

ID=58592413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611028201.8A Active CN106598510B (en) 2016-11-18 2016-11-18 The method and device of compatible two kinds of printing types

Country Status (1)

Country Link
CN (1) CN106598510B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107766900B (en) * 2017-09-11 2021-05-28 深圳市共进电子股份有限公司 Method, system and computing device for printing bar code
CN109783037A (en) * 2019-01-02 2019-05-21 上海济强电子科技有限公司 A kind of instruction of print control and control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924789A (en) * 2005-09-02 2007-03-07 星精密株式会社 Print system
CN101782842A (en) * 2009-01-16 2010-07-21 佳能株式会社 Printing control apparatus and control method thereof
CN104508622A (en) * 2012-08-14 2015-04-08 精工爱普生株式会社 Epos printing
CN104598178A (en) * 2014-12-30 2015-05-06 福建星网视易信息系统有限公司 Port printing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080017880A (en) * 2006-08-23 2008-02-27 삼성전자주식회사 Host device capable of selecting printer language and method for selecting printer language thereof
US8045187B2 (en) * 2006-11-30 2011-10-25 Canon Kabushiki Kaisha Variable data printing within a print driver
US8194280B2 (en) * 2007-01-31 2012-06-05 Konica Minolta Laboratory U.S.A., Inc. Direct printing of a desired or multiple appearances of object in a document file
CN101625726B (en) * 2009-08-05 2012-08-22 北大方正集团有限公司 Printing method and printing system
JP2012056278A (en) * 2010-09-13 2012-03-22 Canon Inc Image processing device, method of controlling the image processing device and program
CN102360274A (en) * 2011-09-30 2012-02-22 上海慧谋网络科技有限公司 Variable-data printing template realization device and application method for same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924789A (en) * 2005-09-02 2007-03-07 星精密株式会社 Print system
CN101782842A (en) * 2009-01-16 2010-07-21 佳能株式会社 Printing control apparatus and control method thereof
CN104508622A (en) * 2012-08-14 2015-04-08 精工爱普生株式会社 Epos printing
CN104598178A (en) * 2014-12-30 2015-05-06 福建星网视易信息系统有限公司 Port printing method and device

Also Published As

Publication number Publication date
CN106598510A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN104679457B (en) Information processing equipment, information processing method and recording medium
CN105511818B (en) The generation method of voucher templates, apparatus and system
CN105278890B (en) Information processing unit and control method
US8325368B2 (en) Print information conversion apparatus, printing apparatus, printing system, and computer readable medium
KR20090037264A (en) Rogo menufacturing method using the internet
CN106598510B (en) The method and device of compatible two kinds of printing types
US8773677B2 (en) Information processing apparatus, PDL data conversion method, and storage medium
US8860990B2 (en) Information processing apparatus, PDL data conversion method, and storage medium
US20130293911A1 (en) Data generating apparatus, data generating method, and storage medium
CN101145094A (en) Host apparatus to set N-up function and control method thereof
CN102193762B (en) Printing control apparatus and printing control method
US10310788B2 (en) Control method for generating data used for printing and information processing apparatus
US9253343B2 (en) Information processing apparatus, control method, and storage medium for providing a preview and/or display of a main display document generated from all parts of a print document
CN108196802A (en) A kind of variable data printing system
EP3602404A1 (en) Systems and methods for clipping images
JP2007011515A (en) Print system, control method of print system and program
CN107015770A (en) Message processing device and printing data generating method
US20120072827A1 (en) Information processing apparatus, page description method, and storage medium
US20040184052A1 (en) Information processing apparatus and method, and print control program
JP3521056B2 (en) Printer driver, computer having printer driver, and computer system
JP5600960B2 (en) Host computer, print data generation method and program
JP6376876B2 (en) Information processing apparatus, program, and control method
JP5423197B2 (en) Variable printing system, variable printing method, layout conversion device, and text image generation device
US20100103446A1 (en) Methods and systems for printing documents with semi-transparent graphical elements
JP2022069096A (en) Data generation device and data generation method

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