Document printing method, device, equipment, storage medium and product
By determining the browser type and using add-ins instead of ActiveX controls, page content printing for different browsers was enabled, resolving the incompatibility issue between browsers and ActiveX controls and improving the user experience.
Patent Information
- Application Number
- CN202310274615.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Some browsers are incompatible with ActiveX controls, making it impossible to print page content. Users need to switch browsers to print, which causes inconvenience.
By responding to printing operations, the browser type is determined, and an add-in matching the browser type is used to invoke a local application. The application corresponding to the add-in is then controlled to perform the printing operation, replacing ActiveX controls.
It enables page content printing across different browser types, improving user experience, reducing user operations, and resolving browser compatibility issues.
Smart Images

Figure CN116301677B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a document printing method, apparatus, device, storage medium, and product. Background Technology
[0002] Common browsers include Internet Explorer, Google Chrome, Sogou Browser, Baidu Browser, 360 Browser, and Cheetah Browser. The most important part of a browser is its kernel, also known as the "rendering engine," which is used to interpret web page syntax and render the web page. Currently, developing a new browser kernel is not only difficult but also costly. Many domestic browser vendors have not developed their own browser kernels, while Google's Chromium kernel is open source, and most domestic browsers use Google's Chromium kernel.
[0003] When logging into certain business systems using a browser, users may trigger a print operation on the page content. Printing the page content of the business system mainly uses ActiveX controls. Currently, ActiveX controls are supported by Internet Explorer, but their use is limited. This makes domestic browsers based on the Chromium kernel incompatible with ActiveX controls. When logging into the business system using a domestic browser, the page content cannot be printed, and users need to switch to Internet Explorer to print, which causes inconvenience to users. Summary of the Invention
[0004] This application provides a document printing method, apparatus, device, storage medium, and product to solve the problem that some browsers are incompatible with ActiveX controls, making it impossible to print browser page content.
[0005] Firstly, this application provides a document printing method, including:
[0006] In response to a print operation on the currently displayed page of the browser, determine the type of the browser;
[0007] If it is determined that the browser type is not the default type, then an add-in that matches the browser type is used to call the local application corresponding to the add-in, and the add-in is used to control the application corresponding to the add-in to perform a printing operation on the document to be printed corresponding to the page.
[0008] Secondly, this application provides a document printing apparatus, comprising:
[0009] A determining unit is configured to determine the type of the browser in response to a printing operation on the currently displayed page of the browser;
[0010] The processing unit is configured to, if it is determined that the browser type is not the default type, use an add-in that matches the browser type to call the local application corresponding to the add-in, and use the add-in to control the application corresponding to the add-in to perform a printing operation on the document to be printed corresponding to the page.
[0011] Thirdly, this application provides an electronic device, including: a processor, a memory, and a transceiver;
[0012] Interconnection of processor, memory, and transceiver circuits;
[0013] The memory stores the instructions that the computer executes;
[0014] A transceiver is used to send and receive data.
[0015] The processor executes computer execution instructions stored in memory, causing the processor to perform the method described in the first aspect.
[0016] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0017] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0018] The document printing method, apparatus, device, storage medium, and product provided in this application, in response to a printing operation on a page, determine the browser type. If the browser type is not the default type, an add-in matching the browser type is used to call the local application corresponding to the add-in. The add-in further controls the application corresponding to the add-in to print the document to be printed corresponding to the page. By using add-ins instead of ActiveX controls, the printing of browser page content can be achieved, solving the problem of some browsers being incompatible with ActiveX controls, improving the user experience, eliminating the need for users to switch browsers, reducing user operations, and allowing the selection of an appropriate printing method for different browser types. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] Figure 1 A schematic diagram of the network architecture for the document printing method provided in this application;
[0021] Figure 2 A flowchart illustrating a document printing method provided in this application;
[0022] Figure 3 A flowchart illustrating another document printing method provided in this application;
[0023] Figure 4 A schematic diagram of a document printing device provided in this application;
[0024] Figure 5 A first block diagram of an electronic device used to implement the document printing method of this application;
[0025] Figure 6 This is a second block diagram of an electronic device used to implement the document printing method of this application.
[0026] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0028] It should be noted that the document printing method, apparatus, equipment, storage medium, and product of this application can be used in the financial field. They can also be used in any field other than finance. The application fields of the document printing method, apparatus, equipment, storage medium, and product of this application are not limited.
[0029] To clearly understand the technical solution of this application, the solutions of the prior art will be described in detail first.
[0030] Currently, developing a new browser kernel is not only difficult but also costly. Many domestic browser manufacturers have not developed their own browser kernels, while Google's Chromium kernel is open source, and most domestic browsers use Google's Chromium kernel.
[0031] When logging into certain business systems using a browser, users may trigger a print operation on the page content. Printing the page content of the business system mainly uses ActiveX controls. Currently, ActiveX controls are supported by Internet Explorer, but their use is limited. This makes domestic browsers based on the Chromium kernel incompatible with ActiveX controls. When logging into the business system using a domestic browser, the page content cannot be printed, and users need to switch to Internet Explorer to print, which causes inconvenience to users.
[0032] Therefore, addressing the issue of incompatibility between some browsers and ActiveX controls in existing technologies, which prevents the printing of browser page content, the inventors discovered in their research that, in response to a printing operation on a page, the browser type is determined. If the browser type is not the default type, an add-in matching the browser type is used to call the local application corresponding to the add-in. Furthermore, the add-in controls the application corresponding to the add-in to print the document to be printed. By using add-ins instead of ActiveX controls, the printing of browser page content can be achieved, solving the problem of browser incompatibility with ActiveX controls, improving the user experience, eliminating the need for users to switch browsers, and reducing user operations.
[0033] Therefore, based on the above-mentioned inventive discovery, the inventors proposed the technical solution of the embodiments of this application. The network architecture and application scenarios of the document printing method provided in the embodiments of this application are described below.
[0034] like Figure 1As shown, the network architecture corresponding to the document printing method provided in this application embodiment includes: terminal 1 and printer 2. Terminal 1, in response to a printing operation on the currently displayed page of the browser, determines the browser type. If the browser type is not the default type, an add-in matching the browser type is used to call the local application corresponding to the add-in, and the add-in opens the document to be printed, loading the document to be printed into the application. The add-in controls the application to perform printing operations on the document to be printed corresponding to the page according to the printing process pre-configured in the add-in's pre-file. Specifically, if the pre-configured printing process is to open the document, submit the document printing task, and close the document after submitting the document printing task, the add-in controls the application to sequentially open the document to be printed, submit the document printing task, and close the document after submitting the document printing task according to the printing process pre-configured in the add-in's pre-file. The document printing task is used to instruct the associated printer to output the document to be printed. By using add-ins instead of ActiveX controls, printing browser page content can be achieved through add-ins, solving the problem of some browsers being incompatible with ActiveX controls, improving the user experience, eliminating the need for users to switch browsers, and reducing user operations.
[0035] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0036] Figure 2 This application provides a flowchart illustrating a document printing method applied to an electronic device. The electronic device can be a digital computer of various forms, such as a cellular phone, smartphone, laptop computer, desktop computer, workstation, personal digital assistant, server, blade server, mainframe computer, and other suitable computers. Figure 2 As shown, the method includes:
[0037] Step 201: In response to a print operation on the currently displayed page in the browser, determine the browser type.
[0038] In this embodiment, when the user clicks the print button on the content of the currently displayed page in the browser, in response to the print operation, the browser type is determined. Browser types are categorized as default and non-default. The default browser is a browser using the IE kernel, such as Internet Explorer; a non-default browser is a browser that does not use the IE kernel, such as a browser using the Chromium kernel. Different browsers employ different printing methods, and the appropriate printing method is selected based on the browser type.
[0039] Step 202: If it is determined that the browser type is not the default type, then the add-in that matches the browser type is used to call the local application corresponding to the add-in, and the add-in controls the application corresponding to the add-in to perform the printing operation on the document to be printed corresponding to the page.
[0040] In this embodiment, if it is determined that the browser type is not the default type, i.e., the aforementioned non-default type, an add-in that matches the browser type is used to call the local application corresponding to the add-in, such as calling the WPS (Word Processing System) word processing application. The add-in is further used to control the application corresponding to the add-in to perform the printing operation on the document to be printed corresponding to the page.
[0041] The timing of loading add-ins can be either when the browser's currently displayed page has finished loading, or, alternatively, when the browser page has finished loading. In response to a print operation for the browser's currently displayed page, the browser type is determined. If the browser type is not the default type, the loaded add-in is used to call the local application corresponding to the add-in, and the add-in controls the application corresponding to the add-in to perform a print operation on the document to be printed corresponding to the page.
[0042] Alternatively, in response to a print operation on the currently displayed page in the browser, the browser type is determined. If the browser type is not the default type, an add-in that matches the browser type is loaded into the browser. The add-in that matches the browser type is used to call the local application corresponding to the add-in, and the add-in controls the application corresponding to the add-in to perform the print operation on the document to be printed for the page.
[0043] In this application, a user can click the print button on the currently displayed page content in the browser. In response to the print operation, the browser type is determined. If the browser type is not the default type, an add-in matching the browser type is used to call the local application corresponding to the add-in. The add-in then controls the application corresponding to the add-in to print the document to be printed. By using add-ins instead of ActiveX controls, the printing of browser page content can be achieved through add-ins, solving the problem of some browsers being incompatible with ActiveX controls, improving the user experience, eliminating the need for users to switch browsers, and reducing user operations.
[0044] Figure 3 A flowchart illustrating another document printing method provided in this application, which is applied to electronic devices, such as... Figure 3 As shown, the method includes:
[0045] Step 301: In response to the print operation for the currently displayed page in the browser, obtain the browser's kernel version and determine the browser type based on the browser's kernel version.
[0046] In this embodiment, when a user clicks the print button on the content of the currently displayed page in the browser, in response to the print operation on the currently displayed page in the browser, the browser's kernel version is obtained. The kernel version is divided into non-IE kernel and IE kernel. The browser type is determined based on the browser's kernel version, and the appropriate printing method is selected based on the browser type.
[0047] Step 302: If it is determined that the browser's kernel version is not IE kernel and is Chromium kernel, then it is determined that the browser type is not the default type. In this case, the WPS add-in that matches the Chromium kernel is used to call the local WPS application, and the WPS add-in is used to control the WPS application to perform printing operations on the document to be printed corresponding to the page.
[0048] In this embodiment, if it is determined that the browser's kernel version is not IE kernel and the browser's kernel version is Chromium kernel, and it is determined that the browser type is not the default type, printing cannot be performed using ActiveX controls. Instead, printing needs to be performed using WPS add-ins. Specifically, a WPS add-in that matches the Chromium kernel is used to call the local WPS application, and the WPS add-in controls the WPS application to perform printing operations on the document to be printed corresponding to the page.
[0049] The WPS add-in can be loaded into the browser when the currently displayed page has finished loading. Alternatively, it can be loaded into the browser if the browser page has finished loading. In response to a print operation on the currently displayed page, the browser's kernel version is obtained, and the browser type is determined based on the kernel version. If the browser's kernel version is determined to be a non-IE kernel and a Chromium kernel, and the browser type is not the default type, then the loaded WPS add-in is used to call the local WPS application, and the WPS add-in controls the WPS application to perform the print operation on the document to be printed corresponding to the page.
[0050] Alternatively, in response to a print operation on the currently displayed page in the browser, the browser's kernel version is obtained, and the browser type is determined based on the kernel version. If the browser's kernel version is determined to be non-IE kernel and Chromium kernel, then the browser type is determined not to be the default type, and a WPS add-in matching the Chromium kernel is loaded. The local WPS application is then invoked using the WPS add-in matching the Chromium kernel, and the WPS add-in is used to control the WPS application to perform the print operation on the document to be printed corresponding to the page.
[0051] Optionally, the WPS add-in can be used to control the WPS application to perform printing operations on the document to be printed corresponding to the page, including:
[0052] The WPS add-in is used to open the document to be printed, and the WPS add-in is used to load the document to be printed into the WPS application. The WPS add-in controls the WPS application to perform printing operations on the document to be printed on the page according to the printing process pre-configured in the pre-file of the WPS add-in.
[0053] In this embodiment, a pre-file corresponding to the WPS add-in is obtained in advance. This pre-file contains a pre-configured printing process, which can be pre-configured according to actual needs. The WPS add-in is used to open the document to be printed corresponding to the page. The WPS add-in loads the document into the WPS application. The WPS add-in controls the WPS application to perform the printing operation on the document according to the pre-configured printing process in the pre-file. The document to be printed is a binary file stream.
[0054] Optionally, if the pre-configured printing process is to open a document, submit a print job, and close the document after submitting the print job, then the WPS add-in controls the WPS application to perform printing operations on the document to be printed corresponding to the page according to the pre-configured printing process in the pre-file corresponding to the WPS add-in, including:
[0055] The WPS add-in controls the WPS application to execute the printing process according to the pre-configured printing process in the corresponding WPS add-in file. The process includes opening the document to be printed, submitting the print job, and closing the document after submitting the print job. The print job is used to instruct the associated printer to output the document to be printed.
[0056] In this embodiment, if the pre-configured printing process in the pre-file is to open the document, submit the document to accept the printing task, and close the document after submitting the printing task, this printing process is used to print the document to be printed. Specifically, the WPS add-in controls the WPS application to execute the printing process pre-configured in the pre-file corresponding to the WPS add-in in sequence: opening the document to be printed, submitting the document to be printed, and closing the document to be printed after submitting the printing task. Submitting the document to be printed means sending the document to be printed to the associated printer. The printer outputs the document to be printed according to the document to be printed, thereby completing the printing of the document to be printed corresponding to the page.
[0057] Optionally, the method further includes:
[0058] Download the prerequisite files for the WPS add-in from the server and save them to your local machine.
[0059] In this embodiment, the pre-file corresponding to the WPS add-in is downloaded from the server in advance. The pre-file includes a pre-configured printing process. The pre-file corresponding to the WPS add-in is saved locally. The WPS add-in performs the printing operation on the document to be printed corresponding to the page according to the pre-configured printing process in the pre-file.
[0060] Step 303: If it is determined that the browser's kernel version is IE kernel, then the browser type is determined to be the default type. Then, the ActiveX control that matches the browser type is called to perform the printing operation on the document to be printed corresponding to the page using the ActiveX control.
[0061] In this embodiment, if the browser's kernel version is determined to be the IE kernel, it indicates that it is an IE browser. If the browser type is determined to be the default type, printing can be performed using ActiveX controls. Specifically, the ActiveX control that matches the browser type is called, and the ActiveX control is used to perform the printing operation on the document to be printed corresponding to the page.
[0062] This application uses add-ins instead of ActiveX controls. Add-ins enable printing of browser page content, solving the problem of some browsers being incompatible with ActiveX controls, improving the user experience, eliminating the need for users to switch browsers, reducing user operations, and allowing users to choose the appropriate printing method for different browser types.
[0063] Figure 4 A schematic diagram of a document printing device provided in this application is shown below. Figure 4 As shown, the document printing device 400 provided in this embodiment includes a determining unit 401 and a processing unit 402.
[0064] The determining unit 401 is used to determine the browser type in response to a print operation on the currently displayed page of the browser. The processing unit 402 is used to, if the browser type is determined to be not the default type, use an add-in that matches the browser type to call the local application corresponding to the add-in, and use the add-in to control the application corresponding to the add-in to perform a print operation on the document to be printed corresponding to the page.
[0065] Optionally, the determining unit 401 is also used to obtain the browser's kernel version; and to determine the browser type based on the browser's kernel version.
[0066] Optionally, the determining unit 401 is further configured to, if it is determined that the browser's kernel version is not an IE kernel and is a Chromium kernel, and the browser's type is not the default type, then use a WPS add-in that matches the Chromium kernel to call the local WPS application, and use the WPS add-in to control the WPS application to perform printing operations on the document to be printed corresponding to the page.
[0067] Optionally, the determining unit 401 is further configured to open the document to be printed using a WPS add-in, load the document to be printed into the WPS application using a WPS add-in, and control the WPS application to perform printing operations on the document to be printed corresponding to the page according to the printing process pre-configured in the pre-file corresponding to the WPS add-in.
[0068] Optionally, the determining unit 401 is further configured to use the WPS add-in to control the WPS application to execute the printing process in sequence according to the pre-configured printing process in the pre-file corresponding to the WPS add-in, open the document to be printed, submit the document to be printed printing task, and close the document to be printed after submitting the document to be printed printing task. The document to be printed printing task is used to instruct the associated printer to output the document to be printed.
[0069] Optionally, the processing unit 402 is also used to download the prerequisite files corresponding to the WPS add-in from the server and save the prerequisite files corresponding to the WPS add-in to the local machine.
[0070] Optionally, the determining unit 401 is further configured to, if it is determined that the browser's kernel version is the IE kernel and the browser type is the default type, call an ActiveX control that matches the browser type to perform a printing operation on the document to be printed corresponding to the page using the ActiveX control.
[0071] Figure 5 This is a first block diagram of an electronic device used to implement the document printing method of this application, as shown below. Figure 5 As shown, the electronic device 500 includes: a memory 501, a processor 502, and a transceiver 503.
[0072] The processor 502, memory 501, and transceiver 503 are interconnected;
[0073] Transceiver 503 is used for sending and receiving data;
[0074] Memory 501 stores computer-executed instructions;
[0075] The processor 502 executes computer execution instructions stored in the memory 501, causing the processor 502 to perform the method provided in any of the above embodiments.
[0076] Figure 6 This is a second block diagram of an electronic device used to implement the document printing method of this application, as shown below. Figure 6 As shown, the electronic device can be a computer, digital broadcasting terminal, messaging device, tablet device, personal digital assistant, server, server cluster, etc.
[0077] Electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input / output (I / O) interface 812, sensor component 814, and communication component 816.
[0078] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0079] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0080] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0081] Multimedia component 808 includes a screen that provides an output interface between electronic device 800 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When electronic device 800 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0082] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0083] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0084] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0085] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0086] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0087] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0088] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores computer-executable instructions that are executed by a processor using the methods in any of the above embodiments.
[0089] In an exemplary embodiment, a computer program product is also provided, including a computer program that is executed by a processor using the methods of any of the above embodiments.
[0090] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0091] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A document printing method, characterized in that, The method includes: In response to a print operation on the currently displayed page of the browser, the type of the browser is determined; wherein, different types of browsers use different printing methods; If it is determined that the browser type is not the default type, then an add-in that matches the browser type is used to call the local application corresponding to the add-in, and the add-in is used to control the application corresponding to the add-in to perform a printing operation on the document to be printed corresponding to the page. Determining the browser type includes: Obtain the browser's kernel version; determine the browser type based on the browser's kernel version; wherein, the browser type includes a default type and a non-default type, the default type being a browser using the IE kernel, and the non-default type being a browser not using the IE kernel.
2. The method according to claim 1, characterized in that, If it is determined that the browser type is not the default type, then an add-in matching the browser type is used to call the local application corresponding to the add-in, and the add-in is used to control the application corresponding to the add-in to perform a printing operation on the document to be printed corresponding to the page, including: If it is determined that the browser's kernel version is not IE kernel and is Chromium kernel, then it is determined that the browser type is not the default type. In this case, a WPS add-in that matches the Chromium kernel is used to call the local WPS application, and the WPS add-in is used to control the WPS application to perform a printing operation on the document to be printed corresponding to the page.
3. The method according to claim 2, characterized in that, The step of using the WPS add-in to control the WPS application to perform a printing operation on the document to be printed corresponding to the page includes: The document to be printed is opened using the WPS add-in, and the document to be printed is loaded into the WPS application using the WPS add-in. The WPS add-in controls the WPS application to perform printing operations on the document to be printed corresponding to the page according to the printing process pre-configured in the pre-file of the WPS add-in.
4. The method according to claim 3, characterized in that, If the pre-configured printing process is to open a document, submit a document print job, and close the document after submitting the document print job, then the step of using the WPS add-in to control the WPS application to perform a printing operation on the document to be printed corresponding to the page according to the pre-configured printing process in the pre-file corresponding to the WPS add-in includes: The WPS add-in controls the WPS application to execute the printing process according to the pre-configured printing process in the pre-file corresponding to the WPS add-in, sequentially opening the document to be printed, submitting the print job of the document to be printed, and closing the document to be printed after submitting the print job of the document to be printed. The print job of the document to be printed is used to instruct the associated printer to output the document to be printed.
5. The method according to claim 3 or 4, characterized in that, Also includes: Download the prerequisite files for the WPS add-in from the server and save them locally.
6. The method according to claim 2, characterized in that, Also includes: If the browser's kernel version is determined to be the IE kernel, and the browser type is determined to be the default type, then an ActiveX control matching the browser type is invoked to perform a printing operation on the document to be printed corresponding to the page using the ActiveX control.
7. A document printing device, characterized in that, The device includes: A determining unit is configured to determine the type of the browser in response to a printing operation on the currently displayed page of the browser; wherein different types of browsers use different printing methods; The processing unit is configured to, if it is determined that the browser type is not the default type, use an add-in that matches the browser type to call the local application corresponding to the add-in, and use the add-in to control the application corresponding to the add-in to perform a printing operation on the document to be printed corresponding to the page; The determining unit is further configured to: obtain the kernel version of the browser; determine the type of the browser based on the kernel version of the browser; wherein the type of the browser includes a default type and a non-default type, the default type being a browser using the IE kernel, and the non-default type being a browser not using the IE kernel.
8. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Page printing method and device
CN106528006A
Office calling method and device based on office automation system, equipment and medium
CN115454669A