Movatterモバイル変換


[0]ホーム

URL:


CN113536170B - Method and device for printing browser content - Google Patents

Method and device for printing browser content
Download PDF

Info

Publication number
CN113536170B
CN113536170BCN202110730030.8ACN202110730030ACN113536170BCN 113536170 BCN113536170 BCN 113536170BCN 202110730030 ACN202110730030 ACN 202110730030ACN 113536170 BCN113536170 BCN 113536170B
Authority
CN
China
Prior art keywords
print
printing
processor
request
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110730030.8A
Other languages
Chinese (zh)
Other versions
CN113536170A (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.)
Shenzhen Mingyuan Cloud Technology Co Ltd
Original Assignee
Shenzhen Mingyuan Cloud Technology 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 Shenzhen Mingyuan Cloud Technology Co LtdfiledCriticalShenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN202110730030.8ApriorityCriticalpatent/CN113536170B/en
Publication of CN113536170ApublicationCriticalpatent/CN113536170A/en
Application grantedgrantedCritical
Publication of CN113536170BpublicationCriticalpatent/CN113536170B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application relates to the technical field of computers, and provides a method for printing browser contents, which comprises the following steps: monitoring a port of the client through the receiving container; receiving a first print request and first print data of a first browser from the port; and calling a first printing processor to print the first printing data according to the first printing request. The method can realize cross-browser printing.

Description

Method and device for printing browser content
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for printing browser content.
Background
With the continuous development of computer technology, users can access websites of interest to themselves through a browser. The web site browses the interesting web page contents, such as pictures, document data, news information, etc., and when the user needs to print the web page contents, the user needs to print by means of a local printer. Typically, a technician invokes a local printer to effect printing of web page content by embedding in the page plug-ins that enable printing functions, such as ActiveX, applet, COM, etc. But this way of printing by embedding various plug-ins in the page can only be applied to part of the browser, e.g. the IE browser, but not to some.
Thus, how to implement cross-browser printing is a current urgent problem to be solved.
Disclosure of Invention
The application provides a method and a device for printing browser contents, which can realize cross-browser printing.
In a first aspect, there is provided a method of printing browser content, comprising: monitoring a port of the client through the receiving container; receiving a first print request and first print data of a first browser from the port; and calling a first printing processor to print the first printing data according to the first printing request.
The above method may be performed by a print module on the terminal device. The printing module waits for the client to send the first printing request and the first printing data by monitoring a port of the client (such as a computer) through a receiving container, and the receiving container can receive the first printing request and the first printing data sent by any browser of the client through the port of the monitoring client without being influenced by the type of the browser so as to realize the function of cross-browser printing.
Optionally, the receiving container is HTTPSERVER containers, and the ports include Http ports and Https ports.
The Http port of the HTTPSERVER container is capable of receiving a first print request and first print data sent by a portion of the sites (i.e., web sites) via the Http protocol, while the Https port of the HTTPSERVER container is capable of receiving a first print request and first print data sent by another portion of the sites via the Https protocol, thereby implementing a multi-protocol print function.
Optionally, the calling the first printing processor to print the first print data according to the first print request includes: determining the first printing processor from a plurality of printing processors according to the data type information in the first printing request, wherein the first printing processor has an association relationship with the data type information; and calling the first printing processor to print the first printing data.
The receiving container determines the data type (such as word documents, reports, pictures and the like) which the user wants to print according to the data type information in the first printing request, and finds a corresponding printing processor according to the data type (such as the report forms which the user wants to print), wherein the first printing request comprises Rdlcprint. Aspx information, and the receiving container finds the corresponding report printing processor according to the URL address (such as http:// 127.0.1:53962/Rdlcprint. Aspx) corresponding to the Rdlcprint. Aspx information; the application provides a plurality of printing processors for users to use, and can meet the requirements of users for printing different kinds of materials.
Optionally, the calling the first printing processor to print the first print data according to the first print request includes: according to the first printing request, calling the first printing processor to print the first printing data through a thread pool; the method further comprises the steps of: receiving a second print request and second print data of a second browser from the port; and printing the second printing data by a second printing processor through the thread Chi Diaoyong according to the second printing request.
When different users send print requests (e.g., a first print request and a second print request) to the receiving container at the same time, the receiving container may receive multiple print requests at the same time, and find corresponding print processors (e.g., a first print processor and a second print processor) for the multiple print requests at the same time, and then satisfy print demands of different users through thread calls. Thus, the method provided by the application can simultaneously respond to a plurality of printing requests.
Optionally, the first print data is a data URL, and the calling the first print processor to print the first print data according to the first print request includes: acquiring printing resources from the resource positions corresponding to the data URLs; and calling a first printing processor to print the printing resource according to the first printing request.
In a second aspect, there is provided an apparatus for printing browser content, comprising means for performing any of the methods of the first aspect.
In a third aspect, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the method of any one of the first aspects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a print processing system according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for printing browser content according to an embodiment of the present invention;
FIG. 3 is a timing diagram of printing browser content in an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an internal processing procedure of a client tool according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an apparatus for printing browser content according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The application will now be described in further detail with reference to the drawings and to specific examples.
Fig. 1 shows a print processing system provided by the present application, which includes a client browser 101, a print module 102 of the client, and a printer 103. The client browser 101 is used for a user to access some websites interested by the user and send a print request and print data to the print module 102 of the client; the print module 102 of the client is configured to receive a print request and print data sent from the client browser 101 by a user, and process the print request and print data to send a print document to the printer 103; the printer 103 is configured to receive a print document sent by the print module 102 of the client, and print a resource for a user according to the print document. For example, a user accesses a web site of interest to himself on the client browser 101 and browses web page content of interest to himself on the web site. When a user wants to print certain web page content, a print request and print data can be sent to the print module 102 of the client through the client browser 101. When the print module 102 of the client receives the print request and print data, the print request and print data are processed to assign corresponding print processors to the print request and print data, which generate print documents to be sent to the printer 103. The printer 103 performs a printing operation after receiving a print document. After the printer 103 performs the printing operation, feedback information of printing success (or printing failure) is sent to the printing module 102 of the client, the printing module 102 of the client sends the received feedback information to the client browser 101, and the client browser 101 informs the user that the printing operation is performed, so that the user can take the printing data from the printer 103.
In order to process the printing request sent by the user from different browsers, the application provides a method for printing browser contents, which can realize the function of cross-browser printing. As shown in fig. 2, the method may be performed by a print module of a client (i.e., a terminal device), and the method includes:
s201, monitoring a port of the client through the receiving container.
The printing module of the client comprises a receiving container, wherein the receiving container comprises a HTTPSERVER container and a HTTPSERVER container is used for receiving a first printing request and first printing data sent by a browser of the client. The HTTPSERVER container listens to the ports of the client (i.e., end device). The browser of the client sends the first print request and the first print data to the HTTPSERVER container through the port. Because the transmission protocols used by different websites are different, in order to meet various printing requests of users, ports of HTTPSERVER container monitoring clients comprise an Http port and a Https port, wherein the Http port is used for receiving a first printing request and first data sent by a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP); the Https port is configured to receive the first print request and the first data sent via hypertext transfer security protocol (Hyper Text Transfer Protocol over Secure Socket Layer, HTTPS), so that the HTTPSERVER container can receive the first print request and the first print data sent from any web site.
S202, a first printing request and first printing data of a first browser are received from the ports.
Illustratively, the user accesses the website of interest to the user through the first browser of the client, and when the user wants to print certain web page content, the first print request and the first print data can be sent to the print module of the client (i.e., the terminal device) through the first browser. The first browser can be any type of browser, such as an IE browser, a Google browser, a fire fox browser, a dog search browser and the like, and the type and the version of the first browser are not limited in the application. The first browser initiates a print request to a print module of the client in an asynchronous manner (for example, an AJAX manner) according to a first print request initiated by a user and first print data. After the first browser sends the printing request, other things can be processed instead of staying on the printing page all the time to wait for the printing to finish, so that the situation that the user cannot perform other operations due to page jamming in the printing process of the page content is avoided.
The first print request includes a print request message type, where the print request message type is used to inform the receiving container what type of resource the user wants to print, so that the receiving container finds a corresponding print processor for the user according to the first print request; the print request message types include a picture print request message (e.g., picture. Aspx), a document print request message (e.g., document. Aspx), a template imposition request message (e.g., template imposition printing) and a report print request message (e.g., picture print request message for informing a receiving container user of a desire to print a picture, document print request message for informing a receiving container user of a desire to print a document, and office imposition request message for informing a receiving container user of a desire to imposition web page contents in an office template, and report print request message for informing a receiving container user of a desire to print a report. The present application does not impose any limitation on the specific contents of the type of print request message described above.
The first print data includes specific print data content and a data uniform resource locator (Uniform Resource Locator, URL), and since the data URL is a server address where the print data content is located, a print resource (i.e., print data content) can be obtained from a resource location corresponding to the data URL, so that the receiving container calls the first print processor to print the print resource according to the first print request. For example, the first print data sent by the browser is a paper, and when the print processor receives the paper, the paper can be generated into a print document and the print document can be sent to the printer for printing; if the first print data sent by the browser is the server address where the report data is located, when the print processor receives the server address where the report data is located, the print processor needs to log in the server according to the server address where the report data is located to obtain the report data to be printed, then the report data is generated into a print document, and the print document is sent to the printer for printing.
The print module of the client may be implemented using any development language, for example, JAVA language, c++, etc., which is not limited in this regard by the present application. In addition, the print module of the client can be added to the registry of the operating system of the client (i.e. the terminal device) after the print module of the client is started for the first time, so that the print module of the client can automatically run when the user starts the computer every time, and continuous print service is provided for the user.
For example, if the request sent by the X website to the outside is sent through HTTP, when the user accesses the X website through the a browser, for example, the content of a web page on the X website is a picture, the a browser sends the first print request (i.e. the picture print request) and the first print data (i.e. the picture data) of the user to the HTTPSERVER container through HTTP port by using HTTP. When the HTTPSERVER container receives the first print request and the first print data, it queries the internal routing rule table according to the first print request message type (i.e. the picture print request message), as shown in table 1, so as to find the print processor type (e.g. the picture print processor) corresponding to the first print request message (e.g. the picture print request message). The printing processor types comprise a picture printing processor, a document printing processor, a report printing processor and a template sleeve printing processor, the printing processor types of the application are not limited to the listed types, and other printing processor types such as PDF printing processor types and the like can be set according to requirements, so the application is not limited in any way.
Table 1 routing rules table
The routing rule table is a routing rule registered in HTTPSERVER containers by a print processor module in a print module of the client, and the routing rule includes a print request message type, a print request message format, URL addresses of different types of print processors and a print processor type, where the URL addresses of the different types of print processors are used in HTTPSERVER containers to find a corresponding print processor type for a first print request and first print data sent by an a browser. For example, HTTPSERVER the container finds a picture print processor for the picture print request according to the picture print request and the picture print data sent by the a browser, where the picture print processor is the print processor (i.e., the picture print processor) pointed to by the picture URL address (i.e., http://127.0.0.1:53962/picture. Aspx). In this regard, if the X website sends a request to the outside through the HTTPS protocol, the picture URL address where the picture print processor is located is HTTPS://127.0.0.1:53963/picture. Aspx.
S203, calling a first printing processor to print the first printing data according to the first printing request.
Illustratively, a first print processor is determined from a plurality of print processors according to the data type information (i.e., the print request message type) in the first print request, and the first print processor has an association relationship with the data type information (i.e., the print request message type corresponds to the URL address of one print processor, and the URL address of the print processor corresponds to one print processor), as shown in table 1; the first print processor is invoked to print the first print data. For example, HTTPSERVER container finds the URL address of the matching report print processor for the report print request information by looking up the routing rule table (see table 1) according to the print request message type in the first print request, for example, the print request message type is a report print request message, and HTTPSERVER container points to the report print processor. If the print module of the client is developed in a non-object-oriented language (for example, C language), the HTTPSERVER container finds a corresponding print processor (for example, a report print processor) for the first print request (for example, a report print request) and the first print data (for example, report print data), and the print processor may generate the first print data into a print document and send the print document to the printer, and the printer performs a print operation according to the print document. In addition, if the print module of the client is developed in an object oriented language (for example, JAVA language, c++ language), after the container HTTPSERVER finds a matching print processor type (for example, a report print processor) for the first print request (for example, a report print request) and the first print data (for example, report print data), the container HTTPSERVER creates a print processor instance object capable of processing the first print request and the first print data according to the matching print processor type, and the print processor instance object generates the first print data into a print document and sends the print document to the printer, and the printer performs a print operation according to the print document.
Illustratively, the first print data is printed by the first print processor via the thread Chi Diaoyong in accordance with the first print request; receiving a second print request and second print data of a second browser from the port; the second print data is printed by the second print processor through the thread Chi Diaoyong in accordance with the second print request.
For example, the first browser sends the first print request and the first print data to the HTTPSERVER container via a port (e.g., http port), and the HTTPSERVER container looks up the routing rule table according to the first print request and finds the first print processor (or first print processor type) corresponding to the first print request. If the print module of the client is developed by using a non-object-oriented language (for example, C language), the HTTPSERVER container searches the routing rule table according to the first print request, and finds a first print processor corresponding to the first print request, where the first print processor is configured to process the first print request and the first print data. If the print module of the client is developed by using an object oriented language (for example, JAVA language), then the HTTPSERVER container creates a first print processor instance object according to a first print processor type corresponding to the first print request, where the first print processor instance object is used to process the first print request and the first print data; meanwhile, the second browser sends the second print request and the second print data to the HTTPSERVER container through a port (for example, an Http port), and the HTTPSERVER container searches the routing rule table according to the second print request and finds a second print processor (or a second print processor type) corresponding to the second print request. If the print module of the client is developed by using a non-object-oriented language (for example, C language), the HTTPSERVER container searches the routing rule table according to the second print request, and finds a second print processor corresponding to the second print request, where the second print processor is configured to process the first print request and the first print data. If the print module of the client is developed using an object oriented language (e.g., JAVA language), then HTTPSERVER the container creates a second print processor instance object according to a second print processor type corresponding to the second print request, where the second print processor instance object is used to process the second print request and the second print data.
If the print module of the client is developed by using a non-object-oriented language (for example, a C language), the HTTPSERVER container searches the routing rule table according to the first print request and the second print request, and finds a first print processor corresponding to the first print request and a second print processor corresponding to the second print request; or if the print module of the client is developed by using an object oriented language (for example, JAVA language), the HTTPSERVER container creates respective first print processor instance object and second print processor instance object for the first print request and the second print request; the HTTPSERVER container queues the first print request, the first print data, and the first print processor (or the first print processor instance object), and the second print request, the second print data, and the second print processor (or the second print processor instance object) in a background thread pool of the terminal device (or the client), for example, a background operating system of the terminal device (or the client) allocates a first thread for processing the first print request, a second thread user processes the second print request, and when the background operating system processes the first thread, the first print processor (or the first print processor instance object) generates an internal print document according to the provisioning parameters, and sends the print document to the printer, and the printer performs a print operation according to the print document. When the printer performs the printing operation, feedback information of successful printing or failure printing is sent to the first printing processor (or the first printing processor instance object), the first printing processor (or the first printing processor instance object) receives the feedback information and sends the feedback information to the HTTPSERVER container, the HTTPSERVER container sends the feedback information to the first browser through a port (for example, an Http port), and the first browser displays the feedback information to the user. The method for processing the second thread by the background operating system is the same as the method for processing the first thread by the background operating system, and will not be described here again.
The default parameters include print page paper setting and a server address where print data is located, for example, print page paper setting includes setting a paper size of a print page, setting a page range, setting a single-sided or double-sided, setting black and white or color printing, etc.; the server address where the print data is located refers to a server address where some print data is not specific print content sent from a browser page, but where a print processor (or a print processor instance object) (e.g., a first print processor or a first print processor instance object) needs to log in to the server address where the print data is located, so that the print data can be obtained.
The first browser and the second browser may be the same browser or different browsers, and the first print request and the second print request may be the same type of print request or different types of request, which is not limited in the present application. For example, if the B browser sends two identical print requests to the HTTPSERVER containers at the same time, for example, the two print requests are both print requests of a picture; the HTTPSERVER container receives the first picture print request and the first picture print data from the Http port, and may receive the second picture print request and the second picture print data from the Http port and also from the Https port; The HTTPSERVER container finds a picture print processor (or a picture print processor type) corresponding to the first picture print request according to the first picture print request and the first picture print data searching routing rule table, and if the print module of the client is developed by using a non-object-oriented language (for example, C language), the HTTPSERVER container searches the routing rule table according to the first picture print request and finds a first picture print processor corresponding to the first picture print request, where the first picture print processor is used for processing the first picture print request and the first picture print data. If the print module of the client is developed using an object oriented language (e.g., JAVA language), then HTTPSERVER container creates a first photo print processor instance object for the first photo print request, where the first photo print processor instance object is used to process the first photo print request and the first photo data; Meanwhile, the HTTPSERVER container finds a picture print processor (or a picture print processor type) corresponding to the second picture print request according to the second picture print request and the second picture print data searching routing rule table, if the print module of the client is developed by using a non-object-oriented language (for example, C language), the HTTPSERVER container searches the routing rule table according to the second picture print request and finds a second picture print processor corresponding to the second picture print request, where the second picture print processor is used for processing the second picture print request and the second picture print data. If the print module of the client is developed in an object oriented language (e.g., JAVA language), then the HTTPSERVER container creates a second photo-print processor instance object for the second photo-print request, where the second photo-print processor instance object is used to process the second photo-print request and the second photo data. It can be seen that the HTTPSERVER container can receive two identical print requests at the same time, and if the print module of the client is developed in a non-object-oriented language (e.g., C language), the HTTPSERVER container can find a matching print processor for the two identical print requests at the same time; if the print module of the client is developed in an object oriented language (e.g., JAVA language), the HTTPSERVER container may simultaneously create respective corresponding print processor instance objects (e.g., a first photo print processor instance object and a second photo print processor instance object) for two identical print requests to implement a function of simultaneously responding to the two identical print requests.
If the print module of the client is developed by using a non-object-oriented language (for example, a C language), the HTTPSERVER container searches the routing rule table according to the first picture print request and the second picture print request, and finds a first picture print processor corresponding to the first picture print request and a second picture print processor corresponding to the second picture print request; or if the print module of the client is developed by using an object oriented language (for example, JAVA language), after the HTTPSERVER container allocates the first and second image print processor instance objects for two identical image print requests, the first image print request, the first image print data and the first image print processor (or the first image print processor instance object) are placed in the thread pool for queuing, and at the same time, the second image print request, the second image print data and the second image print processor (or the second image print processor instance object) are also placed in the background thread pool of the terminal device (or the client for queuing. And the background operation system of the terminal equipment (or the client) distributes a first picture thread for processing a first picture printing request, a second picture thread user processes a second picture printing request, when the background operation system processes the first picture thread, a first picture printing processor (or a first picture printing processor instance object) generates an internal printing document according to the appointed parameters, the printing document is sent to a printer, and the printer executes printing operation according to the printing document. When the printer performs the printing operation, feedback information of successful printing or failure printing is sent to the first photo printing processor (or the first photo printing processor instance object), the first photo printing processor (or the first photo printing processor instance object) receives the feedback information and sends the feedback information to the HTTPSERVER container, the HTTPSERVER container sends the feedback information to the first browser through a port (for example, an Http port), and the first browser displays the feedback information to the user. Therefore, the method for processing the second picture thread by the background operating system is the same as the method for processing the first picture thread by the background operating system, and will not be described herein.
For example, if the B browser sends two different print requests to the HTTPSERVER containers simultaneously, for example, the first print request is a picture print request and the second print request is a report print request. The present embodiment only takes development of the print module of the client in an object oriented language (for example, JAVA language) as an example, and describes how the print module of the client responds to two different print requests simultaneously. The HTTPSERVER container receives the picture printing request and the picture printing data from the Http port, and can receive the report printing request and the report printing data from the Http port and the Https port; the HTTPSERVER container searches a routing rule table according to the picture printing request and the picture printing data to find a picture printing processor type corresponding to the picture printing request, and creates a picture printing processor instance object for the picture printing request according to the picture printing processor type, wherein the picture printing processor instance object is used for processing the picture printing request and the picture data; meanwhile, the HTTPSERVER container searches the routing rule table according to the report printing request and the report printing data to find the type of the report printing processor corresponding to the report printing request, and creates a report printing processor instance object for the report printing request according to the type of the report printing processor, wherein the report printing processor instance object is used for processing the report printing request and the report printing data. It can be seen that HTTPSERVER containers can receive two different print requests simultaneously and create respective corresponding print processor instance objects (e.g., a photo print processor instance object and a report print processor instance object) for the two different print requests simultaneously to implement the function of responding to the two different print requests simultaneously.
When HTTPSERVER containers create respective corresponding picture print processor instance objects and report print processor instance objects for two different print requests, the picture print data and the picture print processor instance objects are placed in a thread pool for queuing, and meanwhile, the report print requests, the report print data and the report print processor instance objects are also placed in a background thread pool of terminal equipment (or a client side) for queuing. And the background operation system of the terminal equipment (or the client) distributes a picture thread for processing a picture printing request, a report thread user processes a report printing request, when the background operation system processes the report thread, a report printing processor instance object generates an internal printing document according to the appointed parameters, the printing document is sent to a printer, and the printer executes printing operation according to the printing document. When the printer executes the printing operation, feedback information of successful printing or failure printing is sent to the report printing processor instance object, the report printing processor instance object receives the feedback information and then sends the feedback information to the HTTPSERVER container, the HTTPSERVER container sends the feedback information to the first browser through a port (for example, an Http port), and the first browser displays the feedback information to a user. Therefore, the method for processing the picture thread by the background operating system is the same as the method for processing the report thread by the background operating system, and is not repeated here.
The print module of the client is developed in a non-object-oriented language (for example, C language), and the processing method for simultaneously responding to two different print requests is similar to the processing method for simultaneously responding to two identical print requests, which is not described herein.
For example, if the B browser sends multiple print requests to the HTTPSERVER container at the same time, the method for processing the multiple print requests by the HTTPSERVER container is the same as the method for processing the two print requests, which is not described herein.
For ease of understanding, the overall flow steps of the method of printing browser content provided by the present application are described below in connection with fig. 3 and 4. First, a timing chart describing the whole process of printing browser contents is presented, as shown in fig. 3, the specific flow is as follows: (As described herein, the client side tool of FIGS. 3 and 4 is developed in an object-oriented language to illustrate the overall process of implementing a method of printing browser content)
Step 301: when the user wants to print certain web page content, the first printing request and the first printing data can be sent to a printing module of the client (namely, the terminal device) through the browser. The browser sends the client print request to the client tool (i.e., the print processing module of the client) via a POST method that requires submitting the following data to the client tool: a first print request message (e.g., print request message type) and first print data (e.g., data URL, http:// localhsot:53962/rdlcprint. Aspx, and body parameters: parameters required for reporting).
Step 302: a receiving container (e.g., HTTPSERVER container, not shown in fig. 3) of the client tool receives the first print request and the first print data sent by the browser of the client, and searches for a corresponding print processor for the first print request. The print processor sends an HTTP request (i.e., a request for acquiring print data content) to a server where the first print data is located according to URL parameters (i.e., the first print data) sent by a browser of the client, so as to acquire specific content of the first print data from the server.
Step 303: the server returns specific content (e.g., a picture data stream) of the first print data to the print processor according to the received HTTP request.
Step 304: the print processor, upon receiving the specific content of the first print data, internally constructs a print data structure (i.e., generates a print document).
Step 305: the print processor transmits the generated print document to a printer, which performs a printing operation based on the print document. The printer performs a printing operation and feeds back information of printing success or printing failure to a printing processor (not shown in fig. 3).
Step 306: the printing processor sends the information fed back by the printer to a browser of the client, and the browser of the client informs a user of a successful printing or a printing failure message.
The flow steps of the internal processing procedure (as shown in fig. 4) of the client tool (i.e., the print module of the client) are as follows:
Step 401: a print request is sent. When a user browses a web page in a browser, the browser may send a print request (e.g., a first print request) to HTTPSERVER containers (i.e., receiving containers) through a port of the client.
Step 402: the routing rule table is looked up. After receiving the print request, HTTPSERVER containers search the routing rule table according to the print request, and select a matching print processor type.
Step 403: a print processor instance is obtained. The HTTPSERVER container obtains a print processor instance from the processor factory (which is here a processor factory class if the client tool is implemented using an object oriented language) according to the matching print processor type described above.
Step 404: returning to the print processor instance. The processor factory class returns a print processor instance object based on the print processor type. The print processor instance object is for processing a print request and print data.
Step 405: print jobs are submitted to a thread pool (queuing). The print request, print data, and print processor instance objects are placed in a thread pool queue and the background operating system of the terminal device (or client) allocates print threads for processing the print request.
Step 406: the processor is invoked (i.e., the print processing instance object is invoked). When the background operating system processes the print thread, the print processor instance object is invoked.
Step 407: print data is acquired. The print processor instance object may send an instruction to obtain the content of the print data to the server where the print data is located based on the URL address of the print data (e.g., the data URL).
Step 408: and returning the printing data. And the server where the print data is located returns the specific content of the print data to the print processor instance object according to the instruction.
Step 409: a print data structure is constructed. The print processor instance object constructs a print data structure (i.e., generates a print document) from the specific content of the print data.
Step 410: a printing action is performed. The print processor instance object sends the generated print document to the printer, which performs a print operation based on the print document.
Step 411: the print state (success/failure) is returned. The printer performs a printing operation and feeds back information of printing success or printing failure to a print processor instance object (not shown in fig. 4). The print processor instance object sends the print status (i.e., print success/print failure) fed back by the printer to the browser of the client, which notifies the user of the print status.
Fig. 5 is a schematic structural view of a cuff pressurizing device according to the present application. The apparatus 500 comprises a listening module 501, a receiving module 502 and a processing module 503.
A listening module 501, configured to listen to a port of a client through a receiving container.
The receiving module 502 is configured to receive a first print request and first print data of a first browser from a port.
A processing module 503 for calling the first printing processor to print the first printing data according to the first printing request
The specific manner in which the apparatus 500 performs the method of printing browser content and the resulting benefits may be found in the relevant description of the method embodiments.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a computer implements the method according to any of the method embodiments of the application. The computer program may be a high-level language program or an executable object program.
The computer readable storage medium is, for example, a memory. The memory may be volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an erasable programmable ROM (erasable PROM), an electrically erasable programmable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (double DATA RATE SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, SLDRAM), and direct memory bus random access memory (direct rambus RAM, DRRAM).
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes and technical effects of the above-described apparatus may refer to corresponding processes and technical effects in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided by the present application, the disclosed systems, devices, and methods may be implemented in other manners. For example, some features of the method embodiments described above may be omitted, or not performed. The above-described apparatus embodiments are merely illustrative, the division of units is merely a logical function division, and there may be additional divisions in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the elements or the coupling between the elements may be direct or indirect, including electrical, mechanical, or other forms of connection.
The above embodiments are only for illustrating the technical solution of the present application, and are not limited thereto. Although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may be modified or some technical features may be replaced with other technical solutions, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and all the modifications or replacements are included in the protection scope of the present application.

Claims (9)

CN202110730030.8A2021-06-292021-06-29Method and device for printing browser contentActiveCN113536170B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110730030.8ACN113536170B (en)2021-06-292021-06-29Method and device for printing browser content

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110730030.8ACN113536170B (en)2021-06-292021-06-29Method and device for printing browser content

Publications (2)

Publication NumberPublication Date
CN113536170A CN113536170A (en)2021-10-22
CN113536170Btrue CN113536170B (en)2024-08-30

Family

ID=78097277

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110730030.8AActiveCN113536170B (en)2021-06-292021-06-29Method and device for printing browser content

Country Status (1)

CountryLink
CN (1)CN113536170B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107463348A (en)*2017-07-052017-12-12深圳市坐标软件开发有限公司Web ends user-defined format print method and system are realized based on B/S frameworks
CN109542366A (en)*2018-10-262019-03-29金蝶软件(中国)有限公司Method of printing, device, equipment and storage medium based on browser
CN112486429A (en)*2020-11-262021-03-12四川长虹电器股份有限公司Method for automatically configuring printer by terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20150212981A1 (en)*2014-01-282015-07-30Microsoft CorporationProviding print view of document for editing in web-based application
CN104020967A (en)*2014-06-162014-09-03浪潮软件股份有限公司WEB batch-printing method based on fully-domestic CPU and OS and commonly used for multiple browsers
CN105142183B (en)*2015-10-092018-11-06烽火通信科技股份有限公司Automatic identification WIFI data frames and the method and system for dividing priority
US10587551B1 (en)*2017-07-132020-03-10Whatsapp Inc.Techniques for multi-agent messaging
CN110417852A (en)*2019-06-122019-11-05山谷网安科技股份有限公司Browser-cross controls the universal method of peripheral hardware, apparatus and system
CN111813353A (en)*2020-06-042020-10-23厦门汉印电子技术有限公司Printing system, method and device based on web and proxy server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107463348A (en)*2017-07-052017-12-12深圳市坐标软件开发有限公司Web ends user-defined format print method and system are realized based on B/S frameworks
CN109542366A (en)*2018-10-262019-03-29金蝶软件(中国)有限公司Method of printing, device, equipment and storage medium based on browser
CN112486429A (en)*2020-11-262021-03-12四川长虹电器股份有限公司Method for automatically configuring printer by terminal

Also Published As

Publication numberPublication date
CN113536170A (en)2021-10-22

Similar Documents

PublicationPublication DateTitle
US20100302590A1 (en)System for retrieving and printing network documents
US20110252117A1 (en)Devices and Methods for Redirecting a Browser to Access Computer Resource Behind a Network Firewall
US9311281B2 (en)Methods for facilitating web page image hotspots and devices thereof
US7783718B2 (en)Locating services using compiled scopes
CN109254739B (en) Document printing method, device and system
CN103500210A (en)Method, device and browser for carrying out webpage loading
US8687219B2 (en)System which can utilize a function of an image processing apparatus as a web service
CN111368173A (en) File transmission method, device, electronic device and readable storage medium
JP2004213462A (en) Information providing apparatus, information display apparatus, information providing system, and information providing method
US7395338B2 (en)Information processing apparatus and session management method
US8073872B2 (en)Information processing apparatus
CN103530329A (en)Method and device for performing webpage loading and browsers
US20140211248A1 (en)Web server apparatus, control method, and program therefor
CN114189393A (en)Data processing method, device, equipment and storage medium
US9110623B2 (en)Printing system, print relay server, method of controlling the server, and program
CN113536170B (en)Method and device for printing browser content
US20040268114A1 (en)Electronic apparatus and parameter updating method
JP4097584B2 (en) Embedded device having WWW server function, web page providing method, and web page providing control program
JP4394725B2 (en) Embedded device, request distribution method, and request distribution program
US20240098134A1 (en)Information processing apparatus, method, and non-transitory computer readable medium
CN105721251A (en)Reconfigurable testing pile service method and system
US11076057B2 (en)Image scanning apparatus with an improved notification process using shrink images
US10764464B2 (en)Image scanning apparatus with improved image location notification
US11076058B2 (en)Image scanning apparatus with an improved notification of the presence and content of scanned images
US12437019B2 (en)Web browsing system, communication terminal, image generation server

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp