Image forming method, device and storage medium for custom media

By comparing and correcting the media parameters in the raster data in the driver of the terminal device, the error problem caused by the mismatch between the custom media size and the predefined media size in the image forming device is solved, and the user experience and image formation accuracy is improved .

CN118612350BActive Publication Date: 2025-01-07DALIAN RUITU INTELLIGENT PRINTING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411084387.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2025-01-07
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

In the prior art, when the user inputs a custom medium size, the image forming device may cause a difference in the media size corresponding to the raster data and the custom medium size set by the user, which will lead to an error and affect the user experience.

Method used

By comparing predefined media parameters with user-defined media parameters in the driver of the terminal device, if they do not match, correct the media parameters in the raster data to match the user-set custom media size, reduce the error rate and increase the user's Experience.

Benefits of technology

The error rate of the image forming device is effectively reduced, ensuring the accuracy of image forming operations and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612350B_ABST
    Figure CN118612350B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and storage medium for image formation of custom media, the method comprising: obtaining a first medium parameter in the raster data according to raster data determined by a universal printing system; comparing the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter; when the first medium parameter does not match the second medium parameter, correcting the first medium parameter in the raster data according to the second medium parameter; sending the corrected raster data to an image forming device, so that the image forming device performs an image forming operation according to the corrected raster data. In an embodiment of the present application, the first medium parameter is compared with the second medium parameter, and when the first medium parameter does not match the second medium parameter, the second medium parameter is used to correct the first medium parameter, thereby reducing the error rate of the image forming device and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image forming technology, and in particular to a method for forming an image of a custom medium, a terminal device, an electronic device, and a storage medium. Background Art

[0002] A host-driven image forming device (such as a GDI image forming device) uses the terminal device's memory resources and processing power to process image forming tasks and converts the image forming tasks into image forming raster bitmaps on the terminal device. This means that the host generates raster data corresponding to the image forming task. The image forming device receives the raster data corresponding to the image forming task and completes the image forming task based on the received raster data.

[0003] In the prior art, after a user enters a custom media size on a terminal device, the Common UNIX Printing System (CUPS) in the terminal device compares the custom media size entered by the user with the predefined media sizes on the terminal device. When the custom media size approaches the predefined media size, CUPS automatically sends corresponding raster data to the image forming device based on the predefined media size on the terminal device. The image forming device receives the corresponding raster data and completes the image formation operation based on the received raster data.

[0004] To ensure that the image forming device can more accurately complete image forming operations, a custom media size input interface can also be set up on the image forming device. However, when the custom media size entered by the user on the terminal device is close to the predefined media size on the terminal device, the media size corresponding to the raster data received by the image forming device is the predefined media size, which may differ from the custom media size set by the user on the image forming device. This may cause the image forming device to prompt an error, affecting the user experience.

[0005] It should be pointed out that the information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or any form of implication that the information constitutes prior art already known to those skilled in the art. Summary of the Invention

[0006] In view of this, the present application provides an image forming method, terminal device, electronic device and storage medium for custom media, so as to solve the problem in the prior art that the media size corresponding to the raster data may be different from the custom media size set by the user on the image forming device, which may cause the image forming device to prompt an error and affect the user experience.

[0007] In a first aspect, an embodiment of the present application provides a method for forming an image on a custom medium, which is executed by a driver of a terminal device, wherein the terminal device is also provided with a universal printing system. The method includes:

[0008] acquiring, according to the raster data determined by the universal printing system, a first medium parameter in the raster data, the first medium parameter being used to characterize a predefined medium pre-stored in the universal printing system;

[0009] Comparing the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter, wherein the second medium parameter is used to characterize the user-defined custom medium;

[0010] When the first medium parameter does not match the second medium parameter, correcting the first medium parameter in the grating data according to the second medium parameter;

[0011] The corrected raster data is sent to the image forming apparatus so that the image forming apparatus performs an image forming job according to the corrected raster data.

[0012] In an embodiment of the present application, the first medium parameter is compared with the second medium parameter to determine whether the first medium parameter in the determined grating data matches the second medium parameter; when the first medium parameter does not match the second medium parameter, the second medium parameter is used to correct the first medium parameter, so that the medium size corresponding to the grating data received by the image forming device is the same as the custom media size set by the user on the image forming device, thereby reducing the error rate of the image forming device and improving the user experience.

[0013] In a possible implementation, the method further includes:

[0014] When the first medium parameter matches the second medium parameter, raster data is sent to the image forming device so that the image forming device performs an image forming job according to the raster data.

[0015] In the embodiments of the present application, when the first medium parameters match the second medium parameters, the first medium parameters of the grating data do not need to be modified. Instead, the grating data is directly sent to the image forming device, allowing the image forming device to perform an image formation operation based on the grating data. It can be understood that when the first medium parameters match the second medium parameters, directly sending the grating data to the image forming device improves the intelligence level of the terminal device to a certain extent.

[0016] In one possible implementation,

[0017] The determining whether the first medium parameter matches the second medium parameter includes: determining whether the first medium parameter and the second medium parameter satisfy a first determination condition, wherein the first determination condition is used to characterize that the size of the predefined medium corresponding to the first medium parameter is the same as the size of the custom medium corresponding to the second medium parameter.

[0018] In the embodiment of the present application, by comparing the size of the predefined medium corresponding to the first medium parameter with the size of the custom medium corresponding to the second medium parameter, it is determined whether the first medium parameter in the raster data matches the second medium parameter. This reduces the error rate of the image forming device to a certain extent and improves the user experience.

[0019] In one possible implementation,

[0020] When the first medium parameter and the second medium parameter do not match, correcting the first medium parameter in the grating data according to the second medium parameter includes: when the first medium parameter and the second medium parameter do not meet a first judgment condition, correcting the first medium parameter in the grating data according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter meet the first judgment condition.

[0021] In this embodiment of the present application, a determination is made as to whether the first and second medium parameters satisfy a first determination condition. If the first and second medium parameters do not satisfy the first determination condition, the first medium parameters in the raster data are corrected according to the second medium parameters. It can be understood that the determination of whether the first and second medium parameters in the raster data match is made by comparing the size of the predefined medium corresponding to the first medium parameter with the size of the custom medium corresponding to the second medium parameter. This reduces the error rate of the image forming device to a certain extent, improving the user experience.

[0022] In a possible implementation, the first medium parameter includes the width and length of the predefined medium, and the second medium parameter includes the width and length of the custom medium.

[0023] In the embodiments of this application, the first medium parameter includes the width and length of a predefined medium; the second medium parameter includes the width and length of a custom medium. It is understood that limiting the image forming medium in this application to common length-width image forming media reduces the error rate of the image forming device to a certain extent and improves the user experience.

[0024] In one possible implementation,

[0025] The determining whether the first medium parameter matches the second medium parameter includes: determining whether the first medium parameter and the second medium parameter satisfy a second determination condition, wherein the second determination condition is used to indicate that the width of the predefined medium corresponding to the first medium parameter is the same as the width of the custom medium corresponding to the second medium parameter, and the length of the predefined medium corresponding to the first medium parameter is the same as the length of the custom medium corresponding to the second medium parameter;

[0026] When the first medium parameter and the second medium parameter do not match, correcting the first medium parameter in the grating data according to the second medium parameter includes: when the first medium parameter and the second medium parameter do not satisfy a second judgment condition, correcting the first medium parameter in the grating data according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter satisfy the second judgment condition.

[0027] In this embodiment of the present application, by determining whether the first and second medium parameters satisfy a second determination condition, if the first and second medium parameters do not satisfy the second determination condition, the first medium parameters in the raster data are corrected according to the second medium parameters. It can be understood that by comparing whether the width of the predefined medium corresponding to the first medium parameter matches the width of the custom medium corresponding to the second medium parameter, and whether the length of the predefined medium corresponding to the first medium parameter matches the length of the custom medium corresponding to the second medium parameter, the error rate of the image forming device is reduced to a certain extent, improving the user experience.

[0028] In a possible implementation, the method further includes:

[0029] When the first medium parameter and the second medium parameter satisfy a first determination condition, raster data is sent to the image forming device so that the image forming device performs an image forming job according to the raster data.

[0030] In the embodiment of the present application, when the first medium parameter and the second medium parameter meet the first judgment condition, the first medium parameter of the grating data does not need to be modified. Instead, the grating data is directly sent to the image forming device, causing the image forming device to perform an image formation operation based on the grating data. It can be understood that when the first medium parameter and the second medium parameter meet the first judgment condition, directly sending the grating data to the image forming device improves the intelligence level of the terminal device to a certain extent.

[0031] In a possible implementation, determining whether the first medium parameter matches the second medium parameter includes: determining whether the first medium parameter and the second medium parameter satisfy a third determination condition, wherein the third determination condition is used to indicate that the width of the predefined medium is greater than the length and the width of the customized medium is greater than the length, or the width of the predefined medium is less than the length and the width of the customized medium is less than the length, or the width of the predefined medium is equal to the length and the width of the customized medium is equal to the length;

[0032] When the first medium parameter and the second medium parameter do not match, the first medium parameter in the grating data is corrected according to the second medium parameter, including: when the first medium parameter and the second medium parameter do not meet the third judgment condition, the values ​​corresponding to the width and the length in the first medium parameter are swapped so that the corrected first medium parameter and the second medium parameter meet the third judgment condition, and the corrected grating data is sent to the image forming device so that the image forming device performs an image forming operation according to the corrected grating data; wherein the data used to represent the image to be printed in the corrected grating data is corrected to be used to represent the image to be printed after the values ​​corresponding to the width and the length in the first section value parameter are swapped.

[0033] In the embodiment of the present application, the first medium parameters and the second medium parameters are compared to determine whether they meet a third judgment condition, thereby determining whether the image forming medium is placed horizontally. It is understood that when the first medium parameters and the second medium parameters do not meet the third judgment condition, that is, when the image forming medium is placed horizontally, the first medium parameters are modified accordingly, thereby preventing the image forming device from reporting an error and improving the user experience.

[0034] In a second aspect, the present application provides a terminal device, including:

[0035] A first medium parameter acquisition module, configured to acquire, based on the raster data determined by the universal printing system, a first medium parameter in the raster data, wherein the first medium parameter is used to characterize a predefined medium pre-stored in the universal printing system;

[0036] A comparison module is used to compare the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter, wherein the second medium parameter is used to characterize the user-defined medium

[0037] a grating data correction module, configured to correct the first medium parameter in the grating data according to the second medium parameter when the first medium parameter does not match the second medium parameter;

[0038] The raster data sending module is used to send the corrected raster data to the image forming device, so that the image forming device performs an image forming operation according to the corrected raster data.

[0039] In a third aspect, the present application provides an electronic device, comprising:

[0040] processor;

[0041] Memory;

[0042] and a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, which, when executed by the processor, enable the electronic device to perform any one of the methods described in the first aspect.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described in the first aspect.

[0044] It is understandable that the terminal device provided in the second aspect, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect are all used to perform the method provided in this application. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application.

[0047] Figure 2 A schematic flow chart of a method for forming an image with a custom media size provided in an embodiment of the present application.

[0048] Figure 3 This is a flow chart of another method for forming an image with a customized medium size provided in an embodiment of the present application.

[0049] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0051] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0052] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0053] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0054] To facilitate understanding, a specific application scenario is first exemplified below.

[0055] See also Figure 1 , is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, this application scenario includes: a terminal device 101 and an image forming apparatus 102, wherein the terminal device 101 and the image forming apparatus 102 are interconnected via a wired or wireless communication network for information transmission. During the image formation process, the terminal device 101 generates raster data corresponding to the image formation task; the image forming apparatus 102 receives the raster data corresponding to the image formation task and completes the image formation task based on the received raster data.

[0056] Figure 1 The terminal device 101 and image forming apparatus 102 shown in the figure are merely exemplary and should not be construed as limiting the scope of protection of this application. For example, the image forming apparatus 102 includes, but is not limited to, printers, copiers, fax machines, multi-function image production and copying devices, electrostatic printing devices, and any other similar devices; the terminal device 101 includes, but is not limited to, computers, mobile phones, tablet computers, enterprise internal servers, cloud servers, and other electronic devices capable of communicating with the image forming apparatus 102.

[0057] In addition, the terminal device 101 and the image forming device 102 shown in this application scenario are interconnected through a wired or wireless communication network to transmit information. The communication network can be a local area network or a wide area network transferred through a relay device. When the communication network is a local area network, illustratively, the communication network can be a short-range communication network such as a WiFi hotspot network, a WiFi P2P network, a Bluetooth network, a ZigBee network, or a near field communication (NFC) network. When the communication network is a wide area network, illustratively, the communication network can be a third-generation wireless telephone technology (3G) network, a fourth-generation mobile communication technology (4G) network, a fifth-generation mobile communication technology (5G) network, a future-evolved public land mobile network (PLMN), or the Internet.

[0058] In the prior art, after a user enters a custom media size on a terminal device, the universal printing system in the terminal device compares the custom media size entered by the user with the predefined media sizes on the terminal device. When the custom media size approaches the predefined media size, the driver automatically sends corresponding raster data to the image forming device based on the predefined media size on the terminal device. The image forming device receives the corresponding raster data and completes the image formation operation based on the received raster data.

[0059] To ensure that the image forming device can more accurately complete image forming operations, a custom media size input interface can also be set on the image forming device. However, when the custom media size entered by the user on the terminal device is close to the predefined media size on the terminal device, the media size corresponding to the raster data received by the image forming device is the predefined media size, which may differ from the custom media size set by the user on the image forming device. This may cause the image forming device to prompt an error, affecting the user experience.

[0060] To address the above issues, in an embodiment of the present application, a first medium parameter is compared with a second medium parameter to determine whether the first medium parameter in the determined grating data matches the second medium parameter. If the first medium parameter does not match the second medium parameter, the second medium parameter is used to correct the first medium parameter, so that the medium size corresponding to the grating data received by the image forming device matches the custom medium size set by the user on the image forming device. This reduces the error rate of the image forming device and improves the user experience. This is described in detail below in conjunction with specific embodiments.

[0061] See also Figure 2 , is a flow chart of a method for forming an image of a custom medium size provided in an embodiment of the present application. This method can be applied to Figure 1 In the application scenario shown in Figure 2 As shown, it mainly includes the following steps.

[0062] Step S201: according to the raster data determined by the universal printing system, obtaining a first medium parameter in the raster data.

[0063] In an embodiment of the present application, a driver of a terminal device obtains a first medium parameter in the raster data according to the raster data determined by the universal printing system. Specifically, the first medium parameter is used to characterize a predefined medium stored in the universal printing system.

[0064] In a specific implementation, the user first enters the media size (i.e., the user-defined custom media) and image content on the terminal device's interactive interface. The universal printing program in the terminal device then compares the user-uploaded custom media with predefined media stored in the universal printing system. When the user-uploaded custom media matches the predefined media stored in the universal printing system, the universal printing system automatically generates raster data based on the predefined media and image content on the terminal device. It is understood that the raster data includes the first medium parameter.

[0065] In one possible implementation, the first medium parameter includes the width and length of the predefined medium, i.e., the image forming medium corresponding to the first medium parameter is a rectangular medium. Of course, those skilled in the art will, based on actual needs, also use the corresponding first medium parameter to characterize the shape of the image forming medium when the image forming medium is of another shape, such as a circular shape. This application does not impose any specific limitations on this.

[0066] It is understood that in one possible implementation, the image forming medium is a common length-width image forming medium. By limiting the first medium parameter in this application to include the width and length of the predefined medium, the error rate of the image forming device is reduced to a certain extent, and the user experience is improved.

[0067] In one possible implementation, the first medium parameter can also be used to characterize the size of the predefined medium, that is, the area of ​​the predefined medium. It is understood that limiting the first medium parameter in this application to characterize the size of the predefined medium can, to a certain extent, reduce the error rate of the image forming device and improve the user experience.

[0068] Step S202: Compare the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter.

[0069] In the embodiment of the present application, the first medium parameter is compared with the second medium parameter to determine whether the first medium parameter matches the second medium parameter, wherein the second medium parameter is used to characterize the user-defined medium.

[0070] In one possible implementation, the second medium parameters include the width and length of the custom medium, i.e., the image forming medium corresponding to the second medium parameters is a rectangular medium. Of course, those skilled in the art will, based on actual needs, also use the corresponding second medium parameters to characterize the shape of the image forming medium when the image forming medium is of another shape, such as a circular shape. This application does not impose any specific limitations on this.

[0071] It is understood that in one possible implementation, the image forming medium is a common length-width image forming medium. By limiting the second medium parameter in this application to include the width and length of the custom medium, the error rate of the image forming device is reduced to a certain extent, and the user experience is improved.

[0072] In one possible implementation, the second medium parameter can also be used to characterize the size of the custom medium, that is, the area of ​​the custom medium. It is understood that limiting the second medium parameter in this application to characterize the size of the custom medium reduces the error rate of the image forming device to a certain extent and improves the user experience.

[0073] Step S203: When the first medium parameter does not match the second medium parameter, the first medium parameter in the grating data is corrected according to the second medium parameter.

[0074] In an embodiment of the present application, when the first medium parameters do not match the second medium parameters, the terminal device driver corrects the first medium parameters in the raster data according to the second medium parameters. The "mismatch between the first medium parameters and the second medium parameters" indicates that the determined raster data is at risk of being reported as an error by the image forming device.

[0075] In a possible implementation, when the first medium parameter matches the second medium parameter, raster data is sent to the image forming device, so that the image forming device performs an image forming job according to the raster data.

[0076] In the embodiments of the present application, when the first medium parameters match the second medium parameters, the first medium parameters of the grating data do not need to be modified. Instead, the grating data is directly sent to the image forming device, allowing the image forming device to perform an image formation operation based on the grating data. It can be understood that when the first medium parameters match the second medium parameters, directly sending the grating data to the image forming device improves the intelligence level of the terminal device to a certain extent.

[0077] In one possible implementation, the first medium parameter includes the size of a predefined medium; the second medium parameter includes the size of a custom medium. Specifically, a determination is made as to whether the first medium parameter and the second medium parameter satisfy a first determination condition. If the first medium parameter and the second medium parameter do not satisfy the first determination condition, the first medium parameter in the grating data is corrected according to the second medium parameter so that the corrected first medium parameter and the second medium parameter satisfy the first determination condition. The first determination condition indicates that the size of the predefined medium corresponding to the first medium parameter is the same as the size of the custom medium corresponding to the second medium parameter.

[0078] For example, a first medium parameter represents a size of a predefined medium of 623.7 cm², and a second medium parameter represents a size of a custom medium of 620 cm². A determination is made as to whether the size of the predefined medium corresponding to the first medium parameter is the same as the size of the custom medium corresponding to the second medium parameter. Since 623.7 cm² ≠ 620 cm², i.e., the size of the predefined medium corresponding to the first medium parameter is different from the size of the custom medium corresponding to the second medium parameter, the first medium parameter in the grating data is corrected according to the second medium parameter, such that the corrected first medium parameter is 623.7 cm².

[0079] In this embodiment of the present application, a determination is made as to whether the first and second medium parameters satisfy a first determination condition. If the first and second medium parameters do not satisfy the first determination condition, the first medium parameters in the raster data are corrected according to the second medium parameters. It can be understood that the determination of whether the first and second medium parameters in the raster data match is made by comparing the size of the predefined medium corresponding to the first medium parameter with the size of the custom medium corresponding to the second medium parameter. This reduces the error rate of the image forming device to a certain extent, improving the user experience.

[0080] In one possible implementation, the first medium parameter includes the width and length of a predefined medium, and the second medium parameter includes the width and length of a custom medium. Specifically, a determination is made as to whether the first medium parameter and the second medium parameter satisfy a second determination condition. If the first medium parameter and the second medium parameter do not satisfy the second determination condition, the first medium parameter in the grating data is corrected according to the second medium parameter so that the corrected first medium parameter and the second medium parameter satisfy the second determination condition. The second determination condition indicates that the width of the predefined medium corresponding to the first medium parameter is the same as the width of the custom medium corresponding to the second medium parameter, and that the length of the predefined medium corresponding to the first medium parameter is the same as the length of the custom medium corresponding to the second medium parameter.

[0081] For example, the width and length of the predefined medium corresponding to the first medium parameters are 21 cm × 29.7 cm. Specifically, when the width and length of the custom medium corresponding to the second medium parameters are 29.7 cm × 21 cm, since 21 cm ≠ 29.7 cm and 29.7 cm ≠ 21 cm, the width of the predefined medium corresponding to the first medium parameters is not equal to the width of the custom medium corresponding to the second medium parameters, and the length of the predefined medium corresponding to the first medium parameters is not equal to the length of the custom medium corresponding to the second medium parameters. The first medium parameters in the raster data are corrected according to the second medium parameters, so that the width and length corresponding to the corrected first medium parameters are 29.7 cm × 21 cm. Similarly, when the width and length of the custom medium corresponding to the second medium parameter are 20cm×29cm, since 21cm≠20cm and 29.7cm≠29cm, that is, the width of the predefined medium corresponding to the first medium parameter is not equal to the width of the custom medium corresponding to the second medium parameter, and the length of the predefined medium corresponding to the first medium parameter is not equal to the length of the custom medium corresponding to the second medium parameter; the first medium parameter in the grating data is corrected according to the second medium parameter, so that the width and length corresponding to the corrected first medium parameter are 29.7cm×21cm.

[0082] In this embodiment of the present application, by determining whether the first and second medium parameters satisfy a second determination condition, if the first and second medium parameters do not satisfy the second determination condition, the first medium parameters in the raster data are corrected according to the second medium parameters. It can be understood that by comparing whether the width of the predefined medium corresponding to the first medium parameter matches the width of the custom medium corresponding to the second medium parameter, and whether the length of the predefined medium corresponding to the first medium parameter matches the length of the custom medium corresponding to the second medium parameter, the error rate of the image forming device is reduced to a certain extent, improving the user experience.

[0083] Step S204: Sending the corrected raster data to the image forming device.

[0084] In an embodiment of the present application, a driver of the terminal device sends the corrected raster data to the image forming apparatus, so that the image forming apparatus performs an image forming operation according to the corrected raster data.

[0085] In an embodiment of the present application, the first medium parameter is compared with the second medium parameter to determine whether the first medium parameter in the determined grating data matches the second medium parameter; when the first medium parameter does not match the second medium parameter, the second medium parameter is used to correct the first medium parameter, so that the medium size corresponding to the grating data received by the image forming device is the same as the custom media size set by the user on the image forming device, thereby reducing the error rate of the image forming device and improving the user experience.

[0086] In a possible implementation, when the first medium parameter and the second medium parameter satisfy a first judgment condition, raster data is sent to the image forming device, so that the image forming device performs an image forming operation according to the raster data.

[0087] In the embodiment of the present application, when the first medium parameter and the second medium parameter meet the first judgment condition, the first medium parameter of the grating data does not need to be modified. Instead, the grating data is directly sent to the image forming device, causing the image forming device to perform an image formation operation based on the grating data. It can be understood that when the first medium parameter and the second medium parameter meet the first judgment condition, directly sending the grating data to the image forming device improves the intelligence level of the terminal device to a certain extent.

[0088] In actual applications, when the first and second media parameters are used to characterize the size of the image forming medium, the image forming media may be the same size but different in shape. For example, when the image forming medium is rectangular, due to the horizontal placement of the image forming medium, the first media parameter in the raster data determined by the universal printing system set up by the terminal device may be in the opposite direction to the second media parameter entered by the user. For example, the second media parameter entered by the user is 29.7cm×21cm, but the universal printing system set up by the terminal device will convert the second media parameter entered by the user into the first media parameter in the raster data, i.e., 21cm×29.7cm, causing the image forming device to report an error.

[0089] To address the above issue, in one possible implementation, a determination is made as to whether the first and second media parameters satisfy a third judgment condition. If the first and second media parameters do not satisfy the third judgment condition, the values ​​corresponding to the width and length in the first media parameters are swapped so that the revised first and second media parameters satisfy the third judgment condition. The third judgment condition indicates that the width of the predefined medium is greater than the length and the width of the custom medium is greater than the length, or that the width of the predefined medium is less than the length and the width of the custom medium is less than the length, or that the width of the predefined medium is equal to the length and the width of the custom medium is equal to the length. It is understood that the third judgment condition indicates that the relationship between the width and length in the first media parameter is the same as the relationship between the width and length in the second media parameter.

[0090] For example, the width and length of the predefined medium corresponding to the first media parameter are 21 cm × 29.7 cm. When the width and length of the custom medium corresponding to the second media parameter are 29.7 cm × 21 cm, since the width of the predefined medium corresponding to the first media parameter is smaller than the length, and the width of the custom medium corresponding to the second media parameter is larger than the length, the first and second media parameters do not meet the third judgment condition. By swapping the values ​​corresponding to the width and length in the first media parameter, the width and length of the predefined medium corresponding to the modified first media parameter are now 29.7 cm × 21 cm. At this point, the modified first and second media parameters meet the third judgment condition.

[0091] Of course, in one possible implementation, it is possible to first determine whether there is an error in the size of the image forming medium corresponding to the first medium parameter and the second medium parameter, that is, whether the second judgment condition is satisfied. When the first medium parameter or the corrected first medium parameter is the same as the size of the image forming medium corresponding to the second medium parameter, it is then determined whether the first medium parameter and the second medium parameter satisfy the third judgment condition, that is, whether the image forming medium is placed horizontally.

[0092] For example, the width and length of the predefined medium corresponding to the first medium parameters are 21 cm × 29.7 cm. Specifically, when the width and length of the custom medium corresponding to the second medium parameters are 29.7 cm × 21 cm, the first and second medium parameters satisfy the second judgment condition. Next, a determination is made as to whether the first and second medium parameters satisfy the third judgment condition. In this case, because the width of the predefined medium corresponding to the first medium parameters is smaller than the length, and the width of the custom medium corresponding to the second medium parameters is larger than the length, the first and second medium parameters do not satisfy the third judgment condition. The first medium parameters in the grating data are corrected according to the second medium parameters, so that the width and length corresponding to the corrected first medium parameters are 29.7 cm × 21 cm.

[0093] In this embodiment of the present application, the first and second medium parameters are compared to determine whether they meet a third judgment condition, thereby determining whether the image forming medium is positioned horizontally. It is understood that when the first and second medium parameters do not meet the third judgment condition, i.e., when the image forming medium is positioned horizontally, the first medium parameters are modified accordingly, and the data representing the image to be printed in the raster data is also modified. This modified data is used to represent the image data to be printed after the corresponding values ​​of the width and length in the first medium parameters are swapped. This prevents the image forming device from reporting an error, while enabling the printing of a complete image and improving the user experience.

[0094] It can be understood that the image data to be printed after the corresponding values ​​of the width and length in the first medium parameter are exchanged is image data that matches the width and length of the custom medium in the above embodiment.

[0095] For ease of understanding, the image forming method for customizing the medium size provided by the embodiment of the present application is described in detail below in conjunction with a specific implementation method.

[0096] See also Figure 3 , is a flow chart of another method for forming an image of a custom medium size provided in an embodiment of the present application. This method can be applied to Figure 1 The application scenarios shown are as follows: Figure 3 As shown, it mainly includes the following steps.

[0097] Step S301: According to the raster data determined by the universal printing system, the driver of the terminal device obtains the first medium parameter in the raster data.

[0098] Step S302: The terminal device driver compares the first media parameter with the second media parameter to determine whether the first and second media parameters meet a second determination condition. If the first and second media parameters meet the second determination condition, step S304 is executed. If the first and second media parameters do not meet the second determination condition, step S303 is executed.

[0099] Step S303: The driver of the terminal device corrects the first medium parameter in the raster data according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter meet the second judgment condition.

[0100] Step S304: The driver of the terminal device determines whether the first medium parameter and the second medium parameter meet the third judgment condition. When the first medium parameter and the second medium parameter meet the third judgment condition, step S306 is executed; when the first medium parameter and the second medium parameter do not meet the third judgment condition, step S305 is executed.

[0101] Step S305: The driver of the terminal device corrects the first medium parameter in the raster data according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter meet the third judgment condition, and at the same time corrects the data used to represent the image to be printed in the raster data, so that the corrected data is used to represent the image data to be printed after the corresponding values ​​of the width and length in the first medium parameter are interchanged.

[0102] Step S306: The driver of the terminal device sends the corrected raster data to the image forming apparatus, so that the image forming apparatus performs an image forming operation according to the raster data.

[0103] Corresponding to the above-mentioned embodiment, the present application also provides a terminal device. The terminal device includes a first medium parameter acquisition module, a comparison module, a grating data correction module, and a grating data sending module. Specifically, the first medium parameter acquisition module is used to obtain the first medium parameter in the grating data based on the grating data determined by the universal printing system; the comparison module is used to compare the first medium parameter with the second medium parameter to determine whether the first medium parameter and the second medium parameter match; the grating data correction module is used to correct the first medium parameter in the grating data according to the second medium parameter when the first medium parameter and the second medium parameter do not match; the grating data sending module is used to send the corrected grating data to the image forming device, so that the image forming device performs an image forming operation according to the corrected grating data.

[0104] The specific contents involved in the embodiments of this application can be found in the description of the above method embodiments. For the sake of brevity, they will not be repeated here.

[0105] Corresponding to the above embodiments, the present application also provides an electronic device.

[0106] See also Figure 4 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 400 may include: a processor 401, a memory 402, and a communication unit 403. These components communicate via one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It can be a bus structure or a star structure, and can also include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0107] The communication unit 403 is configured to establish a communication channel so that the electronic device can communicate with other devices and receive user data sent by other devices or send user data to other devices.

[0108] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs, instructions, and / or modules stored in the memory 402, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 401 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0109] The memory 402 is used to store execution instructions of the processor 401. The memory 402 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0110] When the execution instructions in the memory 402 are executed by the processor 401, the electronic device 400 can execute Figure 1 Some or all of the steps in the illustrated embodiments.

[0111] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program that, when executed, may include some or all of the steps of each embodiment of the simulation scenario generation method provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0112] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0113] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0114] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0115] In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the part that contributes to the existing technology, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this application. 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 code.

[0116] In this specification, reference can be made to the same or similar parts between the various embodiments. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A method for forming an image of a custom medium, executed in a driver of a terminal device, wherein the terminal device is also provided with a universal printing system, characterized in that: The method comprises: Acquire, according to the raster data determined by the universal printing system, a first medium parameter in the raster data, wherein the first medium parameter is used to characterize a predefined medium pre-stored in the universal printing system; Comparing the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter, wherein the second medium parameter is used to characterize the user-defined medium; When the first medium parameter does not match the second medium parameter, correcting the first medium parameter in the grating data according to the second medium parameter; sending the corrected raster data to an image forming device so that the image forming device performs an image forming operation according to the corrected raster data; The first medium parameter includes a width and a length of the predefined medium, and the second medium parameter includes a width and a length of the custom medium.

2. The method according to claim 1, characterized in that The determining whether the first medium parameter matches the second medium parameter includes: It is determined whether the first medium parameter and the second medium parameter satisfy a first determination condition, wherein the first determination condition is used to indicate that a size of the predefined medium corresponding to the first medium parameter is the same as a size of the custom medium corresponding to the second medium parameter.

3. The method according to claim 2, characterized in that When the first medium parameter does not match the second medium parameter, the first medium parameter in the grating data is corrected according to the second medium parameter, including: when the first medium parameter and the second medium parameter do not meet the first judgment condition, the first medium parameter in the grating data is corrected according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter meet the first judgment condition.

4. The method according to claim 3, characterized in that Also includes: When the first medium parameter and the second medium parameter satisfy the first judgment condition, the raster data is sent to the image forming device so that the image forming device performs an image forming job according to the raster data.

5. The method according to claim 1, characterized in that: The determining whether the first medium parameter matches the second medium parameter includes: determining whether the first medium parameter and the second medium parameter satisfy a second determination condition, wherein the second determination condition is used to indicate that the width of the predefined medium corresponding to the first medium parameter is the same as the width of the custom medium corresponding to the second medium parameter, and the length of the predefined medium corresponding to the first medium parameter is the same as the length of the custom medium corresponding to the second medium parameter; When the first medium parameter does not match the second medium parameter, correcting the first medium parameter in the grating data according to the second medium parameter includes: when the first medium parameter and the second medium parameter do not satisfy a second judgment condition, correcting the first medium parameter in the grating data according to the second medium parameter, so that the corrected first medium parameter and the second medium parameter satisfy the second judgment condition.

6. The method according to claim 1, characterized in that The determining whether the first medium parameter matches the second medium parameter includes: determining whether the first medium parameter and the second medium parameter satisfy a third determination condition, wherein the third determination condition is used to indicate that the width of the predefined medium is greater than the length and the width of the custom medium is greater than the length, or the width of the predefined medium is less than the length and the width of the custom medium is less than the length, or the width of the predefined medium is equal to the length and the width of the custom medium is equal to the length; When the first medium parameter does not match the second medium parameter, the first medium parameter in the grating data is corrected according to the second medium parameter, including: when the first medium parameter and the second medium parameter do not meet the third judgment condition, the values ​​corresponding to the width and the length in the first medium parameter are exchanged, so that the corrected first medium parameter and the second medium parameter meet the third judgment condition; The corrected grating data is sent to the image forming device so that the image forming device performs an image forming operation according to the corrected grating data; wherein the corrected grating data is used to represent data of an image to be printed, and is corrected so that the corresponding values ​​of width and length in the first medium parameter are interchanged.

7. A terminal device, characterized in that: include: A first medium parameter acquisition module, configured to acquire a first medium parameter in the raster data according to the raster data determined by the universal printing system, wherein the first medium parameter is used to characterize a predefined medium pre-stored in the universal printing system; A comparison module, used for comparing the first medium parameter with the second medium parameter to determine whether the first medium parameter matches the second medium parameter, wherein the second medium parameter is used to characterize a user-defined medium; A grating data correction module, used for correcting the first medium parameter in the grating data according to the second medium parameter when the first medium parameter does not match the second medium parameter; A raster data sending module, used for sending the corrected raster data to the image forming device, so that the image forming device performs an image forming operation according to the corrected raster data; The first medium parameter includes a width and a length of the predefined medium, and the second medium parameter includes a width and a length of the custom medium.

8. An electronic device, characterized in that: include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, and when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Printing method, storage medium and image forming device

    CN115967773A