Universal Web printing method based on tool JasperReports

Through the general web printing method based on JasperReports, the complexity and low efficiency of the web system under diversified printing needs are solved, template customization and silent printing are realized, and printing efficiency and user experience are improved.

CN119718225APending Publication Date: 2025-03-28SHANGHAI HEADING INFORMATION ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411951158.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing web system is incomplexity and efficiency when dealing with multiple printing paper formats, price tag printing, set-up printing and printing content from different customers, resulting in cumbersome and time-consuming user operation processes.

Method used

Using a general web printing method based on JasperReports, the template file is designed through Jaspersoft Studio, uploaded to the printing service gem-service, and the GemBox printing program is used to achieve silent printing, cross-platform compatibility.

Benefits of technology

The template and refined customization of printed content are realized, printing efficiency and user experience are improved, and operation steps and waiting time are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718225A_ABST
    Figure CN119718225A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Web front-end printing, in particular to a universal Web printing method based on tool JasperReports, which comprises the following steps: S1, a designer Jaspersoft Studio establishes a JasperReports template file by defining business parameters, designing a user-defined SQL (Structured Query Language) statement and a control content style; s2, uploading the template file to a printing service (gem-service) through an uploading interface, uploading a business field to the printing service (gem-service) through a general Web calling execution interface, and generating a printing file according to the template file, the business field and a library JasperReports Lib; and S3, the printing program GemBox monitors a printing button, and when printing is triggered, the printer executes printing operation according to the printing file URL and the printing parameters. According to the method, the JasperReports Lib is introduced to be matched with the Jaspersoft Studio designer, so that the templated and refined customization of the printing content is realized; and a printing button is monitored through a printing program GemBox, and when printing is triggered, the printer executes printing operation according to the printing file URL and the printing parameters, so that the silent printing capability is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Web front-end printing, and in particular to a general Web printing method, device and storage medium based on the tool JasperReports. Background Art

[0002] In today's digital age, Web systems are widely used in various fields, and the printing function, as a key link in information output, faces many complex challenges and diverse demands. With the continuous expansion and refinement of business, the printing demands of the Web are no longer limited to simple document output, but are highly diversified and refined.

[0003] In many business scenarios, the Web system needs to support a variety of different printing paper formats, price tag printing, copy printing, and different modules or the same module have different printing contents for different customers, which increases the complexity of implementing the printing function; in addition, the Web system has a wide range of users, and they use different operating systems, the most common of which are Windows, MacOS, and Linux; the printing mechanism built into the Web browser has accuracy issues when processing some complex printing requirements; in batch printing scenarios, the browser's built-in printing mechanism is extremely inefficient, and the frequently popped-up print preview box will not only interrupt the user's operation process and increase the user's waiting time, but also the user needs to repeatedly confirm the same print settings, which makes the entire batch printing process very cumbersome and time-consuming. Summary of the invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and provide a general Web printing method based on the tool JasperReports, comprising the following steps: S1: The designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL statements and control content styles; S2: The template file is uploaded to the print service gem-service through the upload interface, the general Web call execution interface uploads the business field to the print service gem-service, and generates a print file according to the template file, the business field and the library JasperReports Lib; S3: The printing program GemBox listens to the print button. When printing is triggered, the printer performs the printing operation according to the print file URL and printing parameters.

[0005] Preferably, in step S1, the designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL queries and control content styles, including: S11: The designer Jaspersoft Studio defines the business parameters including parameter name, parameter type, and parameter date; S12: The designer Jaspersoft Studio designs the custom SQL statement according to the business parameters; S13: the designer Jaspersoft Studio selects a control type including text, picture and table, adjusts input parameters including font, font size, alignment and background style according to the control type to design the control style, and designs the control content according to the custom SQL statement; S14: obtaining an initial template file according to the business parameters, the custom SQL statement, the control type, the control style, and the control content, and previewing and displaying the initial template file, and obtaining the JasperReports template file according to the preview display result.

[0006] Preferably, in step S14, obtaining the JasperReports template file according to the preview display result further includes: The initial template file is previewed and displayed to determine whether to adjust. If adjustment is required, the adjustment is performed and the initial template file is updated. It is determined whether the updated initial template file is adjusted. If adjustment is not required, the JasperReports template file is generated.

[0007] Preferably, in step S2, the template file is uploaded to the printing service gem-service through an upload interface, further comprising: The security authentication information is sent according to the template file name and the template file path, and the upload interface of the printing service gem-service performs verification according to the security authentication information, and uploads the template file to the printing service gem-service after the verification is passed.

[0008] Preferably, in step S2, the general Web call execution interface uploads the business fields to the print service gem-service, and generates a print file according to the template file, the business fields and the library JasperReports Lib, further comprising: S21: The general Web accesses the business system, the business system transmits the business parameters through the execution interface, and the business parameters execute the custom SQL statement to find the business field; S22: The printing service gem-service fills the template file through the library JasperReports Lib. The library JasperReports Lib obtains business data according to the business field, and fills the template file according to the business data to generate the printing file including html, pdf, excel, and pictures.

[0009] Preferably, in step S23, generating the print file according to the preview display result further includes: The result file is previewed and displayed to determine whether to adjust. If adjustment is required, the adjustment is performed and the result file is updated. It is determined whether the updated result file is adjusted. If adjustment is not required, the print file is generated.

[0010] Preferably, in step S3, the printing program GemBox monitors the print button, and when printing is triggered, the printer performs a printing operation according to the print file URL and print parameters, further comprising: S31: the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox; S32: When the user clicks the print button, the printing program GemBox silently drives the printing operation according to the print file URL and printing parameters.

[0011] Preferably, in step S31, the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox, further comprising: The universal Web passes the print file URL returned by the print service gem-service to the print program GemBox through the print interface provided by the print program GemBox, and passes the print parameters including the number of print copies, paper height, and paper width to the print program GemBox.

[0012] Preferably, the printing program GemBox utilizes the unified API of Java Print Service to access printers of different operating systems, obtain printing service information, set printing attributes, submit printing tasks and other driver printing operations to achieve cross-platform compatibility.

[0013] Based on the same concept, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the general Web printing method based on the tool JasperReports as described in the embodiment.

[0014] Based on the same concept, the present invention further provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute the steps of the general Web printing method based on the JasperReports tool as described in the embodiment.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention uses the designer Jaspersoft Studio to define business parameters, design custom SQL statements and control content styles to create JasperReports template files, and realize template visualization design; The present invention uploads the template file to the printing service gem-service through the upload interface, the general Web calls the execution interface to upload the business field to the printing service gem-service, and generates a printing file according to the template file, the business field and the library JasperReports Lib, so as to realize the templateization and refined customization of the printing content; The present invention monitors the print button through the printing program GemBox. When printing is triggered, the printer executes the printing operation according to the print file URL and printing parameters to achieve silent printing capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.

[0017] Figure 1 It is a flow chart of a general Web printing method based on the tool JasperReports of the present invention; Figure 2 The Jaspersoft Studio view of the general Web printing method based on the tool JasperReports of the present invention; Figure 3 The business flow chart of the general Web printing method based on the tool JasperReports of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0019] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0020] Example 1 See also Figure 1 As shown, this embodiment provides a general Web printing method based on the JasperReports tool, including the following steps: S1: The designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL statements and control content styles.

[0021] Preferably, in step S1, the designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL queries and control content styles, including: S11: The designer Jaspersoft Studio defines the business parameters including parameter name, parameter type, and parameter date. Specifically, in this embodiment, please refer to Figure 2 As shown, the parameter types are integer, string, and date. The parameter date sets its date format, value range, and other related properties to ensure the accuracy and validity of date-related data during report generation. S12: The designer Jaspersoft Studio designs a custom SQL statement according to the business parameter. Specifically, in this embodiment, a business parameter representing the shipping date range is set. Then, the parameter can be used in the SQL statement to limit the time interval for querying sales data, so that the report can display corresponding data content according to different date range requirements; S13: Select control types including text, image and table in designer Jaspersoft Studio, adjust input parameters including font, font size, alignment and background style according to control type to design control style, and design control content according to custom SQL statement; S14: obtaining an initial template file according to the business parameters, the custom SQL statement, the control type, the control style, and the control content, and previewing and displaying the initial template file, and obtaining a JasperReports template file according to the preview display result.

[0022] Preferably, in step S14, obtaining a JasperReports template file according to the preview display result further includes: The initial template file is previewed and displayed to determine whether to adjust. If adjustment is required, the adjustment is performed and the initial template file is updated to determine whether the updated initial template file is adjusted. If adjustment is not required, the JasperReports template file is generated. Specifically, in this embodiment, the updated initial template file is previewed and displayed so that relevant personnel can intuitively view the effect after filling and check whether there are problems such as inaccurate data display and unreasonable layout.

[0023] S2: The template file is uploaded to the print service gem-service through the upload interface. The general Web call execution interface uploads the business fields to the print service gem-service, and generates a print file based on the template file, business fields and library JasperReports Lib.

[0024] Preferably, in step S2, the template file is uploaded to the printing service gem-service through an upload interface, further comprising: The security authentication information is sent according to the template file name and template file path. The upload interface of the printing service gem-service verifies according to the security authentication information. After the verification is passed, the template file is uploaded to the printing service gem-service.

[0025] Preferably, in step S2, the general Web call execution interface uploads the business fields to the print service gem-service, and generates a print file according to the template file, the business fields and the library JasperReports Lib, further comprising: S21: The general Web accesses the business system. The business system transmits business parameters through the execution interface. The business parameters execute the custom SQL statement to find the business fields. Specifically, in this embodiment, the business fields of the statement business table including supplier, order number, packaging form, unit price, etc. are provided. The business fields of the purchase order business table including order number, supplier, price, receiving unit, total order amount, and order commodity details can also be provided. S22: The printing service gem-service fills the template file through the library JasperReports Lib. The library JasperReports Lib obtains business data according to the business field, and fills the template file according to the business data to generate a printing file including html, pdf, excel, and pictures.

[0026] Preferably, in step S23, generating a print file according to the preview display result further includes: The result file is previewed and displayed to determine whether to adjust. If adjustment is required, the adjustment is performed and the result file is updated to determine whether the updated result file is adjusted. If adjustment is not required, a print file is generated. Specifically, in this embodiment, after the template file is previewed and displayed, the preview display result needs to be carefully judged to check whether there are situations such as unclear data display, irregular format, missing or redundant content, etc., so as to determine whether the template file needs to be adjusted. If it is found that adjustment is required after judgment, then the template file is modified accordingly according to the problems found, such as adjusting the display format of the data, re-layouting the control position, supplementing or deleting certain content, etc. After the adjustment is completed, the template file will be updated to reflect the adjusted state. After the template file is updated, the same judgment process is performed on the updated template file again to check whether there are still places that need to be adjusted. If it is determined that no adjustment is required after further judgment, a print file is generated according to the template file state at this time. The generated print file format can include multiple forms such as html, pdf, excel, and pictures to meet the diverse needs of print file formats in different scenarios.

[0027] S3: The printing program GemBox listens to the print button. When printing is triggered, the printer performs the printing operation according to the print file URL and printing parameters.

[0028] Preferably, in step S3, the printing program GemBox monitors the print button, and when printing is triggered, the printer performs a printing operation according to the print file URL and print parameters, further comprising: S31: the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox; S32: When the user clicks the print button, the printing program GemBox silently drives the printing operation according to the print file URL and printing parameters. Specifically, in this embodiment, the printing operation driven by the printer is silently triggered, and there is no need to pop up the browser's own print preview box and then click again to confirm the printing operation. The silent operation without pop-up boxes is particularly suitable for batch printing scenarios of selecting a batch of data in business systems.

[0029] Preferably, in step S31, the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox, further comprising: The general Web passes the print file URL returned by the print service gem-service to the print program GemBox through the print interface provided by the print program GemBox, and passes the print parameters including the number of print copies, paper height, and paper width to the print program GemBox.

[0030] Preferably, the printing parameters passed by the printing interface provided by the printing program GemBox are as follows: { "copies": 1, / / print number of copies, if not set, 1 copy will be printed by default "url": "string", / / The remote address of the print file generated by gem-service. This example takes a pdf file as an example. "width": 0 / / Paper width (default unit: pixels) "height": 0, / / paper height (default unit: pixel) "measureUnit": "pixel", / / Unit of measurement for paper width and height, value range: pixel-pixel, mm-millimeter, if not passed, it is assumed to be pixel by default "fixPaperSizeEnabled": true, / / Whether to pass the width*height parameters as paper specifications to the printer, not by default "mode": "silent", / / Print mode: silent-silent printing, interactive-interactive printing "offset": { / / Print content offset "horizontal": 10, / / Horizontal offset (in millimeters) "vertical": 10 / / Vertical offset (in millimeters) }, "orientation": 1, / / Printing direction: 0-horizontal, 1-vertical, 2-reverse horizontal, if not set, use the printer default behavior "printerName": "string", / / Printer driver name, if not set, use the default printer "quality": 4, / / Print quality, value range: 3-sloppy, 4-normal, 5-high quality, default printer behavior if not passed "scaling": 0, / / Scaling mode of printed content, 0-100% scale printing (Def), 1-shrink adaptation, 2-stretch adaptation, 3-adaptive "sides": 0, / / Printer single and double page settings: 0-single-sided printing, 1-double-sided long-edge printing, 2-double-sided short-edge printing, if not set, use the printer default behavior "thePage": "1 or 1,2 or 2-3" / / Specify the page number to be printed, the value range is [1,…]. Multiple pages are separated by commas, and consecutive pages are separated by -. If it is empty, it means printing all pages. }.

[0031] Preferably, the printing program GemBox uses the unified API of Java Print Service to access printers of different operating systems, obtain print service information, set print properties, submit print tasks and other driver printing operations to achieve cross-platform compatibility. Specifically, in this embodiment, the printing program GemBox is a Java client service running locally on the user's computer, and provides a quick installation package for the corresponding operating systems Windows, MacOS, and Linux, and the corresponding installation package integrates the JDK under the corresponding operating system; Java Print Service is used in the code to achieve cross-platform compatibility. In Windows systems, printers can be found and accessed through specific Windows print service interfaces, and in MacOS systems, this is achieved through its own print service framework. The Java Print Service API can automatically adapt to these different methods in the background, so that the printing program GemBox only needs to call the corresponding method in the API (such as PrintServiceLookup.lookupPrintServices()) to obtain a list of available printers, regardless of the operating system the program runs on.

[0032] Better yet, through the Java Print Service API, the printing program GemBox can obtain various detailed information about the printer, including the printer's name, model, supported paper size, print resolution, available print modes (such as color printing, black and white printing, etc.). The API interacts with the business system's print service to collect and organize this information and returns it to the printing program GemBox in a unified format.

[0033] Based on the functions provided by the Java Print Service API, the printing program GemBox sets various printing properties. For example, the properties mentioned above, such as the number of copies, paper size, print quality, and print mode, can all be set through the corresponding classes and methods in the API.

[0034] When the printing program GemBox has completed the setting of printing attributes, you can use the Java PrintService API to submit the print task to the corresponding printer. The API provides special methods (such as DocPrintJob.print()) to trigger the print operation, and send the configured print file (obtained by specifying the print file URL mentioned above) and the set print attributes to the printer to start executing the print task.

[0035] The rendered PDF opened by the browser has certain differences in font and layout from the real PDF file itself, which leads to the use of the browser's default PDF preview print page. When you click this button, the printed effect is sometimes not accurately laid out. This embodiment does not call the browser's own printing behavior, but calls the print button in the business system or the direct print button in the print preview. Specifically, it calls the GemBox interface to download the PDF file generated by gem-service and directly push the file to the corresponding printer driver to achieve accurate printing of the PDF file itself.

[0036] See also Figure 3As shown, the user initiates a print request through the user computer, and the user computer uses a general Web application to access the business system. Specifically, a print request in JSON format is sent to the business system service in combination with the HTTP protocol. The business system service obtains print files including html, pdf, excel, and pictures from databases including PostgreSQL, MySQL, and Oracle according to the print service, and obtains the file URL and print parameters according to the print service. The print task is submitted according to the obtained data, and the print task is submitted to the print program GemBox through HTTP or WebSocket. The print program GemBox downloads the pdf file generated by the print service gem-service through the publishing service interface and directly pushes the file to the corresponding printer driver.

[0037] Example 2 In some embodiments of the present application, a computer device is also provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of a general Web printing method based on the tool JasperReports in an embodiment of the present invention.

[0038] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute the steps of a general Web printing method based on the JasperReports tool in an embodiment of the present invention.

[0039] It is understandable that, for the aforementioned general Web printing method based on the JasperReports tool, if it is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0040] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0041] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A general Web printing method based on the JasperReports tool, characterized in that: The following steps are involved: S1: The designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL statements and control content styles; S2: The template file is uploaded to the print service gem-service through the upload interface, the general Web call execution interface uploads the business field to the print service gem-service, and generates a print file according to the template file, the business field and the library JasperReports Lib; S3: The printing program GemBox listens to the print button. When printing is triggered, the printer performs the printing operation according to the print file URL and printing parameters.

2. The general Web printing method based on the JasperReports tool according to claim 1, characterized in that: In step S1, the designer Jaspersoft Studio creates a JasperReports template file by defining business parameters, designing custom SQL queries and control content styles, including: S11: The designer Jaspersoft Studio defines the business parameters including parameter name, parameter type, and parameter date; S12: The designer Jaspersoft Studio designs the custom SQL statement according to the business parameters; S13: the designer Jaspersoft Studio selects a control type including text, picture and table, adjusts input parameters including font, font size, alignment and background style according to the control type to design the control style, and designs the control content according to the custom SQL statement; S14: obtaining an initial template file according to the business parameters, the custom SQL statement, the control type, the control style, and the control content, and previewing and displaying the initial template file, and obtaining the JasperReports template file according to the preview display result.

3. The universal Web printing method based on the JasperReports tool according to claim 2, characterized in that: In step S14, the JasperReports template file is obtained according to the preview display result, further comprising: The initial template file is previewed and displayed to determine whether to adjust. If adjustment is required, the adjustment is performed and the initial template file is updated. It is determined whether the updated initial template file is adjusted. If adjustment is not required, the JasperReports template file is generated.

4. The universal Web printing method based on the JasperReports tool according to claim 3, characterized in that: In step S2, the template file is uploaded to the printing service gem-service through the upload interface, further comprising: The security authentication information is sent according to the template file name and the template file path, and the upload interface of the printing service gem-service performs verification according to the security authentication information, and uploads the template file to the printing service gem-service after the verification is passed.

5. The universal Web printing method based on the JasperReports tool according to claim 4, characterized in that: In step S2, the general Web call execution interface uploads the business fields to the print service gem-service, and generates a print file according to the template file, the business fields and the library JasperReports Lib, further comprising: S21: The general Web accesses the business system, the business system transmits the business parameters through the execution interface, and the business parameters execute the custom SQL statement to find the business field; S22: The printing service gem-service fills the template file through the library JasperReports Lib. The library JasperReports Lib obtains business data according to the business field, and fills the template file according to the business data to generate the printing file including html, pdf, excel, and pictures.

6. The universal Web printing method based on the JasperReports tool according to claim 5, characterized in that: In step S3, the printing program GemBox listens to the print button. When printing is triggered, the printer performs the printing operation according to the print file URL and print parameters, further including: S31: the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox; S32: When the user clicks the print button, the printing program GemBox silently drives the printing operation according to the print file URL and printing parameters.

7. The universal Web printing method based on the JasperReports tool according to claim 6, characterized in that: In step S31, the general Web transmits the printing parameters to the printing program GemBox through the printing interface provided by the printing program GemBox, further comprising: The universal Web passes the print file URL returned by the print service gem-service to the print program GemBox through the print interface provided by the print program GemBox, and passes the print parameters including the number of print copies, paper height, and paper width to the print program GemBox.

8. The universal Web printing method based on the JasperReports tool according to claim 7, characterized in that: The printing program GemBox utilizes the unified API of Java Print Service to access printers of different operating systems, obtain printing service information, set printing attributes, submit printing tasks and other driver printing operations to achieve cross-platform compatibility.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the universal Web printing method based on the JasperReports tool as claimed in any one of claims 1 to 8.

10. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the universal Web printing method based on the JasperReports tool as claimed in any one of claims 1 to 8.