CN106528006A - Page printing method and device - Google Patents

Page printing method and device Download PDF

Info

Publication number
CN106528006A
CN106528006A CN201510575159.0A CN201510575159A CN106528006A CN 106528006 A CN106528006 A CN 106528006A CN 201510575159 A CN201510575159 A CN 201510575159A CN 106528006 A CN106528006 A CN 106528006A
Authority
CN
China
Prior art keywords
print
printing device
printing
page
type style
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
CN201510575159.0A
Other languages
Chinese (zh)
Other versions
CN106528006B (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.)
Cainiao Smart Logistics Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510575159.0A priority Critical patent/CN106528006B/en
Publication of CN106528006A publication Critical patent/CN106528006A/en
Application granted granted Critical
Publication of CN106528006B publication Critical patent/CN106528006B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

The invention discloses a page printing method and device. The page printing method comprises the following steps of: receiving a page printing instruction sent from an application, wherein the page printing instruction carries printing style template identification, data to be printed, and the corresponding relationship information of the data to be printed and a data variable in a printing style template; according to the printing style template identification, obtaining a preset printing style template; according to the corresponding relationship information, utilizing the data to be printed to carry out assignment on the data variable in the obtained printing style template; drawing the printing style template subjected to the assignment; aiming at a drawing result to generate a printing task; and sending the printing task to printing equipment to be printed. By use of the above scheme, a printing style does not need to be controlled through the printing instruction, and the execution efficiency of an application is effectively improved. For application development personnel, a complex printing instruction specification does not need to be mastered, and learning cost can be effectively lowered.

Description

A kind of page print method and device
Technical field
The application is related to Computer Applied Technology field, more particularly to a kind of page print method and device.
Background technology
With the fast development of internet, the daily behavior that webpage has become many users is browsed, correspondingly, Webpage to being browsed under special scenes is printed out, and also becomes a kind of more common of demand.
At present, the most basic mode for realizing page print is the printing function of invoking web page browser, but clear The printing function that device of looking at is provided is typically relatively simple, lacks customizability.For the problem, prior art is carried For another kind of page print be achieved in that, increase printing function operate interface (example in Webpage Such as page button, page menus etc.), it is allowed to the printing function that user is provided using webpage itself, so as to realize The printing effect of more horn of plenty.This mode typically requires that user installs specific printing in advance in a browser Feature card, the plug-in unit are engaged with the operate interface on the page, after user uses printing function, the page (this In can be regarded as an application) first according to print demand generate specific format print command, then will beat Print instruction is sent to printing function plug-in unit, after printing function plug-in unit is parsed to print command, drives and prints Machine hardware completes printing.
The mode of printing function is provided using webpage itself, type style can be effectively enriched, however, often Plant different printing effects to be required for different print commands to realize, after user selects printing function every time, The page is required for regenerating corresponding print command, and type style is more complicated, then need the instruction for generating Content is also more complicated, is unfavorable for lifting the execution efficiency of application.On the other hand, different printing function plug-in units The print command specification for being used is different, and developer needs first to grasp corresponding instruction when webpage is developed Specification, if necessary to realize complicated type style, in addition it is also necessary to use the instruction of more complexity, this is virtually Increased the learning cost of developer.
The content of the invention
The application provides a kind of page print method and device, to avoid generating complicated beating in print procedure Print instruction, technical scheme are as follows:
According to the first aspect of the application, there is provided a kind of page print method, print controlling apparatus are applied to, The method can include:
The page print instruction that application sends is received, is carried in the page print instruction:Type style template Mark, data to be printed and the data to be printed with the type style template data variable it is right Answer relation information;
According to the type style template identification, default type style template is obtained;
According to the correspondence relationship information, using the data to be printed in acquired type style template Data variable carry out assignment;
The type style template of assignment is drawn;
Print out task is generated for drawing result;
The print out task is sent to printing device and is printed.
According to the second aspect of the application, there is provided a kind of page print device, print controlling apparatus are applied to, The device can include:
Print command receiver module, for receiving the page print instruction that application sends, the page print refers to Carry in order:Type style template identification, data to be printed and the data to be printed and the printing The correspondence relationship information of data variable in pattern template;
Template acquisition module, for according to the type style template identification, obtaining default type style mould Plate;
Template assignment module, for according to the correspondence relationship information, using the data to be printed to being obtained Data variable in the type style template for taking carries out assignment;
Drafting module, for drawing to the type style template of assignment;
Print out task generation module, for generating print out task for drawing result;
Print out task sending module, is printed for the print out task is sent to printing device.
The technical scheme provided by the embodiment of the present application, type style is previously defined in printing template, should Used in when performing printing, it is only necessary to provide the data for needing to print, by specifying the printing template i.e. can be with Realize the selection of type style, it is not necessary to type style is controlled by print command, application is effectively increased Execution efficiency.For application developer, it is not required that grasp complicated print command specification Abundant type style is realized, learning cost can be effectively reduced.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, The application can not be limited.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, below will be to implementing Example or accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, describe below In accompanying drawing be only the application described in some embodiments, for those of ordinary skill in the art, Can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is a kind of configuration diagram of application scheme runtime;
Fig. 2 a and Fig. 2 b is second of application scheme runtime and the third configuration diagram respectively;
Fig. 3 is the schematic flow sheet of the page print method of the application;
Fig. 4 is a kind of schematic diagram of the application type style template;
Fig. 5 is a kind of effect diagram of printing demand of the application;
Fig. 6 is another kind of schematic diagram of the application type style template;
Fig. 7 a and Fig. 7 b are the schematic diagrames of two kinds of printing device configuration items of the application;
Fig. 8 is the structural representation of the page print device of the application.
Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with this Shen Accompanying drawing that please be in embodiment, is described in detail to the technical scheme in the embodiment of the present application, it is clear that institute The embodiment of description is only some embodiments of the present application, rather than the embodiment of whole.Based on the application In embodiment, the every other embodiment obtained by those of ordinary skill in the art should all belong to this Shen The scope that please be protect.
Existing browser prints plug-in unit, there is provided the type style of more horn of plenty, and browser is provided Basic printing function has done supplement, wherein, the realization of type style be by specific print command controlling, After user performs printing, web application needs the content for printing as needed, generates in real time corresponding Print command.
For example, it is desired to print " name in the upper left corner of paper:Zhang San " printed words, it is desirable to which width is 200, height Spend for 50, it is 11 that font is lishu, font size, needs to generate following print command:
SET_PRINT_STYLE("FontSize",11);
// define font size
SET_PRINT_STYLE (" FontName ", " lishu ");
// define font
ADD_PRINT_TEXT (0,0,200,50, " name:Zhang San ");
// definition prints origin coordinates, print span/height and text to be printed
It can be seen that, all of type style is all directly stated in instruction, needs the type style realized to get over Complexity, then corresponding print command is also more complicated.As print command is all that web application is receiving printing Generate in real time after operation, it is therefore desirable to which the content of printing is more, type style is more complicated, generates code institute The cost for needing is bigger.And for the print command for being generated every time is both for this printing, such as Fruit user re-executes printing, needs to regenerate new print command.Therefore, it is this based on instruction The actual execution efficiency of control type style is unsatisfactory.
Additionally, for application developer, needing the reality of the generation logic write application of print command In modern code, this requires that application developer grasps the using method of these print commands first, for example, go up The functions such as the SET_PRINT_STYLE (), the ADD_PRINT_TEXT () that state, increased developer's Learning cost.And, above-mentioned function is actually only certain function defined in specific printing plug-in unit, if Need application to support various printing plug-in units, then need the content of developer's study further can increase.
For problem above, the application provides a kind of page print method, and one kind for performing the method Page print device, first below the runtime framework of application scheme is illustrated.Referring to Fig. 1 Shown, the entity that application scheme is related to includes:Using 100, page print device 200, printing device 300, Wherein:
The initiator of printing using 100, can be independent application program, or have should With the webpage (being opened using browser) of function;After using 100 printings for obtaining user, generate and print Instruction is sent to page print device 200;
Page print device 200 is the intermediate treatment side of printing, can be real in independent application program It is existing, it is also possible to be realized in the form of plug-in unit (Plug-in) in a browser.Page print device 200 is received To after print command, print command is processed, generate corresponding print out task and be sent to printing device 300;
Printing device 300 is the final execution side of printing, for final output print result.
Generally, in above-mentioned three kinds of entities, printing device 300 be physical entity, can be printer, Or with equipment such as the all-in-one multifunctional machines for printing out function;Using 100 and page print device 200 For logic entity, both may be located in identical physical entity, as shown in Figure 2 a, it is also possible to positioned at difference Physical entity in, as shown in Figure 2 b.Wherein, in this application, by residing for page print device 200 Entity is referred to as print controlling apparatus, and the equipment has communication connection with printing device 300, and can drive Printing device 300 performs print out task, and concrete form can be server, PC, mobile phone, panel computer Deng polytype.It is understood that in some cases, also may be used using 100 or page print device 200 Same Physical entity is located at printing device 300, for example, the Intelligent printing equipment of operating system is installed, The application need not be simultaneously defined to this.If it is further to note that under virtual machine environment, Above-mentioned " equipment " concept can further expand to " virtual machine " aspect, rather than refer in particular to a physics Equipment.
Below the page print method performed by page print device 200 is described in detail, referring to Fig. 3 Shown, the method may comprise steps of:
S101, receives the page print instruction that application sends, wherein carries in page print instruction:Print sample Formula template identification, data to be printed and the data to be printed are become with data in the type style template The correspondence relationship information of amount;
S102, according to the type style template identification, obtains default type style template;
S103, according to the correspondence relationship information, using the data to be printed to acquired type style Data variable in template carries out assignment;
S104, draws to the type style template of assignment;
S105, generates print out task for drawing result;
S106, the print out task is sent to printing device and is printed.
Compared with the existing mode based on instruction control type style, the application is advance by the way of Design type style template, it would be desirable to type style define in a template, the printing content regions in template Domain is substituted using variable name, just real incoming when printing.Fig. 4 show one kind of type style template and shows It is intended to, wherein " customer " is a variable.When printing is performed, need what is used using specified Type style template, and the data (such as " Zhang San " in previous examples) for being actually needed printing are passed through Instruction is incoming, and page print device is by the variable of data assignment to template, you can obtain needing the interior of printing Hold.It can be seen that, in the print command of the application, it is only necessary to comprising specified template and number to be printed According to content, and the type style such as font, font size, print position, size is then determined by template itself, and is beaten Print instruction is unrelated, therefore need not all generate when printing is performed every time and be largely used to control type style Instruction code.
For application developer, it is only necessary to application realize code in select suitable type style Template, and specify template is assigned to using any partial content as data to be printed, it is not necessary to grasp each The using method of type style control instruction is planted, development efficiency can be effectively lifted.
In actual applications, type style template can based on HTML (HyperText Markup Language, HTML) designing, HTML can provide including CSS (Cascading Style Sheets, CSS) in interior abundant Show Styles, and browser kernel can be directly invoked come to HTML Content is drawn to generate printing content, due to the standard software configuration in browser almost various equipment, Therefore designing type style template based on HTML can further reduce the cost of implementation of application scheme.This Outward, HTML is a kind of very familiar markup language of web developer, therefore is designed based on HTML Type style template can also further reduce the learning cost of application developer.
With reference to a specific example, the side of type style is realized to utilization template provided herein Case is illustrated.
Shown in Fig. 5, it is the business card design specimen page schematic diagram of certain making visiting card application needs printing, if used Prior art, when printing is performed, application needs to generate code below to realize corresponding type style:
SET_PRINT_STYLE("FontSize",11);
ADD_PRINT_TEXT (20,180,100,25, " Guo Deqiang ");
SET_PRINT_STYLEA (1, " FontName ", " lishu ");
SET_PRINT_STYLEA(1,"FontSize",15);
ADD_PRINT_TEXT (53,187,75,20, " scientist ");
ADD_PRINT_TEXT (100,131,272,20, " address:The western lane in East Street ") near Academy of Social Sciences of BeiJing, China;
ADD_PRINT_TEXT (138,132,166,20, " phone:010-88811888");
It can be seen that, according to the implementation of prior art, the various information related to type style, including font, Font size, position, size etc. be all defined in print command (here after three style of writing words using be all silent The font recognized and font size, therefore do not generate corresponding definition statement).And scheme provided herein is applied, Pre-designed template is only needed, and type style is defined in a template, the template is directly invoked i.e. when printing Can, it is not necessary to which printing every time all generates pattern control routine.
Fig. 6 show a kind of schematic diagram of type style template, wherein " name ", " title " " address " " telphone " is variable, and the information such as font, font size, position, size it is defined in a template, It is understood that these information are needed by code definition, and are stored in template file, Fig. 6 institutes Show it is only that the template represents effect diagram.
User is when using applying, it can be seen that template represents effect, and application can point out user to insert printing Necessary information needed for business card, after user really inserts information and confirms to be printed, using generation print command Send to page print device.
Assume user the template the information inserted of white space be followed successively by " Guo Deqiang ", " scientist ", " in East Street near Beijing Academy of Social Sciences of state ", " East Street near Academy of Social Sciences of BeiJing, China ", user performs After confirming printing, application is sent to page print device by following print command is generated:
{
"template":"businesscard.xml",
"data":{"name":" Guo Deqiang ", " title ":" scientist ", " address ":" East Street near Academy of Social Sciences of BeiJing, China ","telphone":"010-88811888”}
}
" template " field of above-mentioned instruction is specified and needs beating using entitled " businesscard.xml " Pull formula template, and in " data " field, then this content of text data for needing to print is given, and The corresponding relation of these data and data variable in template is given, for example:" Guo Deqiang " correspondence " name ", " scientist " correspondence " title ", etc..It can be seen that, in the instruction and not comprising font, font size, printing The style definitions information of position.
It is understood that above-mentioned instruction is only used for schematically illustrating, the application simultaneously need not be to specific language Method form is defined.
In S101, page print device receiving printing orders, and following information is parsed from print command:
A) type style template identification, i.e. " businesscard.xml ";
B) data to be printed, i.e. " Guo Deqiang ", " scientist " etc.;
C) in data to be printed and type style template data variable correspondence relationship information, i.e., " Guo Deqiang " it is right Answer the relations such as " name ", " scientist " correspondence " title ";
In S102, according to type style template identification, default type style template is obtained;Different templates Both can be stored in identical file, it is also possible to be respectively stored in different files, adopt in the present embodiment Template file title " businesscard.xml " in actual applications, can also adopt which as template identification The information of his form is used as template identification, such as template name, template ID etc., as long as the page can be made to beat Printing equipment is put and uniquely determines corresponding template according to the mark.In certain circumstances, it may be necessary in mark Add the store path of template in information, the path can be the local store path of page print device, It can be the store path on network.For the application of some designed, designed templates, page print device On may not store these templates in advance, in this case, application can be by the network storage road of template Footpath is sent to page print device, such as " http:// 200.0.0.1/businesscard.xml ", so as to page print Device can be got using self-defining template from specified network storage path.
In S103, according to the correspondence relationship information that parsing is obtained, " Guo Deqiang ", " scientist " are waited and being beaten Printing according to respectively assignment in printing template on corresponding data variable, as shown in fig. 6, " name " in template Variable will be substituted by " Guo Deqiang ", " title " variable will be substituted by " scientist " ... by that analogy. If there is cannot assignment variable, can be assigned to null value to the variable, corresponding printing effect is blank. This step only to being replaced using incoming data to be printed, protect by other type styles defined in template Hold constant.
In S104, the type style template of assignment is drawn;For ensureing final printing effect, this Application is that text message is converted to graphical information to be sent to printing device, and page print device can be using fixed The mode of justice is drawn to template.And in practical application, if type style template is set based on HTML Meter, then page print device can directly invoke local browser kernel and template is drawn.
By taking IE browser as an example, page print device can be opened with the IE programs in calling system and has been assigned Html template, the step can not represent human window in running background, to realize nothing to user Perceived effect, is also more suitable for performing bulk print task.Then the IWebBrowser2 according to this IE window The document handles (IHTMLDocument2) of the handle acquiring HTML, then obtain body elements Handle (IHTMLElement), then obtains the view handle (IViewObject2) of body elements, most again IViewObject2.Draw methods are used afterwards, and body elements are rendered into into the polar plot in internal memory (EMF) On.
It is understood that above plot step is only used for schematically illustrating, those skilled in the art can be with root According to actual demand, the drafting of template is realized from other method for drafting or based on other browser kernels, this Application need not be simultaneously defined to this.
In S105, generate print out task for drawing result, including printing device is selected, select paper size, Mono-/bis-face is set and the operation such as prints, these configurations can be selected when user performs printing, by should In print command specify and send and give page print device, if no in print command specify, Page print device can generate print out task using the setting of acquiescence.Additionally, if it is necessary, may be also Needs are zoomed in and out to drawing result according to the PPI (pixels per inch) of configured printing device reality output Process, specific processing mode can be found in prior art, not be described in further detail in this application.
In S106, the print out task of generation is sent to specified printing device, complete printout.Finally beat Print output effect is as shown in Figure 5
As shown in Fig. 1 and Fig. 2 a, Fig. 2 b, the application 100 in application scheme can be with applying work( The webpage of energy, the realization of this mode need user to install printing function plug-in unit in a browser, the plug-in unit Page print device 200 is functioned as, for IE browser, it is possible to use ActiveX modes realize, For browsers such as Firefox, Chrome, Safari, then can be being realized using NPAPI modes.Using 100 Another kind of form be independently of the client application of browser, the application program has and browses webpage Function, while also have the function of generating print command and page print device 200.
It can be seen that, above two mode is required to couple with 200 height of page print device using 100, this There is inconvenience in the situation of kind, for example in actual use:Many users only have a small amount of printing demand, It is reluctant to browser plug-in is specially installed for this, and in the near future, many browsers is (for example Chrome, Edge etc.) will no longer support browser plug-in;For the client application journey independently of browser For sequence, the choice of user is just less, may need in different application programs under extreme case 200 corresponding component of page print device is installed, for developer, it is also desirable to substantially should various Further increase the function of page print device 200 with the basis of, cause overlapping development to a certain extent; Finally, due to apply 100 to couple with 200 height of page print device, both are caused to can be only installed at same In equipment (if in a virtual machine environment, refering in particular to same virtual machine facility), as shown in Figure 2 a, cause Flexibility and convenience are severely limited.
For the problems referred to above, in a kind of specific embodiment of the application, realized using internetwork connection mode Using 100 and the communication of page print device 200, to reduce the degree of coupling between the two.The side of implementing Formula is as follows:
Independently of using 100 operations, " independence " here is both referred to not as clear page print device 200 Look at device plug-in unit, also not as a part for other client applications, but as independent application program Or system service is run in the operating system of print controlling apparatus.
For using 100 sides, need to set up company using network communication protocol with page print device 200 Which kind of which kind of connect, no matter language, the application of technological development, it is only necessary to support that network function can be realization and connect Connect.For example, client application can pass through TCP or udp protocol is set up with page print device 200 Connection;Web applications based on browser execution then can be by the modes such as HTTP, WebSocket and the page Printing equipment 200 sets up connection, and wherein, WebSocket is the communication protocol proposed in HTML5 standards, The browser of many redactions includes that mobile terminal browser all provides the support to WebSocket, http protocol Then suitable for the browser of older version.Certainly, the application the selection of communication protocol need not be limited It is fixed.In fact, either for browser or general client application, network function is all Exist as basic function, therefore for application developer, the realization of this partial function simultaneously need not Extra development cost.
For 200 side of page print device, at least one network communication protocol should be supported, from the angle of versatility Degree considers, can support the network communication protocol of various main flows as far as possible, TCP as escribed above, UDP, HTTP, WebSocket etc..According to aforesaid S101, page print device 200 can be in the specific default network port On monitored using these agreements, upon receipt of the print command sent using 100 sides, will perform Follow-up process step.
It can be seen that, this mode is effectively reduced using the degree of coupling between 100 and page print device 200, It is for developer, it is possible to achieve basic application function and printing function stand-alone development and different Basic application can be multiplexed identical page print device.For a user, it is only necessary to the base needed for installing This functional unit, it is not necessary to extra to install browser plug-in or repeat to install many with printing function Plant application program.Finally, due to such scheme by network come transfer printing instruct, therefore can support across The printing function of equipment, as shown in Figure 2 b, the print command of certain equipment generation can be to transmission to another Equipment, generates print out task by another equipment.Page print device 200 need not be installed in user equipment, Only need to be capable of achieving to beat to the transmission of the equipment equipped with page print device 200 print command by network Print function.
It should be noted that applying such scheme, beat even for application 100 as shown in Figure 2 a and the page Printing equipment puts 200 situations in same equipment, still can realize printing by the way of " network connection " The transmission of instruction, that is to say, that logically, the equipment are both the transmission equipment of print command and connect Receiving unit, the purpose of do so are remained to reduce using the coupling between 100 and page print device 200 It is right so that even if both also independently can be run in being located at same equipment, actually used to improve Flexibility and convenience.
It is further to note that illustrate only in Fig. 1 and Fig. 2 a, Fig. 2 b filling using 100 and page print Put the situation of 200 One-to-one communications, it is to be understood that the middle page print device 200 in the application can Simultaneously to serve multiple applications, these applications can be that the application in same equipment, or difference set Application in standby, so that realize the multiplexing of many equipment, many applications to page print device 200.
If under virtual machine environment, " equipment " concept in the application can further expand to " empty Plan machine " aspect, rather than refer in particular to a physical equipment, with regard to beating for virtual machine concrete implementation and the application India side case is unrelated, is not described in further detail here.
Printing solution provided herein, page print device 200 is except being multiplexed it by multiple applications Outward, can also connect and control multiple stage printing device.The reason for connection multiple stage printing device is different type Printer disclosure satisfy that different printing demands, such as impact printer can be used to print carbon paper, many Connection paper, laser printer can be used to printed document and photo, and thermal printer is then commonly used to print specific Bill or document.Additionally, some printers may support the functions such as duplex printing, colour print, some The function of printer is then fairly simple, etc..Even if only using same printer, selection paper is there is also Type, selection mono-/bis-face are printed, select the demands such as printout resolution ratio.If these are all by user's hand Dynamic configuration, does not only exist cumbersome problem, and what user may not know in many cases Configuration, even this disclosure satisfy that the printing demand of oneself from which platform printing device, cause actual making With difficulty.
For the problems referred to above, in a kind of specific embodiment of the application, according to various actual printing demands, Some printing device configuration item information are pre-defined, in every printing device configuration item information, can be referred to Printing device that the fixed demand is used, paper configuration, format is printed (including mono-/bis-face, horizontal stroke/longitudinal direction, often Page n versions etc.), print resolution etc..Certainly, the specific configuration information type of the above is only used for schematically Illustrate, do not constitute the restriction to application scheme.
Fig. 7 a and Fig. 7 b respectively illustrate the schematic diagram of two kinds of printing device configuration item information, configuration item title Respectively " in lead to face list " and " circle leads to face list ", the parameter specifically included in configuration item has:Required use Printer, print paper select, Print direction select, printing list/two-sided selection, according to Fig. 7 a and figure Configuration result shown in 7b, the specific configuration information of both configuration items is identical.It is understood that this A little information are needed by code definition, and are stored in configuration file, are only these shown in Fig. 7 a and Fig. 7 b Configuration item represents effect diagram.
User applies the selection operation according to user when application side performs printing, or according to printing The automatic identification result of demand, it is determined that the printing configuration for using is needed, then in the print command for being generated, Further add the field for identifying printing device configuration item, for example:
{
templateUrl":"http://205.0.0.1/card.html",
"data":{"customer":"Spirit"},
"configName":" business card "
}
" templateUrl " field in above-mentioned instruction specifies the network storage path of type style template, " data " field gives the content of text data that this needs to print, and gives these data and template The corresponding relation of middle data variable, and " configName " field then specifies the configuration that this printing is used Item title.
Similar with type style template, different configuration items can be both stored in identical file, it is also possible to It is respectively stored in different files, in actual application, in addition to configuration item title, can also adopts With the information of other forms as printing device configuration item message identification, the ID of such as configuration item, configuration item Filename etc., as long as can make page print device uniquely determine corresponding configuration item according to the mark. Additionally, can also further depositing comprising the configuration item information in printing device configuration item message identification here Storage path, and the path can be the local store path of page print device, or depositing on network Storage path, specifically may refer to embodiment above, and the present embodiment is not repeated explanation.
In S105, after page print device receives print command and parses printing device configuration item mark, Default printing device configuration item information is got according to the mark, according to the printer specified in configuration item, The design parameter printing device used to this printing such as print paper is selected, Print direction selection is matched somebody with somebody Put, in configuration item, unspecified parameter can use default configuration, and then generate corresponding print out task.
It should be noted that in configuration item, specifically used printing device can not be specified, if there is Multiple stage printing device, then page print device can automatically select in currently available multiple stage printing device Equipment is performed with the printing device of institute printing device configuration item information match as this print out task.Here " matching " can be realized using multiple rule, for example:Meet specified printing device class in occurrence Type (such as laser printer, thermal printer etc.), the other specification configuration requirement met in configuration item, or Person is determined to meet printer for being currently configured a demand, etc. by searching default corresponding relation. If successful match multiple stage printing device, can be with modes such as random selection or prioritizing selection free devices The current print out task of distribution.
Additionally, in this step, if obtain the failure of printing device configuration item information (such as can not find corresponding Configuration item) or according to printing device configuration item information printing device is carried out configuration failure (for example print set Parameter for specifying in currently not supporting some configuration items), then error message can be returned, or is directly tasted Examination is printed using default configuration, and those skilled in the art flexibly can implement according to the actual requirements.
In the scheme provided by the present embodiment, page print device is using default configuration item information to printing Equipment is once configured, it is not necessary to which user selects item by item, can efficiently reduce user to printing device Inconvenience during printing device is configured or is selected, for page print device, it is also possible to more effectively Ground distributes print out task between multiple stage printing device.
Corresponding to said method embodiment, the application also provides a kind of page print device, shown in Figure 8, The device can include:
Print command receiver module 210, for receiving the page print instruction that application sends, page print instruction Middle carrying:In type style template identification, data to be printed and data to be printed and type style template The correspondence relationship information of data variable;
Template acquisition module 220, for according to type style template identification, obtaining default type style template;
Template assignment module 230, for according to correspondence relationship information, being beaten to acquired using data to be printed Data variable in pull formula template carries out assignment;
Drafting module 240, for drawing to the type style template of assignment;
Print out task generation module 240, for generating print out task for drawing result;
Print out task sending module 260, is printed for print out task is sent to printing device.
According to a kind of specific embodiment of the application, print command receiver module 210, specifically can be used for:
The default network port is monitored, and the page print instruction that application sends is received from the network port.
According to a kind of specific embodiment of the application, the page print instruction received from the network port can be wrapped Include:
Application on print controlling apparatus sends to the page print of the network port and instructs;
Or
Application on non-print control device sends to the page print of the network port and instructs.
According to a kind of specific embodiment of the application, type style template identification can include:
Type style template identification comprising store path.
According to a kind of specific embodiment of the application, type style template can be based on HTML HTML is designed;
Correspondingly drafting module 240 specifically can be used for:Browser kernel is called, the printing sample to assignment Formula template is drawn.
According to a kind of specific embodiment of the application, can also carry in page print instruction:Printing device Configuration item is identified;
Correspondingly, print out task generation module 250, specifically can be used for:
Identified according to printing device configuration item, obtain default printing device configuration item information;
Configured according to the printing device used to print out task by acquired printing device configuration item information, Print out task for drawing result is generated according to configuration result.
According to a kind of specific embodiment of the application, printing device configuration item information can include:
Specify use printing device identification information, paper configuration information, print format configuration information, and/or Print resolution configuration information.
According to a kind of specific embodiment of the application, do not include specifying making in printing device configuration item information In the case of printing device identification information, print out task generation module 250 can be beaten from currently available In printing apparatus, the execution as print out task with the printing device of printing device configuration item information match is selected Equipment.
In said apparatus, the function of modules and effect realizes that process specifically refers to correspondence in said method and walks Rapid realizes process, will not be described here.
As seen through the above description of the embodiments, those skilled in the art can be understood that this Application can add the mode of required general hardware platform to realize by software.Based on such understanding, this Shen The part that technical scheme please is substantially contributed to prior art in other words can be in the form of software product Embody, the computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD etc., use including some instructions so that computer equipment (can be personal computer, server, Or the network equipment etc.) perform method described in some parts of each embodiment of the application or embodiment.
Each embodiment in this specification is described by the way of progressive, phase homophase between each embodiment As part mutually referring to what each embodiment was stressed is the difference with other embodiment. For especially for device embodiment, as which is substantially similar to embodiment of the method, so describe to compare Simply, related part is illustrated referring to the part of embodiment of the method.Device embodiment described above is only It is only illustrative, the wherein described module as separating component explanation can be or may not be physics It is upper separate, when application scheme is implemented can the function of each module in same or multiple softwares and/or Realize in hardware.Some or all of module therein can also be selected according to the actual needs to realize this reality Apply the purpose of a scheme.Those of ordinary skill in the art are not in the case where creative work is paid, you can with Understand and implement.
The above is only the specific embodiment of the application, it is noted that common for the art For technical staff, on the premise of without departing from the application principle, some improvements and modifications can also be made, These improvements and modifications also should be regarded as the protection domain of the application.

Claims (16)

1. a kind of page print method, it is characterised in that be applied to print controlling apparatus, methods described includes:
The page print instruction that application sends is received, is carried in the page print instruction:Type style template Mark, data to be printed and the data to be printed with the type style template data variable it is right Answer relation information;
According to the type style template identification, default type style template is obtained;
According to the correspondence relationship information, using the data to be printed in acquired type style template Data variable carry out assignment;
The type style template of assignment is drawn;
Print out task is generated for drawing result;
The print out task is sent to printing device and is printed.
2. method according to claim 1, it is characterised in that the page that the reception application sends is beaten Print instruction, including:
The default network port is monitored, the page print for receiving application transmission from the network port refers to Order.
3. method according to claim 2, it is characterised in that the page received from the network port Print command, including:
Application on the print controlling apparatus sends to the page print of the network port and instructs;
Or
Application on the non-print controlling apparatus sends to the page print of the network port and instructs.
4. method according to claim 1, it is characterised in that the type style template identification, bag Include:
Type style template identification comprising store path.
5. method according to claim 1, it is characterised in that
The type style template is designed based on HTML HTML;
The type style template to assignment is drawn, including:Browser kernel is called, to assigning The type style template of value is drawn.
6. method according to claim 1, it is characterised in that also carry in the page print instruction: Printing device configuration item is identified;
It is described to generate print out task for drawing result, including:
Identified according to the printing device configuration item, obtain default printing device configuration item information;
Configured according to the printing device used to print out task by acquired printing device configuration item information, Print out task for drawing result is generated according to configuration result.
7. method according to claim 6, it is characterised in that the printing device configuration item information, Including:
Specify use printing device identification information, paper configuration information, print format configuration information, and/or Print resolution configuration information.
8. method according to claim 6, it is characterised in that in the printing device configuration item information In do not include specifying the printing device identification information that uses in the case of, the printing device acquired in the basis The printing device used to print out task by configuration item information is configured, including:
From currently available printing device, the printing with the printing device configuration item information match is selected Execution equipment of the equipment as print out task.
9. a kind of page print device, it is characterised in that be applied to print controlling apparatus, described device includes:
Print command receiver module, for receiving the page print instruction that application sends, the page print refers to Carry in order:Type style template identification, data to be printed and the data to be printed and the printing The correspondence relationship information of data variable in pattern template;
Template acquisition module, for according to the type style template identification, obtaining default type style mould Plate;
Template assignment module, for according to the correspondence relationship information, using the data to be printed to being obtained Data variable in the type style template for taking carries out assignment;
Drafting module, for drawing to the type style template of assignment;
Print out task generation module, for generating print out task for drawing result;
Print out task sending module, is printed for the print out task is sent to printing device.
10. device according to claim 1, it is characterised in that the print command receiver module, Specifically for:
The default network port is monitored, the page print for receiving application transmission from the network port refers to Order.
11. devices according to claim 2, it is characterised in that the page received from the network port Face print command, including:
Application on the print controlling apparatus sends to the page print of the network port and instructs;
Or
Application on the non-print controlling apparatus sends to the page print of the network port and instructs.
12. devices according to claim 9, it is characterised in that the type style template identification, Including:
Type style template identification comprising store path.
13. devices according to claim 9, it is characterised in that
The type style template is designed based on HTML HTML;
The drafting module, specifically for:Browser kernel is called, the type style template of assignment is entered Row is drawn.
14. devices according to claim 9, it is characterised in that also take in the page print instruction Band:Printing device configuration item is identified;
The print out task generation module, specifically for:
Identified according to the printing device configuration item, obtain default printing device configuration item information;
Configured according to the printing device used to print out task by acquired printing device configuration item information, Print out task for drawing result is generated according to configuration result.
15. devices according to claim 14, it is characterised in that the printing device configuration item information, Including:
Specify use printing device identification information, paper configuration information, print format configuration information, and/or Print resolution configuration information.
16. devices according to claim 14, it is characterised in that believe in the printing device configuration item In the case of not including specifying the printing device identification information for using in breath, the print out task generation module, From currently available printing device, the printing device with the printing device configuration item information match is selected As the execution equipment of print out task.
CN201510575159.0A 2015-09-10 2015-09-10 Page printing method and device Active CN106528006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510575159.0A CN106528006B (en) 2015-09-10 2015-09-10 Page printing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510575159.0A CN106528006B (en) 2015-09-10 2015-09-10 Page printing method and device

Publications (2)

Publication Number Publication Date
CN106528006A true CN106528006A (en) 2017-03-22
CN106528006B CN106528006B (en) 2022-05-27

Family

ID=58346040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510575159.0A Active CN106528006B (en) 2015-09-10 2015-09-10 Page printing method and device

Country Status (1)

Country Link
CN (1) CN106528006B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590110A (en) * 2017-09-20 2018-01-16 广州酷狗计算机科技有限公司 Text display method and device
CN108228119A (en) * 2018-01-11 2018-06-29 平安万家医疗投资管理有限责任公司 Method of printing, terminal device and storage medium based on HXML
CN108319435A (en) * 2018-01-24 2018-07-24 北京三快在线科技有限公司 Method of printing, device and the electronic equipment of bill
CN108427543A (en) * 2018-02-01 2018-08-21 厦门盈趣科技股份有限公司 One key Method of printing and a key print system
CN108762697A (en) * 2018-05-25 2018-11-06 苏宁易购集团股份有限公司 A kind of Method of printing and device based on browser end
CN109254740A (en) * 2018-08-31 2019-01-22 北京京东尚科信息技术有限公司 Method of printing, system and electronic equipment
CN109471600A (en) * 2018-10-31 2019-03-15 中国银行股份有限公司 A kind of Method of printing, device and a kind of print system
CN109615803A (en) * 2018-10-09 2019-04-12 北京辰森世纪科技股份有限公司 A kind of data-printing method and device
CN109783037A (en) * 2019-01-02 2019-05-21 上海济强电子科技有限公司 A kind of instruction of print control and control method
CN109976683A (en) * 2019-02-28 2019-07-05 广州达安临床检验中心有限公司 Method of printing, device, equipment and the storage medium of data
CN110221790A (en) * 2019-05-28 2019-09-10 迈克医疗电子有限公司 Universal printing method and device, analysis instrument and storage medium
CN110389726A (en) * 2018-04-17 2019-10-29 富士施乐株式会社 Image formation system, record media and image forming method
CN110609666A (en) * 2019-08-02 2019-12-24 北京三快在线科技有限公司 Printer configuration method and device, electronic equipment and readable storage medium
CN110647346A (en) * 2018-06-26 2020-01-03 北京京东尚科信息技术有限公司 Method and device for updating bill of dough
CN110865775A (en) * 2019-09-26 2020-03-06 福建亿能达信息技术股份有限公司 Printing method for online design and preview based on WEB
CN111078161A (en) * 2019-11-15 2020-04-28 北京三快在线科技有限公司 Printer simulation method and device, electronic equipment and storage medium
CN111488130A (en) * 2020-03-20 2020-08-04 厦门汉印电子技术有限公司 Cloud printing method, device and system and cloud printer
CN111756799A (en) * 2020-05-20 2020-10-09 拉扎斯网络科技(上海)有限公司 Method and device for processing printing information
CN113791743A (en) * 2021-08-09 2021-12-14 西安立人行档案文件管理咨询有限公司 Printing control method, device and medium based on HTTP (hyper text transport protocol)
CN117827121A (en) * 2023-10-23 2024-04-05 杭州瀚斯科技有限公司 Method for printing washing labels in batches and washing label printing system

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1079311A2 (en) * 1999-08-25 2001-02-28 Hewlett-Packard Company Method and system for creating web-quality online documentation from the same source file as printed documentation
JP2003150353A (en) * 2001-11-16 2003-05-23 Canon Inc Printing system, server, printing method, storage medium and program
CN101004736A (en) * 2007-01-25 2007-07-25 北京方正国际软件系统有限公司 Template device of style set for quick formatting layout, and implement method
CN102214076A (en) * 2010-04-02 2011-10-12 深圳市金蝶中间件有限公司 Method and device for implementing print on Web page
CN102375716A (en) * 2010-08-26 2012-03-14 北大方正集团有限公司 Variable data printing method and system
CN103870984A (en) * 2014-02-28 2014-06-18 浪潮软件集团有限公司 Network invoice template control method based on cloud computing
CN103885731A (en) * 2012-12-20 2014-06-25 北大方正集团有限公司 Data printing method and device
CN104461412A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Web page designated area printing method and system
CN104636093A (en) * 2015-02-13 2015-05-20 深圳支付界科技有限公司 Method and system for non-handwritten entering and printing of express sheets
CN104700297A (en) * 2013-12-09 2015-06-10 航天信息股份有限公司 Method and device for dynamically controlling network invoices
CN104731536A (en) * 2015-02-27 2015-06-24 新石器龙码(北京)科技有限公司 Printer, a printing method and printing system
CN104899031A (en) * 2015-05-29 2015-09-09 北京京东尚科信息技术有限公司 Logistics data generation method and apparatus and logistics client configuration method and apparatus

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1079311A2 (en) * 1999-08-25 2001-02-28 Hewlett-Packard Company Method and system for creating web-quality online documentation from the same source file as printed documentation
JP2003150353A (en) * 2001-11-16 2003-05-23 Canon Inc Printing system, server, printing method, storage medium and program
CN101004736A (en) * 2007-01-25 2007-07-25 北京方正国际软件系统有限公司 Template device of style set for quick formatting layout, and implement method
CN102214076A (en) * 2010-04-02 2011-10-12 深圳市金蝶中间件有限公司 Method and device for implementing print on Web page
CN102375716A (en) * 2010-08-26 2012-03-14 北大方正集团有限公司 Variable data printing method and system
CN103885731A (en) * 2012-12-20 2014-06-25 北大方正集团有限公司 Data printing method and device
CN104700297A (en) * 2013-12-09 2015-06-10 航天信息股份有限公司 Method and device for dynamically controlling network invoices
CN103870984A (en) * 2014-02-28 2014-06-18 浪潮软件集团有限公司 Network invoice template control method based on cloud computing
CN104461412A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Web page designated area printing method and system
CN104636093A (en) * 2015-02-13 2015-05-20 深圳支付界科技有限公司 Method and system for non-handwritten entering and printing of express sheets
CN104731536A (en) * 2015-02-27 2015-06-24 新石器龙码(北京)科技有限公司 Printer, a printing method and printing system
CN104899031A (en) * 2015-05-29 2015-09-09 北京京东尚科信息技术有限公司 Logistics data generation method and apparatus and logistics client configuration method and apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JENNIFER STURM; MARIO HILDEBRANDT; JANA DITTMANN: ""High quality training materials to detect printed fingerprints: Benchmarking three different aquisition sensors producing printing templates"", 《2013 INTERNATIONAL WORKSHOP ON BIOMETRICS AND FORENSICS (IWBF)》 *
李晓婷: ""基于SOA架构的Web图表生成与打印系统"", 《中国优秀博硕士学位论文全文数据库(硕士) 信息科技辑》 *

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590110A (en) * 2017-09-20 2018-01-16 广州酷狗计算机科技有限公司 Text display method and device
CN108228119A (en) * 2018-01-11 2018-06-29 平安万家医疗投资管理有限责任公司 Method of printing, terminal device and storage medium based on HXML
CN108228119B (en) * 2018-01-11 2021-04-23 平安万家医疗投资管理有限责任公司 Printing method based on HXML, terminal equipment and storage medium
CN108319435A (en) * 2018-01-24 2018-07-24 北京三快在线科技有限公司 Method of printing, device and the electronic equipment of bill
CN108427543A (en) * 2018-02-01 2018-08-21 厦门盈趣科技股份有限公司 One key Method of printing and a key print system
CN108427543B (en) * 2018-02-01 2021-07-20 厦门盈趣科技股份有限公司 One-key printing method and one-key printing system
CN110389726A (en) * 2018-04-17 2019-10-29 富士施乐株式会社 Image formation system, record media and image forming method
CN108762697A (en) * 2018-05-25 2018-11-06 苏宁易购集团股份有限公司 A kind of Method of printing and device based on browser end
CN108762697B (en) * 2018-05-25 2023-06-23 苏宁易购集团股份有限公司 Printing method and device based on browser end
CN110647346A (en) * 2018-06-26 2020-01-03 北京京东尚科信息技术有限公司 Method and device for updating bill of dough
CN109254740A (en) * 2018-08-31 2019-01-22 北京京东尚科信息技术有限公司 Method of printing, system and electronic equipment
CN109615803A (en) * 2018-10-09 2019-04-12 北京辰森世纪科技股份有限公司 A kind of data-printing method and device
CN109471600A (en) * 2018-10-31 2019-03-15 中国银行股份有限公司 A kind of Method of printing, device and a kind of print system
CN109783037A (en) * 2019-01-02 2019-05-21 上海济强电子科技有限公司 A kind of instruction of print control and control method
CN109976683A (en) * 2019-02-28 2019-07-05 广州达安临床检验中心有限公司 Method of printing, device, equipment and the storage medium of data
CN109976683B (en) * 2019-02-28 2022-08-02 广州达安临床检验中心有限公司 Data printing method, device, equipment and storage medium
CN110221790A (en) * 2019-05-28 2019-09-10 迈克医疗电子有限公司 Universal printing method and device, analysis instrument and storage medium
CN110221790B (en) * 2019-05-28 2023-02-21 迈克医疗电子有限公司 Universal printing method and apparatus, analyzer, and storage medium
CN110609666A (en) * 2019-08-02 2019-12-24 北京三快在线科技有限公司 Printer configuration method and device, electronic equipment and readable storage medium
CN110609666B (en) * 2019-08-02 2021-10-01 北京三快在线科技有限公司 Printer configuration method and device, electronic equipment and readable storage medium
CN110865775A (en) * 2019-09-26 2020-03-06 福建亿能达信息技术股份有限公司 Printing method for online design and preview based on WEB
CN110865775B (en) * 2019-09-26 2022-05-17 福建亿能达信息技术股份有限公司 Printing method for online design and preview based on WEB
CN111078161A (en) * 2019-11-15 2020-04-28 北京三快在线科技有限公司 Printer simulation method and device, electronic equipment and storage medium
CN111488130A (en) * 2020-03-20 2020-08-04 厦门汉印电子技术有限公司 Cloud printing method, device and system and cloud printer
CN111756799A (en) * 2020-05-20 2020-10-09 拉扎斯网络科技(上海)有限公司 Method and device for processing printing information
CN111756799B (en) * 2020-05-20 2023-04-07 拉扎斯网络科技(上海)有限公司 Method and device for processing printing information
CN113791743A (en) * 2021-08-09 2021-12-14 西安立人行档案文件管理咨询有限公司 Printing control method, device and medium based on HTTP (hyper text transport protocol)
CN117827121A (en) * 2023-10-23 2024-04-05 杭州瀚斯科技有限公司 Method for printing washing labels in batches and washing label printing system

Also Published As

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

Similar Documents

Publication Publication Date Title
CN106528006A (en) Page printing method and device
CN105938470B (en) Information processing system, server device, and control method
US20040163049A1 (en) Document processing method
CN104679457B (en) Information processing equipment, information processing method and recording medium
CN108228119A (en) Method of printing, terminal device and storage medium based on HXML
CN106980508A (en) Method and apparatus for generating the page
CN104717395B (en) Print service provides device and print system
US6928462B2 (en) System and method for distributed processing of non-processable elements of a document to be rendered on a client
CN108875323A (en) watermark adding method and device
CN102541827B (en) Method and system for describing extensible marking language of document
CN104461412A (en) Web page designated area printing method and system
CN104951311B (en) A kind of page animation method and device
JPH09223062A (en) Customization method for service offering form and server device applicable to execution of the customization method
CN103377011B (en) A kind of moving printing method of public network
CN112486437A (en) Method for printing in Web application by cross-platform and cross-browser
US6665090B1 (en) System and method for creating and printing a creative expression
US20140022594A1 (en) Printing system, print relay server, method of controlling the server, and program
KR102193821B1 (en) Recording device and data generation method
CN111367607A (en) Dynamic electronic contract generating and signing system and implementation method thereof
CN101145094A (en) Host apparatus to set N-up function and control method thereof
CN103034990B (en) The method and apparatus of publication verification
CN107015959A (en) A kind of method that version is closed to pdf document
CN110459022A (en) A kind of Small Ticket Printing System and method
CN106598510B (en) The method and device of compatible two kinds of printing types
CN109164992A (en) A kind of system for supporting multilingual printing template and its be converted into html template

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180323

Address after: Four story 847 mailbox of the capital mansion of Cayman Islands, Cayman Islands, Cayman

Applicant after: CAINIAO SMART LOGISTICS HOLDING Ltd.

Address before: Cayman Islands Grand Cayman capital building a four storey No. 847 mailbox

Applicant before: ALIBABA GROUP HOLDING Ltd.

GR01 Patent grant
GR01 Patent grant