CN106598510A - Method and device compatible with two print modes - Google Patents

Method and device compatible with two print modes Download PDF

Info

Publication number
CN106598510A
CN106598510A CN201611028201.8A CN201611028201A CN106598510A CN 106598510 A CN106598510 A CN 106598510A CN 201611028201 A CN201611028201 A CN 201611028201A CN 106598510 A CN106598510 A CN 106598510A
Authority
CN
China
Prior art keywords
printing
content
printed
print
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611028201.8A
Other languages
Chinese (zh)
Other versions
CN106598510B (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 the technical field of computers and specifically relates to a method and device compatible with two print modes. The method comprises the following steps: print modes and contents to be printed are configured and the contents to be printed are saved as a template file, wherein the print modes are a graph print mode and/or a port print mode; according to the selected print mode, the corresponding contents to be printed are obtained from the template file; when the graph print mode is selected, the contents to be printed are sent to a printer driver for carrying out printing; and when the port print mode is selected, an instruction sequence for printing control is generated in terms of the contents to be printed and is sent to a printer for carrying out printing. According to the method, the port print mode and the graph print mode can be supported at the same time. The print modes can be selected in terms of user requirements and thus the use is convenient 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 compatible two kinds of printing types.
Background technology
Printer is that a kind of output is arranged, for computer disposal result is printed upon associated media.Printer is various The operation and action of part, the realization of various printing actions, prints figure and character on a variety of media, is to be by a set of The collection that the order of above-mentioned functions can be completed generally is collectively referred to as printer control controlling by the language (order) recognized by printer Order.Conventional printer control command mainly has at present:The ESC instruction sets of EPSON companies, the PCL pages of Hewlett-Packard Corporation are retouched Predicate speech, the PostScript language of Adobe companies.
With the continuous development of printer technology, two kinds of printing types are generated:First, port printing type, will print interior Appearance is sent to printer in the way of printer control instruction sequence, the light for being construed to print by control instruction by printer Grid bitmap is simultaneously printed.The advantage of this printing type is that print speed is fast, and transmission data is few, takes device memory little;But due to Typesetting design cannot be carried out to printing content, printing effect is dull, not exquisite enough;This printing type is applied to beat in a large number Print and the application scenarios not high to printing effect requirements, for example, supermarket prints shopping receipt etc..2nd, graphic printing mode, borrows The disposal ability of computer is helped, content will be printed and generated printing bitmap in a computer, then bitmap transmissions are carried out to printer Print.This mode, carries out map generalization for printer using computer generation and processes, and can flexibly be arranged to printing content Version, its printing effect are good;But it is message bit pattern due to be transferred to printer, efficiency is without printer control language height, printing Speed is slow;And print queue consumes a large amount of internal memories, be not suitable for needing the application scenarios of a large amount of printings, be adapted to print in a small amount and fight each other The higher application scenarios of print effect requirements, for example, print a small amount of exquisite advertising map.
At present printer on the market typically only configures a kind of printing type, can only port print or can only graphic printing, Port cannot be taken into account simultaneously to print and graphic printing advantage.For example, printer manufacturer in part provides only graphic printing mode, user The printed driver provided using manufacturer is printed, and is printed using graphics mode, and do not carry inside print routine For traditional port printing type, it is impossible to realize printing speed to printer transmitting control commands;Provide only port printing type Printer, then cannot carry out bitmap generation process for printer using computer generation, it is impossible to flexibly be arranged to printing content Version.
The content of the invention
An object of the present invention is to overcome disadvantage mentioned above, there is provided a kind of while compatible port is printed and graphic printing Method, while taking into account the advantage of two kinds of printing types, user can select printing type as needed.
In order to solve above-mentioned technical problem, the invention provides a kind of method of compatible two kinds of printing types, including it is following Step:
Configuration printing type and printing content, save as template file;The printing type is graphic printing and/or port Print;
According to the printing type for selecting, corresponding printing content is obtained from the template file;
If selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
If selection port printing type, print control job sequence is generated according to content is printed, be sent to printer and enter Row is printed.
Technical scheme, can configure to printing type and printing content, according to the mode and content of configuration, User can arbitrarily select one of which printing type, by the technical scheme, solve current printer and there was only a kind of printing side Formula, it is impossible to which, while supporting that port prints the problem with graphic printing, user can select suitable printing side according to self-demand Formula, easy to use and flexible.
In addition, present invention also offers a kind of method of compatible two kinds of printing types, comprises the following steps:
Configuration under graphic printing mode prints content, saves as template file;And/or configuration is printed under the printing type of port Content simultaneously generates print control job sequence according to content is printed, and saves as instruction sequence files;
According to the printing type for selecting, obtain from the template file in printing and perhaps obtain from the instruction sequence files Print control job sequence;
If selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
If print control job sequence is sent to printer and is printed by selection port printing type.
The content that port prints is configured to into instruction sequence files just before by printing, facilitates user's selection port printing side Formula, can avoid printing every time from regenerating instruction sequence files, further improve the speed and effect of port print processing Rate.
Further, described " generating print control job sequence according to content is printed ", specially:
Graphic printing preview graph is generated according to content is printed;
The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin Or the distance of right margin;
According to " print the line number of content, often row item number, and each project original position to left margin or right margin away from From ", content each row of data will be printed and be converted into print control job sequence.
By the way, it is convenient to what the printing Content Transformation in the template file for printing image was printed into port Control instruction sequence, realization can configure image simultaneously and print content and port printing content, facilitate user to select any one to beat India side formula.
Further, the template file and the instruction sequence files are preserved in xml format.
Further, the printing content includes static content and dynamic content.
Further, the print control instruction is ESC, PCL or PostScript.
Correspondingly, present invention also offers a kind of device of compatible two kinds of printing types, including:
First processing module, for configuring printing type and printing content, saves as template file;The printing type is Graphic printing and/or port print;
Second processing module, for according to the printing type for selecting, obtaining corresponding printing content from the template file;
3rd processing module, if for selecting graphic printing mode, content will be printed and be sent to printed driver Printed;
Fourth processing module, if for selection port printing type, generating print control sequence of instructions according to content is printed Row, are sent to printer and are printed.
In addition, present invention also offers a kind of device of compatible two kinds of printing types, including:
First processing module, prints content for configuration under graphic printing mode, saves as template file;And/or port Configuration under printing type prints content and generates print control job sequence according to content is printed, and saves as instruction sequence files;
Second processing module, for according to the printing type for selecting, obtaining from the template file in printing perhaps from institute State instruction sequence files and obtain print control job sequence;
3rd processing module, if for selecting graphic printing mode, content will be printed and be sent to printed driver Printed;
Fourth processing module, if for selection port printing type, print control job sequence is sent to printer Printed.
Further, described " generating print control job sequence according to content is printed ", specially:
Graphic printing preview graph is generated according to content is printed;
The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin Or the distance of right margin;
According to " print the line number of content, often row item number, and each project original position to left margin or right margin away from From ", content each row of data will be printed and be converted into print control job sequence.
Further, the template file and the instruction sequence files are preserved in xml format.
In sum, the beneficial effect of technical solution of the present invention has:
1. by configuring to printing type, and the mode of different print processings is carried out according to the mode of configuration, solution Current printer of having determined only has a kind of printing type, it is impossible at the same support port print and graphic printing problem, user can be with Suitable printing type, easy to use and flexible are selected according to self-demand.
2., by the content that port prints is configured to instruction sequence files just before printing, facilitate user's selection port to print Mode, can avoid printing every time and will regenerate instruction sequence files, further improve 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 beats 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 application scenarios that printing effect has high demands.
Description of the drawings
Fig. 1 is the method and step flow chart of a kind of compatible two kinds of printing types of the present 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 another kind two kinds of printing types of compatibility of the present invention.
Fig. 4 is the structure drawing of device of a kind of compatible two kinds of printing types of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Such as Fig. 1, it is the method and step flow chart of a kind of compatible two kinds of printing types of the present invention, comprises the following steps:
Step 1, configuration printing type and printing content, save as template file;The printing type be graphic printing and/ Or port prints;
The printing type of printer can be divided into two kinds:Port prints or graphic printing.Port printing type, will print content Printer is sent in the way of printer control instruction sequence, the grating for being construed to print by control instruction by printer Bitmap is simultaneously printed.Graphic printing mode, by the disposal ability of computer, will print content and generates printing position in a computer Figure, then bitmap transmissions are printed to printer.Printer on the market typically only configures a kind of printing type at present, can only Port prints or can only graphic printing, it is impossible to while take into account port printing and graphic printing advantage.
Technical scheme, is compatible above two printing type, it is necessary to first to printing type and the printing side The content for printing is needed to be configured under formula, the printing content generally includes static content and dynamic content, and static content refers to Be changeless print entry, dynamic content is to print the print entry that may be changed every time.For example, printing supermarket's purchase In the application scenarios of thing 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 content such as the detailed list of user's shopping (including shopping items title, price, quantity), shopping-time Belong to dynamic content, printed according to the specific shopping environment of each user.And for 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, will configure each print entry association attributes and believe inside template Breath, including the title of print entry, print position, height, width, the font of employing, 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) form preservation printing template file, XML is to make it have structural markup language for labelling e-file, Can be used to flag data, define data type, be a kind of original language for allowing user to be defined the markup language of oneself. Template configuration is carried out using XML language and is capable of achieving good readability, extensibility and cross-platform.
Preferably, technical scheme can configure graphic printing mode and port printing type in same template file Printing content.Concrete mode is:First increase a line port at graphic printing template end and print configuration mark, such as " ### ends Mouth prints ### ", it is further added by printing content configuration, wherein printing content can replicate identical from the template of graphic printing mode Content, it is also possible to different printing contents are set.Content is printed by graphics mode is configured in same template file simultaneously Content is printed with port mode, the workload that design prints configuration file can be effectively reduced.
Step 2, according to the printing type for selecting, obtain corresponding printing content from the template file;
For example, in the case that different printing types correspond to a template file respectively, user's selection port printing type, The printing content item of concrete needs is obtained from the printing template file of port then;If user selects graphic printing mode, from figure The concrete printing content item for needing is obtained in shape printing template file.Beat when graphics mode is configured in same template file simultaneously 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, selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
If the printing type that user selects is graphic printing, content will be printed and be 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 generation Printed after Print Preview figure.Under this mode, typesetting design can be carried out to printing content, flexible layout prints content, makes Content must be printed exquisite, improve printing effect;But as bitmap transmissions are used between computer and printer, in printed drawings In the case that chip resolution is larger, transmission speed is slow, and print speed is just slow.
If step 4, selection port printing type, print control job sequence is generated according to content is printed, be sent to and beat Print machine is printed.
If the printing type that user selects is printed for port, according to the control instruction form that printer is used, will print Content generates print control job sequence, is sent to printer and is printed.Wherein, content will be printed and will generate print control instruction Sequence, specially:
Graphic printing preview graph is generated according to content is printed;I.e. according to each print entry correlation attribute information, including printing The title of item, print position, height, width, the font of employing, font size, font style, font color etc. information, it is raw Into graphic preview interface;
The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin Or the distance of right margin;Such as Fig. 2, it is 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 to its original position From Left;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 " manager " project From Left;Fourth line Presence next time is welcome " including a project!", boundary is 3.5 centimetres to its original position From Left.
According to " print the line number of content, often row item number, and each project original position to left margin or right margin away from From ", content each row of data will be printed and be converted into print control job sequence.In above-described embodiment, using the ESC of EPSON companies Instruction set, first initializes printer instructions (ESC@), and the print control job sequence that the first row is generated is (FS!0,ESC E 0, ESC D n1 0, HT, " Supermarket account-settling list ", CR, LF), the print control job sequence that the second row is generated is (FS!0,ESC E 0, ESC D n1 0, HT, " Invoice Number ", HT, " S201610310001 ", CR, LF) ... the rest may be inferred, by beating that all rows are generated Print control instruction sequence is converted to byte stream and is sent to printer execution in order, 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 companies The PostScript language of ESC instruction sets, the PCL PDLs of Hewlett-Packard Corporation or Adobe companies.As print control refers to Order transmission is Vector Message, for example, it is desirable to which printer prints the order of straight line, as long as incoming straight line two points of head and the tail Coordinate information, printer can just be printed, rather than transmit on whole straight line information a little, such transmitted data amount Few, execution efficiency is high, and print speed is just fast.
Technical scheme is by configuring to printing type, and carries out different printings according to the mode of configuration The mode of process, solves current printer and there was only a kind of printing type, it is impossible to while supporting that port prints and graphic printing 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 is printed;When higher to printing effect requirements, optional graphics mode is printed.
Such as Fig. 3, it is the method and step flow chart of another kind two kinds of printing types of compatibility of the present invention, comprises the following steps:
Configuration under step 1, graphic printing mode prints content, saves as template file;And/or match somebody with somebody under the printing type of port Put printing content and print control job sequence is generated according to content is printed, save as instruction sequence files;
In this step, the content that image is printed and port prints is respectively configured.Specifically, graphic printing template is selected, it is right Print content to be configured, configure each print entry correlation attribute information, including the title of print entry, print position, height are wide Degree, the font of employing, font size, font style, font color etc. information, preserves into template file;
Selection port printing template, on the basis of printing content configuration is completed, it is to print to increase printing Content Transformation The process of control instruction sequence, step are consistent with aforementioned schemes, specially:Graphic printing preview graph is generated according to content is printed. The printing content can be obtained from template file, when image print and port print template file content it is consistent when, can from times One template file of meaning is obtained and prints content.The template file content printed when template file content and image that port prints is not When consistent, obtain in the template file printed from port and print content and generate image Print Preview figure.Obtain Print Preview figure The middle line number for printing content, often row item number, and each project original position is to left margin or the distance of right margin;According to " beating The line number of print content, often row item number, and each project original position is to left margin or the distance of right margin ", content will be printed Each row of data is converted into print control job sequence, then preserves print control job sequence to job sequence text in order In part, the instruction sequence files equally can be preserved using XML format.For example, the graphic printing according to previous embodiment Preview graph, the job sequence content of generation are 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, according to the printing type for selecting, obtain literary perhaps from the job sequence in printing from the template file Part obtains print control job sequence;
If user's selection port printing type, print control job sequence is obtained from instruction sequence files;If user Graphic printing mode is selected, then the printing content item of concrete needs is obtained from graphic printing template file.
If step 3, selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
Content will be printed using computer resource by printed driver and generate printing bitmap, then bitmap will directly be transmitted Printed to printer.
If print control job sequence is sent to printer and is printed by step 4, selection port printing type.This In step, it is only necessary to print control job sequence will be sent to printer execution directly after dynamic content partial replacement, And the conversion process of job sequence need not be carried out.For example, the graphic printing preview graph according to previous embodiment, as long as by Invoice Number After the dynamic contents such as numbering, operator's title are replaced, print control job sequence is sent to into printer execution.
The technical program is optimized on the basis of previous technical scheme, first by graphic printing Content Transformation for print Control instruction sequence, and be stored in instruction sequence files.During subsequently port printing is carried out, as long as from job sequence File acquisition print control job sequence is simultaneously sent to printer execution, beats so as to avoid configuration under the printing type of port The during print content every time problem carried out by print control job sequence conversion process, further increases the speed of port printing And efficiency.
Such as Fig. 4, it is the structure drawing of device of a kind of compatible two kinds of printing types of the present invention, including:
First processing module, for configuring printing type and printing content, saves as template file;The printing type is Graphic printing and/or port print;
In a preferred embodiment, the template file of this device is preserved in xml format, and the printing content includes static state Content and dynamic content, static content refer to changeless print entry, and dynamic content is beating of may changing every time Print item.
In an additional preferred embodiment, can beat in the same template file configuration graphic printing mode of this device and port The printing content of India side formula.By configuring in same template file simultaneously, graphics mode prints content and port mode prints interior Hold, can effectively reduce the workload that design prints configuration file.
Second processing module, for according to the printing type for selecting, obtaining corresponding printing content from the template file;
3rd processing module, if being graphic printing for printing type, will print content and is sent to printer driver journey Sequence is printed;
Fourth processing module, if printing for port for printing type, generates print control instruction according to content is printed Sequence, is sent to printer and is printed.Wherein, " print control job sequence is generated according to content is printed ", specially:According to Print content and generate graphic printing preview graph;The line number of printing content, often row item number in acquisition Print Preview figure, and each Mesh original position is to left margin or the distance of right margin;According to " line number of printing content, often row item number, and each project rise Beginning position is to left margin or the distance of right margin ", content each row of data will be printed and be converted into print control job sequence.Concrete Application scenarios in, described in this device print control instruction can be EPSON companies ESC instruction sets, PCL page of Hewlett-Packard Corporation The PostScript language of face description language or Adobe companies.
In a preferred embodiment, the device of a kind of compatible two kinds of printing types of the invention, can also be, including:
First processing module, prints content for configuration under graphic printing mode, saves as template file;And/or port Configuration under printing type prints content and generates print control job sequence according to content is printed, and saves as instruction sequence files;
Second processing module, for according to the printing type for selecting, obtaining from the template file in printing perhaps from institute State job sequence and obtain print control job sequence;
3rd processing module, if for selecting graphic printing mode, content will be printed and be sent to printed driver Printed;
Fourth processing module, if for selection port printing type, print control job sequence is sent to printer Printed.
The device of previous compatible two kinds of printing types is different from, in the first processing module of this device, if user have selected Port printing type, then according to content generation print control job sequence is printed, specially:Beat according to content generation figure is printed Print preview graph;The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin Or the distance of right margin;According to " line number of printing content, often row item number, and each project original position is to left margin or the right side The distance on border ", will print content each row of data and is converted into print control job sequence, be saved in instruction sequence files.Pass through The process of print control job sequence will be generated to be included in first processing module, it is possible to achieve once change, be used for multiple times, enter one Step improves speed and the efficiency that port prints.
Above-mentioned specific embodiment is simply explained in detail to technical scheme, the present invention not only only office It is limited to above-described embodiment, every any improvement or replacement according to the principle of the invention all should be within protection scope of the present invention.

Claims (10)

1. a kind of method of compatible two kinds of printing types, it is characterised in that comprise the following steps:
Configuration printing type and printing content, save as template file;The printing type is that graphic printing and/or port are beaten Print;
According to the printing type for selecting, corresponding printing content is obtained from the template file;
If selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
If selection port printing type, print control job sequence is generated according to content is printed, being sent to printer carries out beating Print.
2. a kind of method of compatible two kinds of printing types, it is characterised in that comprise the following steps:
Configuration under graphic printing mode prints content, saves as template file;And/or configuration prints content under the printing type of port And print control job sequence is generated according to content is printed, save as instruction sequence files;
According to the printing type for selecting, obtain from the template file in printing and perhaps printing is obtained from the instruction sequence files Control instruction sequence;
If selecting graphic printing mode, content will be printed and be sent to printed driver and printed;
If print control job sequence is sent to printer and is printed by selection port printing type.
3. the method for two kinds of printing types of compatibility as claimed in claim 1 or 2, it is characterised in that described " according to printing content Generate print control job sequence ", specially:
Graphic printing preview graph is generated according to content is printed;
The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin or the right side The distance on border;
According to " line number of printing content, often row item number, and each project original position is to left margin or the distance of right margin ", Content each row of data will be printed and be converted into print control job sequence.
4. the method for two kinds of printing types of compatibility as claimed in claim 3, it is characterised in that the template file and the finger Sequential file is made to preserve in xml format.
5. the method for two kinds of printing types of compatibility as claimed in claim 3, it is characterised in that the printing content includes static state Content and dynamic content.
6. the method for two kinds of printing types of compatibility as claimed in claim 3, it is characterised in that the print control instruction is ESC, PCL or PostScript.
7. a kind of device of compatible two kinds of printing types, it is characterised in that include:
First processing module, for configuring printing type and printing content, saves as template file;The printing type is figure Print and/or port prints;
Second processing module, for according to the printing type for selecting, obtaining corresponding printing content from the template file;
3rd processing module, if for selecting graphic printing mode, content will be printed and be sent to printed driver and carried out Print;
Fourth processing module, if for selection port printing type, generating print control job sequence according to content is printed, sending out Give printer to be printed.
8. a kind of device of compatible two kinds of printing types, it is characterised in that include:
First processing module, prints content for configuration under graphic printing mode, saves as template file;And/or port prints Configuration under mode prints content and generates print control job sequence according to content is printed, and saves as instruction sequence files;
Second processing module, for according to the printing type for selecting, obtaining from the template file in printing perhaps from the finger Sequential file is made to obtain print control job sequence;
3rd processing module, if for selecting graphic printing mode, content will be printed and be sent to printed driver and carried out Print;
Fourth processing module, if for selection port printing type, print control job sequence is sent to printer is carried out Print.
9. the as claimed in claim 7 or 8 device of two kinds of printing types of compatibility, it is characterised in that described " according to printing content Generate print control job sequence ", specially:
Graphic printing preview graph is generated according to content is printed;
The line number of printing content, often row item number in acquisition Print Preview figure, and each project original position is to left margin or the right side The distance on border;
According to " line number of printing content, often row item number, and each project original position is to left margin or the distance of right margin ", Content each row of data will be printed and be converted into print control job sequence.
10. the device of two kinds of printing types of compatibility as claimed in claim 9, it is characterised in that the template file and described Instruction sequence files are preserved 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 true CN106598510A (en) 2017-04-26
CN106598510B 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)

Cited By (2)

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

Citations (10)

* 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
CN101131628A (en) * 2006-08-23 2008-02-27 三星电子株式会社 Print data output device to select a printer language and method of selecting a printer language
US20080130036A1 (en) * 2006-11-30 2008-06-05 Canon Kabushiki Kaisha Variable data printing within a print driver
US20080180713A1 (en) * 2007-01-31 2008-07-31 Konica Minolta Systems Laboratory, Inc. Direct printing of a desired or multiple appearances of object in a document file
CN101625726A (en) * 2009-08-05 2010-01-13 北大方正集团有限公司 Printing method and printing system
CN101782842A (en) * 2009-01-16 2010-07-21 佳能株式会社 Printing control apparatus and control method thereof
CN102360274A (en) * 2011-09-30 2012-02-22 上海慧谋网络科技有限公司 Variable-data printing template realization device and application method for same
US20120062913A1 (en) * 2010-09-13 2012-03-15 Canon Kabushiki Kaisha Information processing apparatus, information processing method and storage medium
CN104508622A (en) * 2012-08-14 2015-04-08 精工爱普生株式会社 Epos printing
CN104598178A (en) * 2014-12-30 2015-05-06 福建星网视易信息系统有限公司 Port printing method and device

Patent Citations (10)

* 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
CN101131628A (en) * 2006-08-23 2008-02-27 三星电子株式会社 Print data output device to select a printer language and method of selecting a printer language
US20080130036A1 (en) * 2006-11-30 2008-06-05 Canon Kabushiki Kaisha Variable data printing within a print driver
US20080180713A1 (en) * 2007-01-31 2008-07-31 Konica Minolta Systems Laboratory, Inc. Direct printing of a desired or multiple appearances of object in a document file
CN101782842A (en) * 2009-01-16 2010-07-21 佳能株式会社 Printing control apparatus and control method thereof
CN101625726A (en) * 2009-08-05 2010-01-13 北大方正集团有限公司 Printing method and printing system
US20120062913A1 (en) * 2010-09-13 2012-03-15 Canon Kabushiki Kaisha Information processing apparatus, information processing method and storage medium
CN102360274A (en) * 2011-09-30 2012-02-22 上海慧谋网络科技有限公司 Variable-data printing template realization device and application method for same
CN104508622A (en) * 2012-08-14 2015-04-08 精工爱普生株式会社 Epos printing
CN104598178A (en) * 2014-12-30 2015-05-06 福建星网视易信息系统有限公司 Port printing method and device

Cited By (2)

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

Also Published As

Publication number Publication date
CN106598510B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
US5983243A (en) Data processing system and method for Preparing a presentation-ready document that produces separate images of fixed and variable data and a bookticket specifying an arrangement of such images
CN106528006A (en) Page printing method and device
JP5782865B2 (en) Printer driver
CN105511818B (en) The generation method of voucher templates, apparatus and system
CN105278890B (en) Information processing unit and control method
JP2018147259A (en) Information processing device, program, storage medium, and information processing method
US8773677B2 (en) Information processing apparatus, PDL data conversion method, and storage medium
CN106598510B (en) The method and device of compatible two kinds of printing types
JPH08286860A (en) Output control method, its device and its computer program product
US8860990B2 (en) Information processing apparatus, PDL data conversion method, and storage medium
JP2015225481A (en) Program for efficiently editing print setting information
CN101145094A (en) Host apparatus to set N-up function and control method thereof
TW201637888A (en) Data processing apparatus, recording apparatus and control method of the data 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
JP2007011515A (en) Print system, control method of print system and program
CN107015770A (en) Message processing device and printing data generating method
CN104461406B (en) A kind of print-out method and device
JP5600960B2 (en) Host computer, print data generation method and program
US20120072827A1 (en) Information processing apparatus, page description method, and storage medium
JP3521056B2 (en) Printer driver, computer having printer driver, and computer system
JP2020518884A (en) System and method for cropping an image
JP5423197B2 (en) Variable printing system, variable printing method, layout conversion device, and text image generation device
JP2005275545A (en) Document print controller, document print control method and document print control program
JP2013161459A (en) Document processing 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