CN109542366A - Method of printing, device, equipment and storage medium based on browser - Google Patents

Method of printing, device, equipment and storage medium based on browser Download PDF

Info

Publication number
CN109542366A
CN109542366A CN201811256869.7A CN201811256869A CN109542366A CN 109542366 A CN109542366 A CN 109542366A CN 201811256869 A CN201811256869 A CN 201811256869A CN 109542366 A CN109542366 A CN 109542366A
Authority
CN
China
Prior art keywords
browser
printer
print
parameter
local service
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
CN201811256869.7A
Other languages
Chinese (zh)
Other versions
CN109542366B (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.)
Jindiyun Technology Co., Ltd.
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201811256869.7A priority Critical patent/CN109542366B/en
Publication of CN109542366A publication Critical patent/CN109542366A/en
Application granted granted Critical
Publication of CN109542366B publication Critical patent/CN109542366B/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/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1287Remote printer device, e.g. being remote from client or server via internet
    • 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/1229Printer resources management or printer maintenance, e.g. device status, power levels
    • G06F3/1231Device related settings, e.g. IP address, Name, Identification
    • 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/1268Job submission, e.g. submitting print job order or request not the print data itself
    • G06F3/1272Digital storefront, e.g. e-ordering, web2print, submitting a job from a remote submission screen

Abstract

This application involves a kind of Method of printing based on browser, device, computer equipment and storage mediums.The described method includes: obtaining the print command that browser generates;The print command includes browser mark and print data;It calls the browser to identify corresponding local service, printer parameter and the print data is obtained according to the print command;According to the printer parameter, controls printer and print the print data.Due to identifying corresponding local service by calling browser, and then printer printing is controlled, therefore for the different editions of different browsers or same browser, without configuring third party's external module, greatly reduces development cost and maintenance cost.

Description

Method of printing, device, equipment and storage medium based on browser
Technical field
This application involves printing fields, are situated between more particularly to a kind of Method of printing of browser, device, equipment and storage Matter.
Background technique
With the continuous development of information technology, computer equipment becomes article indispensable in people's daily life.Its In, the browser application one of the most commonly used as computer equipment connection internet provides various and a large amount of money for user News, user are frequently necessary to the direct printed information on the page of browser.
Many users are when opening the page of browser, it is often desirable that the page data of display is printed by browser, Traditional browsing device net page data-printing method is to call browser print command to carry out web data by webpage embedded components Printing.
However, can have compatibility issue and component stabilization between different browsers or the different editions of same browser Property problem, and each browser is inconsistent for the standard of external module, and every kind of browser is caused to require stand-alone development one Corresponding external module causes development cost very high, and maintenance cost is also very high.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of Method of printing based on browser, device, calculating Machine equipment and storage medium.
A kind of Method of printing based on browser, which comprises
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and described is obtained according to the print command Print data;
According to the printer parameter, controls printer and print the print data.
It is described in one of the embodiments, to control printer according to the printer parameter and print the print data, It include: that the printer parameter is sent to the printer, so that the printer is joined according to the printer parameter Number setting;When receiving the setting success message that the printer is sent, the print data is sent to the printer.
In one of the embodiments, the method also includes: the browser starting when, at the beginning of controlling the browser Beginningization communications protocol;Communications protocol of the communications protocol between the browser and the local service;It controls described clear Device is look at according to foundation initialization connection between the communications protocol and the local service.
In one of the embodiments, the method also includes: the browser starting when, at the beginning of controlling the browser Beginningization communications protocol;Communications protocol of the communications protocol between the browser and the local service;It controls described clear Device is look at according to foundation initialization connection between the communications protocol and the local service.
If the method also includes calling the local service failure or printer ginseng in one of the embodiments, Number setup failed, then return to failure status message to the browser;According to the failure status message, the browser is controlled Show failure cause;It controls the browser and exits print out task.
It is described in one of the embodiments, that the browser is called to identify corresponding local service, according to the printing Instruction obtains printer parameter and the print data, comprising: by asynchronous between the browser and the local service Transmission interface calls the browser to identify corresponding local service, obtains printer parameter and institute according to the print command State print data.
If the printer parameter includes multiple printer identifiers in one of the embodiments,;It is described to be beaten according to Print machine parameter, control printer print the print data, comprising: determine the corresponding target print of each printer identifier Machine;It controls each target printer and prints the print data.
A kind of printing equipment based on browser, which is characterized in that described device includes:
Module is obtained, for obtaining the print command of browser generation;The print command includes browser mark and beats Printing evidence;
It calls and obtains module, for calling the browser to identify corresponding local service, obtained according to the print command Take printer parameter and the print data;
Control module, for controlling printer and printing the print data according to the printer parameter.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing Device performs the steps of when executing the computer program
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and described is obtained according to the print command Print data;
According to the printer parameter, controls printer and print the print data.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor It is performed the steps of when row
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and described is obtained according to the print command Print data;
According to the printer parameter, controls printer and print the print data.
The above-mentioned Method of printing based on browser, device, computer equipment and storage medium are generated by obtaining browser Print command;The print command includes browser mark and print data;The browser is called to identify corresponding local Service obtains printer parameter and the print data according to the print command;According to the printer parameter, control printing Machine prints the print data.Due to identifying corresponding local service by calling browser, and then printer printing is controlled, because This is significantly reduced the different editions of different browsers or same browser without configuring third party's external module Development cost and maintenance cost.
Detailed description of the invention
Fig. 1 is the applied environment figure of the Method of printing based on browser in one embodiment;
Fig. 2 is the flow diagram of the Method of printing based on browser in one embodiment;
Fig. 3 is the flow diagram of S203 in Fig. 2 embodiment;
Fig. 4 is the flow diagram of the Method of printing based on browser in another embodiment;
Fig. 5 is the flow diagram of the Method of printing based on browser in another embodiment;
Fig. 6 is the flow diagram of the Method of printing based on browser in another embodiment;
If Fig. 7 is that the printer parameter includes multiple printer identifiers, the process signal of S203 in another embodiment Figure;
Fig. 8 is the structural block diagram of the printing equipment based on browser in one embodiment;
Fig. 9 is the structural block diagram of the printing equipment based on browser in another embodiment;
Figure 10 is the structural block diagram of the printing equipment based on browser in another embodiment;
Figure 11 is the structural block diagram of the printing equipment based on browser in another embodiment;
Figure 12 is the structural block diagram of the printing equipment based on browser in another embodiment;
Figure 13 is the structural block diagram of the printing equipment based on browser in another embodiment;
Figure 14 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
Method of printing provided by the present application based on browser, can be applied in application environment as shown in Figure 1.Its In, server 101 is attached with computer equipment 102 by network, and computer equipment 102 can pass through with printer 103 Data line is attached, wherein server 101 can use the server set of the either multiple server compositions of independent server Group realizes, computer equipment 102 may include browser and local service, computer equipment 102 can be computer, mobile phone, Plate etc., printer 103 can with independent printer either multiple groups of printers at printer cluster realize.
In one embodiment, as shown in Fig. 2, providing a kind of Method of printing based on browser, the execution of this method Main body can be operate in the computer equipment 102 in Fig. 1, method includes the following steps:
S201 obtains the print command that browser generates;The print command includes browser mark and print data.
Wherein, browser is actually a software program, for extracting the interested information resources of user, to HTML text Part explains, and then comes out by character image or by multimedia information extraction.Browser can be different types of browsing Device, such as IE browser, 360 browsers, sogou browser, red fox browser etc., can be single or multiple browsers.It beats Print instruction refers to print control order, may include browser mark, browser parameters, print data packet etc..Browser mark The mark that can be browser itself, for distinguishing different browsers, for example, the corresponding browser of IE browser is identified as 1, The corresponding browser of red fox browser is identified as 2;It is also possible to the running example mark of browser, for example, IE browser is more Corresponding identify of a running example can be A01~A0n (n is positive integer), the mark of multiple running examples of red fox browser It can be B01~B0n (n is positive integer).Different browsers has unique browser to identify, different browser execution examples Also unique browser execution identifies.Print data can be from the received print data of server, ERP electronic spreadsheet, Electronic data packet etc..
Specifically, browser clicks the behaviour such as word depghi or user speech receiving user on browser interface After making information, content that browser mark, the current browser page are shown, current browser are from the received printing number of server According to or the content etc. of computer equipment local cache generate print command, what the available browser of computer equipment generated beats Print instruction, alternatively it is also possible to pass through print control language by the subprogram combination producing print command run on browser It is operated in the method for software command to control printer.
S202 calls the browser to identify corresponding local service, obtains printer parameter according to the print command With the print data.
Wherein, local service is actually also a software program, is referred to browser on same client computer A desktop process tray or background service.Printer parameter may include type of printer, printer identifier, printing speed Degree, print resolution, buffer area, print size etc..
Specifically, the corresponding different local service of different browsers mark, and pair of browser mark and local service It should be unique.For example, the corresponding browser of IE browser is identified as 1, it is local that browser, which is identified as 1 corresponding local service, A is serviced, then when printing based on IE browser, computer equipment calls local service A, and then beating further according to what IE browser generated Print instruction obtains printer parameter and print data.
S203 controls printer and prints the print data according to the printer parameter.
Wherein, printer can be separate unit or plurality of printers.For example, the printer class in printer parameter can be passed through Type controls same type of printer and carries out printing;Tool can also be controlled by the printer identifier in printer parameter There is the printer of the mark to carry out printing;Or printer can also be controlled by the print size in printer parameter The page-size etc. of print data.
In the Method of printing based on browser, the print command that browser generates is obtained;The print command includes clear Device of looking at mark and print data;It calls the browser to identify corresponding local service, is obtained and printed according to the print command Machine parameter and the print data;According to the printer parameter, controls printer and print the print data.It is adjusted due to passing through Corresponding local service is identified with browser, and then controls printer printing, therefore for different browsers or identical browsing The different editions of device greatly reduce development cost and maintenance cost without configuring third party's external module.
It is described in one of the embodiments, that the browser is called to identify corresponding local service, according to the printing Instruction obtains printer parameter and the print data, comprising: by asynchronous between the browser and the local service Transmission interface calls the browser to identify corresponding local service, obtains printer parameter and institute according to the print command State print data.
Wherein, asynchronous to refer to one request of transmission, it withouts waiting for returning the result, next ask can be retransmited at any time It asks, that is, withouts waiting for.Asynchronous transmission interface is a kind of common industrial communication interface, for sending out the print command of browser Give local service.
In one of the embodiments, as shown in figure 3, S203 " according to the printer parameter, controls printer and prints institute State print data " include:
The printer parameter is sent to the printer by S301, so that the printer is joined according to the printer Number carries out parameter setting.
Wherein, printer parameter may include print-out rate, print resolution, buffer area, print size etc..
In the present embodiment, computer equipment can play print speed, print resolution, buffer area, print size etc. Print machine parameter is sent to corresponding printer, so that corresponding printer carries out the setting of parameter.For example, computer equipment By print resolution size be 600dpi printer parameter be sent to printer, printer after receiving printer parameter, 600dpi is set by the resolution ratio of printer.
The print data is sent to described by S302 when receiving the setting success message that the printer is sent Printer.
Specifically, printer can send a setting to computer equipment and successfully disappear after setting parameter successfully completes Print data is sent to printer after receiving setting success message by breath, computer equipment.If printer setup parameter is lost It loses, then sends parameter setting failed message to computer equipment, print data will not be then then forwarded to printing by computer equipment Machine.
Method of printing provided in this embodiment based on browser, by the way that the printer parameter is sent to the printing Machine, so that the printer carries out parameter setting according to the printer parameter;In the setting for receiving the printer transmission When success message, the print data is sent to the printer, due to obtaining using the local service in computer equipment Printer parameter, and then printer can carry out parameter setting to printer parameter, Custom Paper size may be implemented, beat The operation such as receipt is printed, and then realizes precise Printing.
Printer can also feed back print result to computer equipment in one of the embodiments, to reflect printing feelings Condition.In method shown in Fig. 3, the method also includes:
S401 receives the print result that the printer is sent.
Wherein, print result is used to indicate the state that is in the presence of in printer print procedure, after printing, can be with It is to print successful status information, be also possible to the Printing Problem occurred in print procedure etc..
Specifically, print result is sent to computer equipment, computer equipment receives after printing is completed by printer The successful result of printing that printer is sent;Alternatively, printer, in print procedure, paper is not enough unable to satisfy printing demand, The print result that number of paper is unable to satisfy printing demand is sent to computer equipment by printer, and computer equipment, which receives, beats The number of paper that print machine is sent is unable to satisfy the print result of printing demand.
S402 calls the local service that the print result is sent to the browser by asynchronism callback interface.
Wherein, asynchronous to refer to one request of transmission, it withouts waiting for returning the result, next ask can be retransmited at any time It asks, that is, withouts waiting for.Asynchronism callback interface is a kind of common industrial communication interface, for returning local service print result Back to browser.Specifically, computer equipment calls corresponding local service to pass through asynchronism callback after receiving print result Print result is sent to corresponding browser by interface.
S403 controls the browser and shows the print result.
Specifically, computer equipment is by calling corresponding local service to send print result by asynchronism callback interface To corresponding browser, controls browser and show that print result, browser can pass through chart, dialog box, special identifier, voice Etc. forms show print result.
Browser requires initialization communication protocol, in each starting to guarantee to browse in one of the embodiments, Connection between device and local service.As shown in figure 5, the method also includes:
S501 controls the browser initiating communications agreement in browser starting;The communications protocol is institute State the communications protocol between browser and the local service.
Wherein, communications protocol is communicated for realizing between browser and local service, i.e. realization browser and local The connection of service, it can be Websocket communications protocol, common Http or Https etc. as communications protocol.It needs to illustrate It is, after the completion of initiating communications agreement, in subsequent print procedure, without repeating initiating communications agreement.
S502 controls the browser according to foundation initialization connection between the communications protocol and the local service.
Wherein, in the initialization subsequent printing of locality connection, locality connection is initialized without repetition.
Method of printing provided in this embodiment based on browser, by controlling described clear when the browser starts Look at device initiating communications agreement;Communications protocol of the communications protocol between the browser and the local service;Control The browser establishes browser and local according to initialization connection is established between the communications protocol and the local service Connection between service, so that the printing based on browser can be driven by the communication of browser and local service, local service Dynamic printer, realizes without configuring third party's external module, greatly reduces development cost and maintenance cost.
In one of the embodiments, when printing failure, computer equipment can also control browser and show failure cause. As shown in fig. 6, the method also includes:
S601 is returned if calling the local service failure or the printer parameter setup failed to the browser Return failure status message.
Wherein, local service is called unsuccessfully to can be because local service connection goes wrong or communications protocol tune With failure;Printer parameter setup failed may be that printer parameter is undesirable, for example, the printer mark of printer parameter Know and be arranged not in local service pond, alternatively, the setting of the resolution ratio of printer parameter has exceeded the range of printer resolution Deng.
In the present embodiment, if calling local service failure, local service returns to status of fail to browser, if printer Parameter setting failure, then printer returns to status of fail to local service, then returns to status of fail from local service to browser.
S602 controls the browser and shows failure cause according to the failure status message.
Specifically, it when computer equipment calls local service failure, is returned to browser and local service is called unsuccessfully to disappear Breath, and then control browser display and call local service failure;In printer parameter setup failed, returns and print to browser Machine parameter setting failed message, and then control browser and show printer parameter setup failed.
S603 controls the browser and exits print out task.
Specifically, local service failure or the printer parameter setup failed after, computer equipment can pass through to Printer sends an instruction, and then controls browser and exit current print out task.Optionally, when browser is closed, meeting Automatic release locality connection.
In one of the embodiments, as shown in fig. 7, if the printer parameter includes multiple printer identifiers;S203 " described according to the printer parameter, to control printer and print the print data " further include:
S701 determines the corresponding target printer of each printer identifier.
Wherein, printer identifier can be the class indication carried out according to printing principle, for example, the printing of principle of uniformity Machine printer identifier having the same, the printer identifier of ink-jet printer is A, the printer identifier of laser printer is B, needle The printer identifier of formula printer is C;It is also possible to be classified according to the type of different printers;Or each is printed Machine assigns unique printer identifier, can be 1,2,3 etc..
Specifically, if the printer parameter includes multiple printer identifiers, for example, printer parameter includes 1,2,3, then Determine that the corresponding target printer of printer identifier is printer 1, printer 2, printer 3;Alternatively, printer parameter include A, B, it is determined that the corresponding target printer of printer identifier is ink-jet printer and laser printer.
S702 controls each target printer and prints the print data.
For example, print data is print data some or all of in the electronic data packet M obtained by server, printing Machine parameter include 1,2,3, it is determined that the corresponding target printer of printer identifier be printer 1, printer 2, printer 3, into And control printer 1, printer 2, printer 3 print electronic data packet M in print data.
If the printer parameter includes multiple printer identifiers in through the foregoing embodiment;It is described according to the printer Parameter, control printer print the print data, determine the corresponding target printer of each printer identifier, and then control Each target printer prints the print data, and more browsers may be implemented and pass through local service while calling multiple printings The effect that machine prints simultaneously, improves printing effect.
It should be understood that although each step in the flow chart of Fig. 2-7 is successively shown according to the instruction of arrow, These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-7 Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately It executes.
In one embodiment, as shown in figure 8, providing a kind of printing equipment based on browser, including module is obtained 11, it calls and obtains module 12, control module 13, in which:
Module 11 is obtained, for obtaining the print command of browser generation;The print command include browser mark and Print data;
It calls and obtains module 12, for calling the browser to identify corresponding local service, according to the print command Obtain printer parameter and the print data;
First control module 13, for controlling printer and printing the print data according to the printer parameter.
In one of the embodiments, on the basis of device shown in Fig. 8, as shown in figure 9, the first control module 13 is wrapped It includes:
First transmission unit 130, for the printer parameter to be sent to the printer, so that the printer root Parameter setting is carried out according to the printer parameter;
Second transmission unit 131, for when receiving the setting success message that the printer is sent, by the printing Data are sent to the printer.
In one of the embodiments, on the basis of device shown in Fig. 9, as shown in Figure 10, described device further include:
Receiving module 14, the print result sent for receiving the printer;
Calling module 15, for calling the local service that the print result is sent to institute by asynchronism callback interface State browser;
Second control module 16 shows the print result for controlling the browser.
In one of the embodiments, on the basis of Figure 10 shown device, as shown in figure 11, described device further include:
Third control module 17, for controlling the browser initiating communications agreement in browser starting;Institute State communications protocol of the communications protocol between the browser and the local service;
4th control module 18 is built for controlling the browser according between the communications protocol and the local service Vertical initialization connection.
In one of the embodiments, on the basis of Figure 10 shown device, as shown in figure 12, described device further include:
Return module 19, if for calling the local service failure or the printer parameter setup failed, to institute It states browser and returns to failure status message;
5th control module 20, for controlling the browser and showing failure cause according to the failure status message;
6th control module 21 exits print out task for controlling the browser.
Call in one of the embodiments, obtain module 12 be also used to by the browser and the local service it Between asynchronous transmission interface, call the browser to identify corresponding local service, printer obtained according to the print command Parameter and the print data.
As shown in figure 13, in one of the embodiments, on the basis of device shown in Fig. 9, if the printer parameter Including multiple printer identifiers, first control module 13 includes:
Determination unit 132, for determining the corresponding target printer of each printer identifier;
Control unit 133 prints the print data for controlling each target printer.
Specific restriction about the printing equipment based on browser may refer to above for the printing based on browser The restriction of method, details are not described herein.Modules in the above-mentioned printing equipment based on browser can be fully or partially through Software, hardware and combinations thereof are realized.Above-mentioned each module can be embedded in the form of hardware or independently of the place in computer equipment It manages in device, can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution or more The corresponding operation of modules.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structure Figure can be as shown in figure 14.The computer equipment includes the processor connected by system bus, memory, network interface, shows Display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment Memory includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer Program.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The meter The network interface for calculating machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor To realize a kind of Method of printing based on browser.The display screen of the computer equipment can be liquid crystal display or electronic ink Water display screen, the input unit of the computer equipment can be the touch layer covered on display screen, be also possible to computer equipment Key, trace ball or the Trackpad being arranged on shell can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Figure 14, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, the processor perform the steps of when executing computer program
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and described is obtained according to the print command Print data;
According to the printer parameter, controls printer and print the print data.
In one embodiment, it also performs the steps of when processor executes computer program by the printer parameter It is sent to the printer, so that the printer carries out parameter setting according to the printer parameter;Receiving described beat When the setting success message that print machine is sent, the print data is sent to the printer.
In one embodiment, it is also performed the steps of when processor executes computer program and receives the printer hair The print result sent;Call the local service that the print result is sent to the browser by asynchronism callback interface; It controls the browser and shows the print result.
In one embodiment, it also performs the steps of when processor executes computer program and starts in the browser When, control the browser initiating communications agreement;The communications protocol is between the browser and the local service Communications protocol;The browser is controlled according to foundation initialization connection between the communications protocol and the local service.
In one embodiment, if processor also performs the steps of when executing computer program calls the local clothes Business failure or the printer parameter setup failed, then return to failure status message to the browser;According to the failure shape State message controls the browser and shows failure cause;It controls the browser and exits print out task.
In one embodiment, processor execute computer program when also perform the steps of by the browser with Asynchronous transmission interface between the local service calls the browser to identify corresponding local service, according to the printing Instruction obtains printer parameter and the print data.
In one embodiment, it is also performed the steps of when processor executes computer program and determines each printer Identify corresponding target printer;It controls each target printer and prints the print data.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated Machine program performs the steps of when being executed by processor
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and described is obtained according to the print command Print data;
According to the printer parameter, controls printer and print the print data.
In one embodiment, it is also performed the steps of when computer program is executed by processor and joins the printer Number is sent to the printer, so that the printer carries out parameter setting according to the printer parameter;It is described receiving When the setting success message that printer is sent, the print data is sent to the printer.
In one embodiment, it is also performed the steps of when computer program is executed by processor and receives the printer The print result of transmission;Call the local service that the print result is sent to the browsing by asynchronism callback interface Device;It controls the browser and shows the print result.
In one embodiment, it also performs the steps of when computer program is executed by processor and is opened in the browser When dynamic, the browser initiating communications agreement is controlled;The communications protocol is between the browser and the local service Communications protocol;The browser is controlled according to foundation initialization connection between the communications protocol and the local service.
In one embodiment, the local is called if also performing the steps of when computer program is executed by processor Serv-fail or the printer parameter setup failed then return to failure status message to the browser;According to the failure Status message controls the browser and shows failure cause;It controls the browser and exits print out task.
In one embodiment, it also performs the steps of when computer program is executed by processor through the browser Asynchronous transmission interface between the local service calls the browser to identify corresponding local service, is beaten according to described Print instruction obtains printer parameter and the print data.
In one embodiment, it is also performed the steps of when computer program is executed by processor and determines each printing Machine identifies corresponding target printer;It controls each target printer and prints the print data.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of Method of printing based on browser, which is characterized in that the described method includes:
Obtain the print command that browser generates;The print command includes browser mark and print data;
It calls the browser to identify corresponding local service, printer parameter and the printing is obtained according to the print command Data;
According to the printer parameter, controls printer and print the print data.
2. control printer is beaten the method according to claim 1, wherein described according to the printer parameter Print the print data, comprising:
The printer parameter is sent to the printer, so that the printer carries out parameter according to the printer parameter Setting;
When receiving the setting success message that the printer is sent, the print data is sent to the printer.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Receive the print result that the printer is sent;
Call the local service that the print result is sent to the browser by asynchronism callback interface;
It controls the browser and shows the print result.
4. according to the method in claim 2 or 3, which is characterized in that the method also includes:
In browser starting, the browser initiating communications agreement is controlled;The communications protocol is the browser With the communications protocol between the local service;
The browser is controlled according to foundation initialization connection between the communications protocol and the local service.
5. according to the method in claim 2 or 3, which is characterized in that the method also includes:
If calling the local service failure or the printer parameter setup failed, status of fail is returned to the browser Message;
According to the failure status message, controls the browser and show failure cause;
It controls the browser and exits print out task.
6. method according to claim 1-3, which is characterized in that described to call the browser mark corresponding Local service obtains printer parameter and the print data according to the print command, comprising:
By the asynchronous transmission interface between the browser and the local service, the browser is called to identify corresponding Ground service obtains printer parameter and the print data according to the print command.
7. method according to claim 1-3, which is characterized in that if the printer parameter includes multiple printings Machine mark;It is described according to the printer parameter, control printer and print the print data, comprising:
Determine the corresponding target printer of each printer identifier;
It controls each target printer and prints the print data.
8. a kind of printing equipment based on browser, which is characterized in that described device includes:
Module is obtained, for obtaining the print command of browser generation;The print command includes browser mark and printing number According to;
It calls and obtains module, for calling the browser to identify corresponding local service, beaten according to print command acquisition Print machine parameter and the print data;
Control module, for controlling printer and printing the print data according to the printer parameter.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
CN201811256869.7A 2018-10-26 2018-10-26 Printing method, device, equipment and storage medium based on browser Active CN109542366B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811256869.7A CN109542366B (en) 2018-10-26 2018-10-26 Printing method, device, equipment and storage medium based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811256869.7A CN109542366B (en) 2018-10-26 2018-10-26 Printing method, device, equipment and storage medium based on browser

Publications (2)

Publication Number Publication Date
CN109542366A true CN109542366A (en) 2019-03-29
CN109542366B CN109542366B (en) 2022-03-15

Family

ID=65844963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811256869.7A Active CN109542366B (en) 2018-10-26 2018-10-26 Printing method, device, equipment and storage medium based on browser

Country Status (1)

Country Link
CN (1) CN109542366B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324317A (en) * 2020-02-18 2020-06-23 上海东普信息科技有限公司 Local printing method, device, equipment and storage medium
CN111381786A (en) * 2020-03-10 2020-07-07 江苏苏宁物流有限公司 Text printing method and device, computer equipment and storage medium
CN113536170A (en) * 2021-06-29 2021-10-22 深圳市明源云科技有限公司 Method and device for printing browser content
CN113590213A (en) * 2021-06-24 2021-11-02 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device, and storage medium
CN114253878A (en) * 2021-11-22 2022-03-29 航天信息股份有限公司广州航天软件分公司 Universal method and device for accessing browser to peripheral

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070242284A1 (en) * 2003-12-17 2007-10-18 Albumservice V.O.F. Photo Album Printing System and Method
JP2008152545A (en) * 2006-12-18 2008-07-03 Seiko Epson Corp Print processing system and print method
CN101770347A (en) * 2008-12-27 2010-07-07 鸿富锦精密工业(深圳)有限公司 Printing system and printing method thereof
JP2011233034A (en) * 2010-04-28 2011-11-17 Canon Inc Printing system, information processor, and method thereof
CN105630434A (en) * 2015-12-29 2016-06-01 畅捷通信息技术股份有限公司 Synergetic printing method and device
CN107111465A (en) * 2014-12-19 2017-08-29 Zih公司 Method for the communication between enabled user equipment browser and local device
CN107463348A (en) * 2017-07-05 2017-12-12 深圳市坐标软件开发有限公司 Web ends user-defined format print method and system are realized based on B/S frameworks

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070242284A1 (en) * 2003-12-17 2007-10-18 Albumservice V.O.F. Photo Album Printing System and Method
JP2008152545A (en) * 2006-12-18 2008-07-03 Seiko Epson Corp Print processing system and print method
CN101770347A (en) * 2008-12-27 2010-07-07 鸿富锦精密工业(深圳)有限公司 Printing system and printing method thereof
JP2011233034A (en) * 2010-04-28 2011-11-17 Canon Inc Printing system, information processor, and method thereof
CN107111465A (en) * 2014-12-19 2017-08-29 Zih公司 Method for the communication between enabled user equipment browser and local device
CN105630434A (en) * 2015-12-29 2016-06-01 畅捷通信息技术股份有限公司 Synergetic printing method and device
CN107463348A (en) * 2017-07-05 2017-12-12 深圳市坐标软件开发有限公司 Web ends user-defined format print method and system are realized based on B/S frameworks

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111324317A (en) * 2020-02-18 2020-06-23 上海东普信息科技有限公司 Local printing method, device, equipment and storage medium
CN111324317B (en) * 2020-02-18 2024-03-26 上海东普信息科技有限公司 Local printing face list method, device, equipment and storage medium
CN111381786A (en) * 2020-03-10 2020-07-07 江苏苏宁物流有限公司 Text printing method and device, computer equipment and storage medium
CN111381786B (en) * 2020-03-10 2022-08-19 江苏苏宁物流有限公司 Text printing method and device, computer equipment and storage medium
CN113590213A (en) * 2021-06-24 2021-11-02 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device, and storage medium
CN113590213B (en) * 2021-06-24 2023-04-25 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device and storage medium
CN113536170A (en) * 2021-06-29 2021-10-22 深圳市明源云科技有限公司 Method and device for printing browser content
CN114253878A (en) * 2021-11-22 2022-03-29 航天信息股份有限公司广州航天软件分公司 Universal method and device for accessing browser to peripheral

Also Published As

Publication number Publication date
CN109542366B (en) 2022-03-15

Similar Documents

Publication Publication Date Title
CN109542366A (en) Method of printing, device, equipment and storage medium based on browser
CN109815471A (en) Contract text generation method, device, computer equipment and storage medium
CN105549820B (en) A kind of method and terminal showing graphic user interface
CN103428198B (en) network device, system and method
KR20130066603A (en) Initiating font subsets
CN105205072B (en) The methods of exhibiting and system of webpage information
CN1627761B (en) Apparatus and method for processing information
CN103034720B (en) Method, peripheral device and system for forming webpage
CN112486437A (en) Method for printing in Web application by cross-platform and cross-browser
JP2021168190A (en) Method, apparatus, electronic device, and storage medium for providing applet service capability
US10775751B2 (en) Automatic generation of regular expression based on log line data
CN109669646A (en) Method of printing, device, computer equipment and storage medium
CN110134656A (en) Page control method, device, computer readable storage medium and computer equipment
US20150281393A1 (en) System and Method for Device Management using a Social Network
CN107783807A (en) A kind of method and device of screenshot capture
CN101894021A (en) Method and system for realizing interface of embedded system
CN109976683A (en) Method of printing, device, equipment and the storage medium of data
CN109615795A (en) Self-help print method, apparatus, system, computer equipment and storage medium
CN107506597A (en) Medical files acquisition methods, terminal and server
CN108959899A (en) A method of picture validation code generation is realized based on React and is refreshed
CN111258768A (en) Concurrent processing method and device for preferential lottery activity
CN112688850B (en) Method and device for screening action objects in instant messaging
CN103123592A (en) Access method and system of application program in open platform
CN106371775B (en) Information processing unit, information processing method and information processing system
CN110278263A (en) Embedded B/S framework implementation method and platform based on AJAX and BOA

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190902

Address after: Room 902, No. 15 Industrial West Road, Songshan Lake Park, Dongguan City, Guangdong Province

Applicant after: Jindiyun Technology Co., Ltd.

Address before: 518000 Guangdong city of Shenzhen province science and technology science and Technology Park of Nanshan District twelve South Road No. 2, Kingdee Software Park A block 1-8

Applicant before: Kingdee Software (China) Co., Ltd.

GR01 Patent grant
GR01 Patent grant