Printing processing method and device suitable for multiple operating systems and electronic equipment

By mapping parameters in the Windows system's print driver to the print job request structure of the Linux system, the problem of high maintenance costs in multi-operating system printing processing is solved, achieving seamless cross-system access and printing function compatibility, and improving enterprise operational efficiency.

CN121832869APending Publication Date: 2026-04-10ZHONGKE FANGDE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, multi-operating system printing processing solutions require separate adjustments to the drivers, clients, and servers of Windows and Linux systems during maintenance, resulting in a large workload, low development efficiency, and high maintenance costs.

Method used

By reading printing parameters from the device mode structure of the Windows system's print driver and mapping them according to the printer description file of the Linux system, the parameter names and values ​​are converted into a print job request structure that conforms to the Linux system and sent to the print client and server.

Benefits of technology

It reduces the maintenance cost of printing solutions, enables seamless cross-system access and printing function compatibility, and improves enterprise operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832869A_ABST
    Figure CN121832869A_ABST
Patent Text Reader

Abstract

The invention discloses a printing processing method and device suitable for multiple operating systems and electronic equipment, and belongs to the technical field of computers. The method is applied to a printing driver of a Windows system, and specifically comprises the following steps: reading a first printing parameter from an equipment mode structure corresponding to a printing request; according to a specification of a printer description file of a Linux system for a printing task request structure, mapping the equipment mode structure to obtain a mapped target printing task request structure; the mapping processing comprises the steps of mapping the first printing parameter name into a second printing parameter name in the printing task request structure, and mapping the first parameter value into a second parameter value corresponding to the second printing parameter name; and sending the target printing task request structure to a printing client, so that the printing client sends the target printing task request structure to a printing server. The method can reduce the maintenance cost of the printing processing scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and specifically relates to a printing processing method, apparatus and electronic device applicable to multiple operating systems. Background Technology

[0002] In the process of enterprise informatization, the collaborative operation of multiple operating systems is quite common. Windows, with its simple and intuitive interface and abundant commercial software resources, is widely used in office environments; while Linux, due to its open-source nature, stability, and high customizability, is widely used in server-side applications and professional fields with high requirements for system security and performance. Against this backdrop, achieving printing support across multiple operating systems is a crucial task that urgently needs to be addressed.

[0003] Currently, a platform-isolated printing processing solution is commonly used. Specifically, this involves building separate and complete printing processing solutions for Windows and Linux operating systems, ensuring that each solution is independent and does not interfere with the others. At the driver level, a dedicated print driver is developed for both Windows and Linux systems. At the client level, native client programs are also developed for both Windows and Linux systems. The Windows client has built-in logic for interacting with the Windows print driver, while the Linux client has logic for working with the Linux print driver. To effectively handle print requests from different clients, the server needs to build multiple sets of adaptation logic. Specifically, the server must be able to accurately identify and parse Windows and Linux format parameters, processing them accordingly to achieve unified scheduling and management of print tasks across different systems.

[0004] While platform-isolated printing solutions address printing issues across multiple operating systems to some extent, system maintenance requires adjustments to the drivers, clients, and servers for both Windows and Linux systems, whether adding new features or fixing vulnerabilities. This results in a heavy maintenance workload, low development efficiency, and significantly increased maintenance costs. Summary of the Invention

[0005] The purpose of this application is to provide a printing processing method, apparatus, and electronic device applicable to multiple operating systems, which can reduce the maintenance cost of printing processing solutions.

[0006] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a printing processing method applicable to multiple operating systems, including Windows and Linux systems; the method is applied to the printing driver of the Windows system, including: Read the first print parameter from the device mode structure corresponding to the print request; the first print parameter includes: a first print parameter name, and the first print parameter name corresponds to a first parameter value; According to the specifications of the printer description file of the Linux system for the print job request structure, the device mode structure is mapped to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. Send the target print job request structure to the print client so that the print client sends the target print job request structure to the print server.

[0007] Secondly, embodiments of this application provide a printing processing method applicable to multiple operating systems, the method being applied to a print server, including: The system receives a target print job request structure from a multi-operating system print client; the multi-operating system includes Windows and Linux; wherein, the print driver of the Windows system reads a first print parameter from the device mode structure corresponding to the print request; the first print parameter includes a first print parameter name, and the first print parameter name corresponds to a first parameter value; according to the printer description file of the Linux system for the print job request structure specification, the device mode structure is mapped to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name; The target print job request structure is converted into print instructions that conform to the specifications of the printing device; The print command is sent to the printing device so that the printing device prints the PDF file corresponding to the print command according to the print configuration parameters in the print command.

[0008] Thirdly, embodiments of this application provide a printing processing apparatus applicable to multiple operating systems, including Windows and Linux systems; the apparatus applies a printing driver to the Windows system, comprising: The reading module is used to read the first printing parameter from the device mode structure corresponding to the printing request; the first printing parameter includes: a first printing parameter name, and the first printing parameter name corresponds to a first parameter value; The mapping module is used to map the device mode structure according to the specifications of the print job request structure in the printer description file of the Linux system, so as to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. The sending module is used to send the target print task request structure to the print client, so that the print client sends the target print task request structure to the print server.

[0009] Fourthly, embodiments of this application provide a printing processing apparatus suitable for multiple operating systems, the apparatus being applied to a printing server, comprising: A receiving module is configured to receive a target print job request structure from a print client operating multiple operating systems, including Windows and Linux. The Windows print driver reads a first print parameter from the device mode structure corresponding to the print request. The first print parameter includes a first print parameter name and a corresponding first parameter value. Based on the Linux printer description file's specification for the print job request structure, the device mode structure is mapped to obtain a mapped target print job request structure. The mapping process includes mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name. The conversion module is used to convert the target print job request structure into print instructions that conform to the specifications of the printing device; The sending module is used to send the print command to the printing device so that the printing device can print the PDF file corresponding to the print command according to the print configuration parameters in the print command.

[0010] Fifthly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0011] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0012] In the technical solution of this application embodiment, the Windows system print driver first reads the first print parameter, which includes a first parameter name and a corresponding parameter value, from the device mode structure corresponding to the print request; then, according to the specifications of the Linux system printer description file for the print job request structure, it performs mapping processing on the device mode structure. Specifically, the mapping processing is used to map the first print parameter name to a second print parameter name in the print job request structure, and the first parameter value to a second parameter value corresponding to the second parameter name; then, it sends the mapped target print job request structure to the print client, so that the print client sends the target print job request structure to the print server.

[0013] Since the Windows system's print driver maps the device mode structure under the Windows system environment to a target print job request structure that conforms to the Linux system's printer description file, and sends the target print job request structure to the print server via the print client, the Windows system's print driver can be updated specifically when adding new features or fixing vulnerabilities, without modifying the print client and print server. Therefore, the embodiments of this application can reduce the maintenance cost of the print processing solution. Attached Figure Description

[0014] Figure 1 This is a schematic diagram illustrating the application environment of a printing processing method applicable to multiple operating systems according to an embodiment of this application; Figure 2 This is a flowchart illustrating the steps of a printing processing method applicable to multiple operating systems according to an embodiment of this application; Figure 3 This is a flowchart illustrating the steps of a printing processing method applicable to multiple operating systems according to an embodiment of this application; Figure 4 This is a schematic flowchart of a printing processing method applicable to multiple operating systems according to an embodiment of this application; Figure 5 This is a structural block diagram of a printing processing apparatus applicable to multiple operating systems according to an embodiment of this application; Figure 6 This is a structural block diagram of a printing processing apparatus applicable to multiple operating systems according to an embodiment of this application; Figure 7 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0017] The following description, in conjunction with the accompanying drawings, details the printing processing method, apparatus, and electronic device applicable to multiple operating systems provided in this application through specific embodiments and application scenarios.

[0018] This application provides a printing method applicable to multiple operating systems, which can be applied to enterprise multi-operating system collaborative work scenarios. In such scenarios, enterprises often need a complete printing solution to break down the technical barriers between different operating systems, achieve seamless access and printing compatibility of devices running multiple systems such as Windows and Linux, increase the smoothness of cross-system office processes, and thus improve the overall operational efficiency of the enterprise.

[0019] Of course, the embodiments of this application do not limit the specific application scenarios. In fact, the method of the embodiments of this application can also be applied to printing scenarios on university campuses, supporting teachers and students on different system devices such as Windows personal computers, Linux teaching terminals, and mobile terminals to submit printing tasks, meeting the printing needs of multiple areas such as libraries, teaching buildings, and laboratories; it can also be applied to printing scenarios in government service halls, adapting to Windows office hosts and Linux business terminals at different business windows in the hall, realizing cross-system rapid printing of various certificates and forms, and improving the efficiency of government affairs processing; it can also be applied to R&D and testing scenarios in Internet companies, helping R&D personnel to directly print test reports, code documents, and other materials in multiple system environments such as Windows development machines and Linux test servers, simplifying cross-system office operation processes.

[0020] In this embodiment, the print driver is a program module running in the operating system. Based on the system's print spooler service, it receives print requests from applications such as WPS and Word, and converts these requests into print task data with set parameter formats. The print client is deployed on the terminal device, interacts with the print driver, receives the print task data with set parameter formats generated by the print driver, and sends it to the print server. The print server is deployed in the network, receives the print task data sent by the print client, queues, schedules, and manages the print task data, and finally sends the processed data to the printing device.

[0021] Reference Figure 1 This illustration shows a schematic diagram of an application environment for a printing processing method applicable to multiple operating systems according to an embodiment of this application. In this method, a Windows application generates a first print request, the Windows print driver converts the first print request into first print job data, and sends the first print job data to a Windows print server via a Windows print client. Similarly, a Linux application generates a second print request, the Linux print driver converts the second print request into second print job data, and sends the second print job data to a Linux print server via a Linux print client.

[0022] The relevant technology employs a platform-isolated printing processing solution. This solution ensures that the data for the first print job conforms to Windows system specifications, while the data for the second print job conforms to Linux system specifications. Consequently, during system maintenance, whether adding new features or fixing vulnerabilities, adjustments must be made to the corresponding drivers, clients, and servers for both Windows and Linux systems. This results in a large maintenance workload, low development efficiency, and a significant increase in maintenance costs.

[0023] To address the technical problems of high maintenance workload, low development efficiency, and significantly increased maintenance costs associated with platform-isolated printing solutions in related technologies, this application provides a printing processing method applicable to multiple operating systems, including Windows and Linux systems. The method is applied to the print driver of the Windows system and specifically includes: reading a first print parameter from the device mode structure corresponding to the print request; the first print parameter includes a first print parameter name, which corresponds to a first parameter value; mapping the device mode structure according to the printer description file specifications for print task request structures in the Linux system to obtain a mapped target print task request structure; the mapping process includes: mapping the first print parameter name to a second print parameter name in the print task request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name; sending the target print task request structure to the print client, so that the print client sends the target print task request structure to the print server.

[0024] A print driver is a program that runs in the operating system and is responsible for establishing a communication bridge between the operating system and the printing device. It can parse the print commands issued by the operating system and convert them into control signals and data formats that the printing device can recognize.

[0025] In the technical solution of this application embodiment, the Windows system print driver first reads the first print parameter, which includes a first parameter name and a corresponding parameter value, from the device mode structure corresponding to the print request; then, according to the specifications of the Linux system printer description file for the print job request structure, it performs mapping processing on the device mode structure; specifically, the above mapping processing is used to map the first print parameter name to the second print parameter name in the print job request structure, and the first parameter value to the second parameter value corresponding to the second parameter name; then, it sends the mapped target print job request structure to the print client, so that the print client sends the target print job request structure to the print server.

[0026] Because the Windows system's print driver maps the device mode structure under the Windows system environment to a target print job request structure that conforms to the Linux system's printer description file, and sends this target print job request structure to the print server via the print client, the Windows system's print driver can be updated specifically to add new features or fix vulnerabilities without modifying the print client and print server. Therefore, the embodiments of this application can reduce the maintenance cost of the print processing solution.

[0027] Furthermore, since the target print job request structure in the Windows system environment conforms to the specification of the Linux system printer description file, and the Linux system print driver will also directly generate a target print job request structure that conforms to this specification, the embodiments of this application can establish a unified print job description specification for multiple operating systems, eliminate the uncertainty of printing results caused by the differences in driver implementation of different operating systems from the data source, and provide users with a completely consistent cross-platform printing experience.

[0028] Furthermore, since the printing client and printing server in this embodiment of the application face the same and unified target printing task request structure, the coupling between the printing client and printing server and the underlying operating system platform can be greatly reduced, thereby improving the flexibility and maintainability of the printing processing solution.

[0029] The printing processing method applicable to multiple operating systems in this application embodiment can be executed by an electronic device, including devices with operating system deployment capabilities such as mobile terminals, personal computers, tablet computers, and servers.

[0030] The following specific embodiments illustrate the printing processing method applicable to multiple operating systems according to the present application.

[0031] Reference Figure 2 This document illustrates a flowchart of a printing processing method applicable to multiple operating systems according to an embodiment of this application. The multiple operating systems include Windows and Linux. The method is applied to the printing driver of a Windows system and specifically includes the following steps: Step 201: Read the first print parameter from the device mode structure corresponding to the print request; the first print parameter includes: a first print parameter name, and the first print parameter name corresponds to a first parameter value; Step 202: According to the specifications of the printer description file of the Linux system for the print job request structure, the device mode structure is mapped to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. Step 203: Send the target print job request structure to the print client so that the print client sends the target print job request structure to the print server.

[0032] In a Windows system, print requests are initiated by applications running on the Windows system (such as WPS, Word, or other software that supports printing). When a user performs a print operation in these applications, the application calls the Windows Print API (Application Programming Interface) to submit a print request to the operating system. This print request includes the content of the document to be printed and the user's various print configuration parameters for this print request.

[0033] The Device Mode structure is a data structure defined by the Windows system (usually referring to the DEVMODE structure). It is used to store the configuration information of the printing device and the print configuration parameters corresponding to the print request. The content of this structure is filled and written by the application based on the specific selections made by the user in the print configuration interface (such as page setup, printer properties dialog boxes, etc.) (e.g., paper size, print orientation, resolution, number of copies, etc.). In essence, it maps the user's abstract printing requirements into a series of print configuration parameters that the printer can recognize.

[0034] The first printing parameter (including the first printing parameter name and its corresponding first parameter value) mentioned in step 201 is the printing configuration parameter extracted from this device mode structure written by the application and strongly associated with the printing request.

[0035] In step 202, the printer description file of the Linux system is a file used in the Linux system ecosystem to define the attributes, printing capabilities and configurable parameter rules of the printing device.

[0036] This document is typically written by printer manufacturers or the open-source community according to the specifications of the Linux printing subsystem. It provides a standardized list of printer functions and configurations for the printing subsystem, which may cover printing configuration information such as paper size type, print resolution level, color mode options, duplex printing logic, etc.

[0037] For example, the parameter passing specifications defined in the printer description file of a Linux system are specifically reflected in the information received through command-line parameters when the printer driver is invoked.

[0038] These command-line parameters not only contain job metadata assigned by the CUPS (Common UNIX Printing System), such as job identifiers (e.g., 765) and usernames (e.g., llg), but also carry job attributes related to printing capabilities, as specified in the print description file. These job attributes are combined in key-value pairs in the command-line parameter at index 5, such as ColorModel=RGB (color mode is red, green, and blue), Duplex=None (duplex printing is disabled), PageSize=A4 (paper size is A4), and Resolution=300dpi (print resolution is 300 dots per inch). They determine the output characteristics of the print job, such as color display mode, duplex printing enabled status, paper size, and print resolution parameters.

[0039] In the process of mapping the Windows system device mode structure to the Linux system print job request structure, the specifications defined by the Linux system printer description file for the print job request structure are first clarified. These specifications cover core content such as the naming rules, data format, and logical relationships between parameters of the second print parameters.

[0040] Subsequently, the various first printing parameters (each with specific functions and semantics) contained in the Windows system device mode structure are parsed, and based on the semantics of the parameters, a mapping relationship is established between the first printing parameters in the Windows device mode structure and the second printing parameters defined in the Linux system printer description file.

[0041] Specifically, the first print parameter name representing a specific printing attribute (such as color mode) in the Windows system needs to be mapped to a semantically consistent second print parameter name in the Linux print job request structure; at the same time, the parameter value corresponding to the first print parameter needs to be converted into the second parameter value corresponding to the second print parameter name according to the parameter format and value range specified by the Linux system.

[0042] Through the dual adaptation and conversion of parameter names and parameter values, the first printing parameters in the Windows system device mode structure are reorganized and arranged according to the specifications of the Linux system printer description file, and finally a target print job request structure that meets the requirements of the Linux system is generated.

[0043] In a specific implementation, the second print parameter name of the print task request structure specifically includes: the full path filename corresponding to the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename corresponding to the source file to be printed; and print configuration parameters.

[0044] In the Windows environment, the PS intermediate file is a PostScript (Page Description Language) format file generated by the Windows Print Service when processing print jobs, which converts the user-specified source file to be printed. It serves as a transitional file connecting the source file to be printed and the final print output file.

[0045] The PS intermediate file will be processed according to the print configuration parameters (such as duplex printing, multiple copies), including page arrangement. The Windows print driver will convert the PS intermediate file into a PDF (Portable Document Format) file to meet the processing requirements of the Linux printing subsystem. For example, if the source file to be printed has 5 pages, and the print configuration parameters include duplex printing and 2 copies, then the PS intermediate file will have (5+1)*2=12 pages.

[0046] The full path filename corresponding to the PDF file of the source file to be printed is used to identify the complete path of the PDF file to be printed in the file system or the storage location accessible by the printing subsystem. It is the identifier for the Linux printing subsystem (such as CUPS) to locate and read the data source file for printing. Its format can be a local path or a URI (Uniform Resource Identifier).

[0047] The user account associated with the print request is used to record the identity of the user who initiated the print request. This user account can be the account the user logs into on the print client. This user account is the basis for Windows Print Service to determine job ownership, control permissions, or manage auditing.

[0048] Print configuration parameters are a set of print job attributes organized in the form of "key=value", covering print configurations that determine the print output effect, such as color model, paper size, resolution, duplex printing, etc. (e.g., ColorModel=RGB).

[0049] Therefore, the full path to the PDF file of the source document to be printed can locate the print data source, allowing the printing system to read the content of the file to be processed. User accounts are used to identify the job owner, supporting the system's access control and job tracking. Print configuration parameters define the output specifications of the print job and are crucial for connecting application settings with the printing device.

[0050] In a specific implementation, the process of mapping the first print parameter name to the second print parameter name in the print task request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name, specifically includes: mapping the integer first parameter value to the string second parameter value.

[0051] Taking the semantics of the first print parameter name as color mode as an example, in the device mode structure of the Windows system, the first parameter value corresponding to the color mode is an integer. For example, the dmColor parameter, when its value is 0, represents monochrome, and when it is 1, it represents color. During the mapping process from the Windows system to the print job request structure of the Linux system, the first parameter value of the dmColor parameter is converted into a second parameter value of string type. For example, monochrome can be converted to ColorModel=Gray, and color can be converted to ColorModel=RGB.

[0052] Taking the semantics of the first print parameter name as paper size as an example, in Windows systems, the dmPaperSize parameter, when used to represent paper size, has a value of 9 representing A4 paper. After being mapped to the print job request structure in Linux systems, it will be presented as a string, such as PageSize=A4.

[0053] Taking duplex printing as an example, the semantics of the first print parameter name are as follows: Windows' dmDuplex parameter is mapped to the print job request structure of the Linux system as follows: 1 represents no duplex printing, mapped as Duplex=None; 2 represents duplex printing with the long side flipped, mapped as Duplex=DuplexNoTumble; 3 represents duplex printing with the short side flipped, mapped as Duplex=DuplexTumble.

[0054] In one implementation of this application, the first print parameter name includes: a multi-copy organization parameter; the step of mapping the first print parameter name to a second print parameter name in the print task request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name, includes: When the first parameter of the multi-copy organization parameter is 1, if the total number of pages in the PS intermediate file is greater than 1, the second print parameter name is "Print per Copy Parameter"; or... When the first parameter value of the multi-copy sorting parameter is 0, the second printing parameter name is non-copy printing parameter.

[0055] The multi-copy collation parameter controls how multiple copies of a document are collated when printing. In Windows, the related parameter is dmCollate, which determines whether the intermediate file PS received by the driver is a single file concatenated from multiple pages when printing multiple pages.

[0056] When performing parameter mapping: If the first parameter of the multi-copy collation parameter (dmCollate) is 1, the total number of pages in the PS intermediate file needs to be checked. If the total number of pages is greater than 1, the second print parameter name will be mapped to the per-copy print parameter, which corresponds to the value Collate in the Linux environment. This means that the PS intermediate file is a single file concatenated from multiple copies, and ultimately, regardless of the original requirement to print multiple copies, only one copy will be printed. If the total number of pages is less than or equal to 1, to avoid ambiguity, the multi-copy collation parameter will be mapped to noCollate.

[0057] When the first parameter of the multi-copy collation parameter is 0, the second print parameter name will be mapped to the non-copy printing parameter. In the Linux environment, the corresponding value is noCollate, which means it is not collated and will actually print according to the specified number of copies.

[0058] It should be noted that if the total number of pages is less than or equal to 1, to avoid ambiguity, the multi-copy collation parameter will be mapped to noCollate. In this case, regardless of the original number of copies required, the actual effect is equivalent to non-copy printing, meaning no special processing such as page concatenation will be performed, and it will be output as a normal single page or single document.

[0059] The method in this application embodiment may further include: if the first parameter value corresponding to the first print parameter name does not exist, obtaining the default parameter value corresponding to the first print parameter name from the printer description file of the Windows system, and using it as the first parameter value corresponding to the first print parameter name.

[0060] The method in this application embodiment may also include processing logic for supplementing default parameter values: when the first parameter value corresponding to the first print parameter name does not exist (i.e. is not provided), the default parameter value corresponding to the first print parameter name will be read from the printer description file (PPD, PostScript Printer Description) of the Windows system and used as the first parameter value corresponding to the first print parameter name.

[0061] Taking the ColorMode parameter as an example, the printer driver checks the first print parameter name it reads. If it finds that the first parameter value corresponding to the first print parameter name ColorMode is not provided, it will check the printer preferences (which essentially reads the default parameters in the printer description file PPD in the Windows system; when users modify printer preferences in system settings, they are actually modifying this PPD file). After finding the default parameter value corresponding to ColorMode, it will fill in the first parameter value corresponding to the ColorMode parameter, thus completing the parameter pair.

[0062] In one optional implementation of this application, the target print task request structure includes: a target page number parameter, which represents the actual number of pages to be printed corresponding to the PDF file of the source file to be printed; the process of determining the target page number parameter specifically includes: Step A1: If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is blank and the PDF file supports printing copy by copy, then if the total number of pages is 2, the target page number parameter value is (total number of pages - 1) * number of copies; or, if the total number of pages is greater than 2, the target page number of the PDF file is (total number of pages / number of copies - 1) * number of copies; or... Step A2: If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is blank and the PDF file does not support printing copy by copy, then the parameter value of the target page number parameter is (total number of pages - 1) * number of copies; where "*" refers to a multiplication operation, which multiplies the result of (total number of pages - 1) by the number of copies. Alternatively, Step A3: If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not a blank page and the PDF file supports printing copy by copy, then the value of the target page number parameter is the total number of pages; or, Step A4: If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not a blank page and the PDF file does not support printing copy by copy, then the parameter value of the target page number parameter is the product of the total number of pages and the number of copies.

[0063] Steps A1 to A4, based on factors such as the parity of the total number of pages in the PDF file, support for duplex printing, whether the last page is blank, and support for copy printing, can accurately determine the actual number of pages printed under various complex printing conditions, avoiding over- or under-counting of pages, thus achieving accurate statistics on the actual print volume of the printing task.

[0064] In step A1, when the total number of pages in the PDF file is even, supports duplex printing, and its last page is blank, if the file supports printing copies, this indicates support for page-by-page processing. Therefore, processing needs to be differentiated based on the specific number of pages. In the special case of a total of 2 pages, the target number of pages to be printed is calculated as (total pages - 1) × number of copies; if the total number of pages is greater than 2, the target number of pages to be printed is calculated as (total pages / number of copies - 1) × number of copies. This differentiation accurately reflects the actual physical number of pages when printing copies duplex with a blank last page, avoiding the inclusion of blank pages in the print run.

[0065] Step A2 assumes the PDF file has an even number of pages, supports double-sided printing, and has a blank last page. If the file does not support copy printing, it means no page-splitting has been performed. In this case, the target print count is calculated as (total pages - 1) × number of copies. This method ensures accurate page counting for even-numbered PDF files with blank last pages in non-copy printing scenarios without page-splitting, avoiding including blank pages in the print run.

[0066] Step A3: When the total number of pages in the PDF file is even, supports double-sided printing, and the last page is not blank, if the file supports printing copies, this indicates that it supports page concatenation. In this case, the target number of pages to print is directly taken as the total number of pages. This approach reasonably reflects the actual need to print all pages when printing copies and the last page is not blank.

[0067] Step A4 assumes the PDF file has an even number of pages, supports duplex printing, and the last page is not blank. If the file does not support copy printing (i.e., no page-merging has been performed), the target number of pages to print is calculated as the product of the total number of pages and the number of copies. This method accurately calculates the actual total number of even-numbered pages (excluding blank last pages) of a PDF file when copy printing is not supported and no page-merging has been performed.

[0068] Steps A1 to A4 describe the process of determining the target page number parameter when the total number of pages in the PDF file is even and the PDF file supports double-sided printing. This application also provides processes for determining the target page number parameter in other situations.

[0069] Specifically, if a PDF file supports single-sided printing and has an even number of pages, or supports single-sided printing and has an odd number of pages, or supports double-sided printing and has an odd number of pages, and the PDF file supports printing one copy at a time, this indicates that it supports page-splitting, and the target number of pages to print is directly the total number of pages. Alternatively, if the PDF file does not support printing one copy at a time, i.e., it has not undergone page-splitting, the target number of pages to print is equal to the product of the total number of pages and the number of copies.

[0070] In a specific implementation, this application embodiment can fill the second print parameter name and second parameter value after mapping processing into the target print task request parameter structure. The source file to be printed submitted by the application is also converted to PDF format by the print driver (if it is already a PDF, no conversion is needed), and the PDF file is backed up to a specified location, with the path filled into the corresponding parameter structure.

[0071] The parameter structure of the target print job request is as follows: outfile: The full path and filename of the PDF file containing the source file to be printed; user: The user account corresponding to the print request; title: The full path and filename of the source file to be printed; and... options: A string of key-value pairs containing printing configuration parameters such as number of copies, print color, and whether to print double-sided.

[0072] In step 203, the print driver can invoke the client by calling the startup script, passing in the parameters of the target print job request structure. The command for the startup script to invoke the print client is: "client executable file", "outfile", "user", "title", "options", where the client executable file is used to start the print client. After the print client is started, it will forward the target print job request structure to the print server.

[0073] In one implementation, the second print parameter name of the print task request structure includes: the full path filename corresponding to the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename corresponding to the source file to be printed; and print configuration parameters. The print client can obtain the PDF file of the source file to be printed based on the full path filename corresponding to the PDF file of the source file to be printed, and send the user account corresponding to the print request, the print configuration parameters, and the aforementioned PDF file to the print server.

[0074] In summary, the printing processing method applicable to multiple operating systems in this application embodiment maps the device mode structure under the Windows system environment to a target print job request structure that conforms to the printer description file of the Linux system, and sends the target print job request structure to the print server via the print client. In this way, when adding new functions or fixing vulnerabilities, the print driver of the Windows system can be updated in a targeted manner without modifying the print client and the print server. Therefore, this application embodiment can reduce the maintenance cost of the printing processing solution.

[0075] Reference Figure 3 This document illustrates a flowchart of a printing processing method applicable to multiple operating systems according to an embodiment of this application. The method is applied to a print server and specifically includes the following steps: Step 301: Receive the target print job request structure from a multi-operating system print client; the multi-operating system includes: Windows system and Linux system; wherein, the print driver of the Windows system reads the first print parameter from the device mode structure corresponding to the print request; the first print parameter includes: a first print parameter name, and the first print parameter name corresponds to a first parameter value; according to the printer description file of the Linux system for the print job request structure specification, perform mapping processing on the device mode structure to obtain the mapped target print job request structure; the mapping processing includes: mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name; Step 302: Convert the target print task request structure into print instructions that conform to the specifications of the printing device; Step 303: Send the print command to the printing device so that the printing device prints the PDF file corresponding to the print command according to the print configuration parameters in the print command.

[0076] In this embodiment, the print drivers of Windows and Linux systems use a target print job request structure with the same parameter structure to encapsulate print configuration parameters and information about the source file to be printed.

[0077] For the print server, adopting a unified parameter structure for the target print task request can significantly reduce the development and maintenance costs of cross-system adaptation. The server does not need to develop parsing and verification logic for two heterogeneous parameter systems, Windows and Linux, but only needs to maintain a standardized processing flow to be compatible with print requests from both systems.

[0078] The embodiments of this application can also enhance the scalability of the printing server. When adding new printing parameters or connecting to printing drivers of other operating systems, it is only necessary to extend the fields in the unified target printing task request structure, without making significant adjustments to the underlying processing logic, thus reducing the complexity of system iteration and upgrades.

[0079] In step 302, the print server can first extract print configuration parameters (such as color mode, paper size, duplex printing settings, etc.) and user account information from the target print job request structure, and can also receive PDF files sent by the client; then, with the help of the CUPS service, the target print job request structure is converted into print instructions that conform to the specifications of the printing device.

[0080] Specifically, the print server sends a print job request to the CUPS service. This print job request includes print settings parameters (such as color mode, paper size, duplex printing, and other configuration information) and the PDF file to be printed.

[0081] Optionally, after receiving a print job request, the CUPS service calls the filter programs defined in the print device's PPD file to process the print data. For example, through a series of filter programs, the content of the PDF file is converted into a set of device-specific instructions that the print device can directly recognize, according to rules that the print device can understand. These filter programs also parse and embed print setting parameters and generate the final print instructions based on the print device's instruction specifications.

[0082] The CUPS service sends the generated print commands to the printing device through the corresponding backend program (such as a USB Universal Serial Bus backend, network backend, parallel port backend, etc.). The CUPS service automatically selects the appropriate backend based on the actual connection type of the printing device, and transmits the print commands to the printer in an orderly manner, triggering the printing action to complete the printing task.

[0083] After receiving a print command, the printing device first verifies the completeness and validity of the print command. If the verification is successful, it parses the print configuration parameters in the print command, such as color mode and paper size. Then, it processes the PDF file corresponding to the command based on these print configuration parameters and prints it page by page until the entire print job is completed.

[0084] In this embodiment of the application, the second print parameter name of the print task request structure includes: the full path filename corresponding to the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename corresponding to the source file to be printed; the target page number parameter; and the print configuration parameter.

[0085] The method may further include: determining the cumulative number of pages printed by the user account within a preset time period based on the user account and target page number parameters in the second print parameter name; if the cumulative number of pages printed exceeds the page number threshold, rejecting the target print task request structure corresponding to the user account and returning a quota overrun prompt message to the print client.

[0086] In this embodiment of the application, based on the user account identifier carried in the second print parameter name and combined with the target page number parameter in the target print task request structure, the total number of pages of all print tasks for the user account within a preset time period is accumulated to form a cumulative print page number. When the statistical result exceeds the preset page number threshold, the quota control mechanism will be triggered, the target print task request structure corresponding to the user account will be directly rejected, and a quota over-limit prompt message will be sent to the printing client that initiated the request.

[0087] By quantifying and controlling the number of pages printed by each user account, we can prevent individual users from excessively occupying printing equipment resources, ensuring the fairness and efficiency of printing equipment use, and also achieve refined management of printing costs, reducing unnecessary waste of paper and consumables. At the same time, timely quota overrun reminders can make users clearly aware of their printing permission status, improving the system's interactive transparency and user experience.

[0088] Reference Figure 4 The flowchart illustrates a printing processing method applicable to multiple operating systems according to an embodiment of this application. The execution entity in the flowchart specifically includes: Printing front-end: WPS (Word Processing, Presentation, Spreadsheets), browser, text manager, etc., are the starting point of the printing process and the manager of the source files to be printed.

[0089] Print driver: Deployed on various operating systems.

[0090] The differences between Windows and Linux print drivers include: Windows print drivers are based on the PrintSpooler service, receiving assigned print requests from the PrintSpooler and completing the print job. Linux print drivers are based on CUPS, receiving parameters from CUPS and processing print requests.

[0091] The similarities between Windows and Linux print drivers are that they convert request parameters from the print front end into a consistent intermediate format, organize them into a target print job request structure, and send them to the print client.

[0092] Print client: Responsible for user interface interaction and forwarding the target print job request structure. The print client shares the same code logic on both Linux and Windows.

[0093] Print server: Receives all target print job request structures uploaded by clients, and manages the job queue and printer scheduling. It does not need to perform differentiated adaptations for jobs from different sources.

[0094] Figure 4 In this process, the Windows system's print front-end generates a first print request, the Windows system's print driver converts this first print request into a first target print job request structure, and sends the first target print job request structure to the Windows system's print server via the Windows system's print client. The Linux system's print front-end generates a second print request, the Linux system's print driver converts this second print request into a second target print job request structure, and sends the second target print job request structure to the Linux system's print server via the Linux system's print client. The first and second target print job request structures have the same parameter structure.

[0095] The steps for processing the print driver are as follows: Step 1: Task interception and parameter extraction.

[0096] The original printing parameters come from the printing settings generated by various printing front-ends (such as WPS, browsers, text editors, etc.) based on the PPD file provided by the driver.

[0097] The PPD file defines the various functions supported by the printer (such as paper size, default margins, etc.) and specifies the parameter passing format for some parameters (such as allowing RGB to represent color, Gray to represent gray, and disabling sRGB and other messy color modes).

[0098] The print front end (WPS, browser, text editor, etc.) organizes print configuration parameters and generates the source file to be printed based on the options provided in the PPD file. The print driver obtains the print configuration parameters and the source file to be printed from these print front ends through the platform's print service (CUPS / PrintSpooler).

[0099] The specific process is as follows: In Linux systems, the Linux system's print driver establishes a "Smart Printing Virtual Printer" print queue during installation. When printing, the print front-end selects the queue name (printer name) and clicks print; the print job is then routed to the CUPS service, which wakes up the Linux system's print driver, passes in the parameters, and then the Linux system's print driver processes the job.

[0100] When Windows printer drivers are installed, they create a print queue, which is attached to the background service PrintSpooler. When the printer frontend selects the queue name (printer name) and clicks print, PrintSpooler queues the job request into the Windows printer driver's queue, and then wakes up the printer driver to process it.

[0101] Step 2: Mapping and Recognition.

[0102] In a Linux environment, applications rely on PPD files to organize parameters and pass them down the line. The PPD file is essentially the "instruction manual" for the print driver. It translates user-selected options such as "duplex," "grayscale," and "200 dpi" into a set of standard key-value pairs (e.g., Duplex=DuplexNoTumble, ColorModel=Gray, Resolution=200x200dpi), which are then passed to the print driver by CUPS at the start of the job, using command-line arguments and environment variables. The print driver simply executes according to the predefined relationships in the PPD file, without needing to parse the user interface itself.

[0103] In a Windows environment, when the printing program starts, PrintSpooler invokes the print driver. The print driver obtains the job ID by actively selecting * FROM Win32_PrintJob, and then calls the GetJob() function based on the job ID to read the parameter structure DEVMODE. The DEVMODE structure contains parameters such as "color / duplex / number of copies". The job driver then maps the numbers to corresponding text according to the Linux PPD file specification, for example, 1->RGB, 2->Gray, etc.

[0104] Step 3: Intelligent completion and correction.

[0105] After obtaining the parameters, the print driver will check sensitive parameters. For example, if the ColorMode parameter is not provided, the print parameter preferences will be checked. (This actually checks the default parameters in the PPD file; modifying printer preferences in system settings modifies this file.) Once the corresponding parameter value is found, it will be added to the parameter pair.

[0106] Meanwhile, some parameters may be transmitted incorrectly, or the parameter transmission rules may differ due to system differences. For example, when printing double-sided, Windows WPS has a rule for automatically adding pages to the document, while Linux does not. Similarly, when printing a single-page document and setting it to print copy by copy, Windows WPS and Linux WPS transmit different parameters. In such cases, it is necessary to update and correct some key parameters by checking other parameters. For instance, when the dmCollate parameter in Windows is 1, it is necessary to check the total number of pages in the document. If the total number of pages is less than or equal to 1, this parameter is mapped to noCollate; otherwise, it is mapped to Collate.

[0107] Step 4: Generate a target print job request structure with the same parameter structure.

[0108] Step 5: Submit the results to the client.

[0109] The print client is invoked by calling the startup script, passing in the target print job request structure organized in step four. Once activated, the print client forwards the target print job request structure to the print server.

[0110] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0111] It should be noted that the printing processing method applicable to multiple operating systems provided in this application embodiment can be executed by a printing processing device applicable to multiple operating systems, or by a control module within that device for executing the printing processing method applicable to multiple operating systems. This application embodiment uses the execution of the printing processing method applicable to multiple operating systems by a printing processing device applicable to multiple operating systems as an example to illustrate the printing processing method applicable to multiple operating systems provided in this application embodiment.

[0112] Reference Figure 5 This document illustrates a schematic diagram of a printing processing apparatus applicable to multiple operating systems according to an embodiment of this application. The multiple operating systems include Windows and Linux. The apparatus is applied to a printing driver in a Windows system, and specifically includes the following modules: The reading module 501 is used to read the first printing parameter from the device mode structure corresponding to the printing request; the first printing parameter includes: a first printing parameter name, and the first printing parameter name corresponds to a first parameter value; The mapping module 502 is used to map the device mode structure according to the specifications of the printer description file of the Linux system for the print job request structure, so as to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. The sending module 503 is used to send the target print task request structure to the print client, so that the print client sends the target print task request structure to the print server.

[0113] Optionally, the second print parameter name of the print task request structure includes: the full path filename corresponding to the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename corresponding to the source file to be printed; and print configuration parameters.

[0114] Optionally, the mapping module includes: The first mapping module is used to map the integer first parameter value to the string second parameter value.

[0115] Optionally, the first printing parameter name includes: multi-copy sorting parameter; the mapping module includes: The second mapping module is used to, when the first parameter value of the multi-copy organization parameter is 1, name the second printing parameter as "print per copy parameter" if the total number of pages in the PS intermediate file is greater than 1; or... The third mapping module is used to name the second printing parameter as a non-copy-by-copy printing parameter when the first parameter value of the multi-copy sorting parameter is 0.

[0116] Optionally, the device further includes: The supplementary module is used to obtain the default parameter value corresponding to the first print parameter name from the printer description file of the Windows system when the first parameter value corresponding to the first print parameter name does not exist, and use it as the first parameter value corresponding to the first print parameter name.

[0117] Optionally, the target print job request structure includes: a target page number parameter, which represents the actual number of pages to be printed corresponding to the PDF file of the source file to be printed; the device further includes: The first target page number parameter determination module is configured to, when the total number of pages in the PDF file is even and the PDF file supports double-sided printing, if the last page of the PDF file is blank and the PDF file supports printing copy by copy, then when the total number of pages is 2, the parameter value of the target page number parameter is (total number of pages - 1) * number of copies; or, when the total number of pages is greater than 2, the target page number of the PDF file is (total number of pages / number of copies - 1) * number of copies; or The second target page number parameter determination module is used to determine the target page number parameter as follows: if the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is blank and the PDF file does not support printing one copy at a time, then the parameter value of the target page number parameter is (total number of pages - 1) * number of copies; or The third target page number parameter determination module is used to determine the target page number parameter as the total number of pages if the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not blank and the PDF file supports printing one copy at a time; or The fourth target page number parameter determination module is used to determine the target page number parameter as the product of the total number of pages and the number of copies when the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not a blank page and the PDF file does not support printing one copy at a time.

[0118] Reference Figure 6 This document illustrates a schematic diagram of a printing processing apparatus applicable to multiple operating systems according to an embodiment of this application. The apparatus is applied to a printing server and specifically includes the following modules: The receiving module 601 is configured to receive a target print job request structure from a multi-operating system print client; the multi-operating system includes a Windows system and a Linux system; wherein, the print driver of the Windows system reads a first print parameter from the device mode structure corresponding to the print request; the first print parameter includes a first print parameter name, and the first print parameter name corresponds to a first parameter value; according to the printer description file of the Linux system for the print job request structure specification, the device mode structure is mapped to obtain a mapped target print job request structure; the mapping process includes: mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name; The conversion module 602 is used to convert the target print task request structure into print instructions that conform to the specifications of the printing device; The sending module 603 is used to send the printing instruction to the printing device so that the printing device can print the PDF file corresponding to the printing instruction according to the printing configuration parameters in the printing instruction.

[0119] Optionally, the second print parameter name of the print job request structure includes: the full path filename corresponding to the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename corresponding to the source file to be printed; the target page number parameter; and the print configuration parameters. The device further includes: The cumulative number of printed pages determination module is used to determine the cumulative number of printed pages of the user account within a preset time period based on the user account and target page number parameters in the second print parameter name; The over-quota processing module is used to reject the target print job request structure corresponding to the user account and return a quota over-limit prompt message to the printing client when the cumulative number of printed pages exceeds the page threshold.

[0120] The printing processing device applicable to multiple operating systems in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0121] The printing processing apparatus applicable to multiple operating systems in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0122] The printing processing apparatus for multiple operating systems provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method embodiments for printing processing devices with multiple operating systems will not be described again here to avoid repetition.

[0123] Optionally, embodiments of this application also provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described printing processing method embodiments applicable to multiple operating systems and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0124] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0125] Figure 7 A schematic diagram of the hardware structure of an electronic device 1100 according to an embodiment of this application.

[0126] Electronic device 1100 has one or more processors 1102, a control module (chipset) 1104 coupled to at least one of the processors 1102, a memory 1106 coupled to the control module 1104, a non-volatile memory / storage device 1108 coupled to the control module 1104, one or more input / output devices 1110 coupled to the control module 1104, and a network interface 1112 coupled to the control module 1104.

[0127] Processor 1102 may include one or more single-core or multi-core processors, and processor 1102 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, electronic device 1100 can serve as a terminal device, server (cluster), or other device as described in the embodiments of this application.

[0128] In some embodiments, electronic device 1100 may include one or more computer-readable media (e.g., memory 1106 or non-volatile memory / storage device 1108) having instructions 1114 and one or more processors 1102 that are combined with the one or more computer-readable media and configured to execute instructions 1114 to implement modules and thus perform the actions described in this disclosure.

[0129] In one embodiment, the control module 1104 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1102 and / or any suitable device or component communicating with the control module 1104.

[0130] The control module 1104 may include a memory controller module to provide an interface to the memory 1106. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0131] Memory 1106 may be used, for example, to load and store data and / or instructions 1114 for electronic device 1100. In one embodiment, memory 1106 may include any suitable volatile memory, such as suitable DRAM (Dynamic Random Access Memory). In some embodiments, memory 1106 may include double data rate type quad synchronous dynamic random access memory.

[0132] In one embodiment, the control module 1104 may include one or more input / output controllers to provide an interface to the non-volatile memory / storage device 1108 and (one or more) input / output devices 1110.

[0133] For example, non-volatile memory / storage device 1108 may be used to store data and / or instructions 1114. Non-volatile memory / storage device 1108 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives, one or more optical disk drives, and / or one or more digital universal optical disk drives).

[0134] The non-volatile memory / storage device 1108 may include storage resources that are physically part of a device on which the electronic device 1100 is mounted, or that can be accessed by the device without being part of the device. For example, the non-volatile memory / storage device 1108 may be accessed via a network via one or more input / output devices 1110.

[0135] One or more input / output devices 1110 may provide an interface for electronic device 1100 to communicate with any other suitable device. Input / output devices 1110 may include communication components, audio components, sensor components, etc. Network interface 1112 may provide an interface for electronic device 1100 to communicate via one or more networks. Electronic device 1100 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi (Wireless Fidelity), 2G (2-Generation wireless telephone technology), 3G (3-Generation wireless telephone technology), 4G (4-Generation wireless telephone technology), 5G (5-Generation wireless telephone technology), etc., or combinations thereof.

[0136] In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1104. In one embodiment, at least one of the processors 1102 may be logically packaged with one or more controllers of the control module 1104 to form a system-in-package. In one embodiment, at least one of the processors 1102 may be integrated with the logic of one or more controllers of the control module 1104 on the same die. In one embodiment, at least one of the processors 1102 may be integrated with the logic of one or more controllers of the control module 1104 on the same die to form a system-on-a-chip.

[0137] In various embodiments, electronic device 1100 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, touchscreen device, netbook, etc.). In various embodiments, electronic device 1100 may have more or fewer components and / or different architectures. For example, in some embodiments, electronic device 1100 includes one or more cameras, a keyboard, a liquid crystal display screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0138] In the aforementioned electronic device 1100, a main control chip may be used as a processor or control module, sensor data, position information, etc. are stored in a memory or non-volatile memory / storage device, the sensor group may be used as an input / output device, and the communication interface may include a network interface.

[0139] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described printing processing method embodiments applicable to multiple operating systems and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0140] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0141] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0143] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A printing processing method applicable to multiple operating systems, characterized in that, The multiple operating systems include: Windows and Linux systems; the method is applied to the printing driver of the Windows system, including: Read the first print parameter from the device mode structure corresponding to the print request; the first print parameter includes: a first print parameter name, and the first print parameter name corresponds to a first parameter value; According to the specifications of the printer description file of the Linux system for the print job request structure, the device mode structure is mapped to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. Send the target print job request structure to the print client so that the print client sends the target print job request structure to the print server.

2. The method according to claim 1, characterized in that, The second print parameter name in the print task request structure includes: the full path filename of the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename of the source file to be printed; and print configuration parameters.

3. The method according to claim 1, characterized in that, The step of mapping the first print parameter name to the second print parameter name in the print task request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name, includes: Map the first integer parameter value to the second string parameter value.

4. The method according to claim 1, characterized in that, The first print parameter name includes: multi-copy organization parameter; the step of mapping the first print parameter name to the second print parameter name in the print task request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name, includes: When the first parameter of the multi-copy organization parameter is 1, if the total number of pages in the PS intermediate file is greater than 1, the second print parameter name is "Print per Copy Parameter"; or... When the first parameter value of the multi-copy sorting parameter is 0, the second printing parameter name is non-copy printing parameter.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If the first parameter value corresponding to the first print parameter name does not exist, the default parameter value corresponding to the first print parameter name is obtained from the printer description file of the Windows system and used as the first parameter value corresponding to the first print parameter name.

6. The method according to any one of claims 1 to 4, characterized in that, The target print job request structure includes a target page number parameter, which represents the actual number of pages to be printed corresponding to the PDF file of the source file to be printed; the method further includes: If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is blank and the PDF file supports printing copy by copy, then when the total number of pages is 2, the target page number parameter is (total number of pages - 1) * number of copies; or, when the total number of pages is greater than 2, the target page number of the PDF file is (total number of pages / number of copies - 1) * number of copies; or If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, but the last page of the PDF file is blank and the PDF file does not support printing copy by copy, then the value of the target page number parameter is (total number of pages - 1) * number of copies; or If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not blank and the PDF file supports printing copy by copy, then the parameter value of the target page number parameter is the total number of pages; or If the total number of pages in the PDF file is even and the PDF file supports double-sided printing, and if the last page of the PDF file is not a blank page and the PDF file does not support printing copies, then the parameter value of the target page number parameter is the product of the total number of pages and the number of copies.

7. A printing processing method applicable to multiple operating systems, characterized in that, The method is applied to the printing server and includes: The system receives a target print job request structure from a multi-operating system print client; the multi-operating system includes Windows and Linux; wherein, the print driver of the Windows system reads a first print parameter from the device mode structure corresponding to the print request; the first print parameter includes a first print parameter name, and the first print parameter name corresponds to a first parameter value; according to the printer description file of the Linux system for the print job request structure specification, the device mode structure is mapped to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name; The target print job request structure is converted into print instructions that conform to the specifications of the printing device; The print command is sent to the printing device so that the printing device prints the PDF file corresponding to the print command according to the print configuration parameters in the print command.

8. The method according to claim 7, characterized in that, The second print parameter name in the print job request structure includes: the full path filename of the PDF file of the source file to be printed; the user account corresponding to the print request; the full path filename of the source file to be printed; the target page number parameter; and the print configuration parameters. The method further includes: Based on the user account and target page number parameters in the second print parameter name, determine the cumulative number of pages printed by the user account within a preset time period; If the cumulative number of printed pages exceeds the page threshold, the target print job request structure corresponding to the user account is rejected, and a quota overrun warning message is returned to the printing client.

9. A printing processing device suitable for multiple operating systems, characterized in that, The multiple operating systems include: Windows system and Linux system; the device is applied to the printing driver of the Windows system, including: The reading module is used to read the first printing parameter from the device mode structure corresponding to the printing request; the first printing parameter includes: a first printing parameter name, and the first printing parameter name corresponds to a first parameter value; The mapping module is used to map the device mode structure according to the specifications of the print job request structure in the printer description file of the Linux system to obtain the mapped target print job request structure; the mapping process includes: mapping the first print parameter name to the second print parameter name in the print job request structure, and mapping the first parameter value to the second parameter value corresponding to the second print parameter name. The sending module is used to send the target print task request structure to the print client, so that the print client sends the target print task request structure to the print server.

10. A printing processing device suitable for multiple operating systems, characterized in that, The device is used in a printing server and includes: A receiving module is configured to receive a target print job request structure from a print client operating multiple operating systems, including Windows and Linux. The Windows print driver reads a first print parameter from the device mode structure corresponding to the print request. The first print parameter includes a first print parameter name and a corresponding first parameter value. Based on the Linux printer description file's specification for the print job request structure, the device mode structure is mapped to obtain a mapped target print job request structure. The mapping process includes mapping the first print parameter name to a second print parameter name in the print job request structure, and mapping the first parameter value to a second parameter value corresponding to the second print parameter name. The conversion module is used to convert the target print job request structure into print instructions that conform to the specifications of the printing device; The sending module is used to send the print command to the printing device so that the printing device can print the PDF file corresponding to the print command according to the print configuration parameters in the print command.

11. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method as described in claims 1-8.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in claims 1-8.