CN-115202597-B - Print preview method, device, equipment and storage medium
Abstract
The embodiment of the invention provides a print preview method, a device, equipment and a storage medium, wherein the method comprises the following steps of establishing communication connection with a printer; when a print preview instruction is received, acquiring to-be-printed content and state parameters returned by a sensor, wherein the state parameters comprise the real-time state of a printer and related parameters affecting the print preview, performing print pretreatment on the to-be-printed content based on the state parameters and generating a print preview page, and displaying the print preview page for a user to check a print effect. The invention can preview the real-time state of the printer and the influence of relevant parameters influencing the printing preview on the printing effect, thereby obtaining the expected printing effect according to the checking of the printing preview page.
Inventors
- Request for anonymity
Assignees
- 厦门汉印电子技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20200624
Claims (9)
- 1. A print preview method applied to a print preview apparatus, comprising the steps of: Establishing a communication connection with a printer; When receiving a print preview instruction, acquiring to-be-printed content and state parameters returned by a sensor, wherein the state parameters comprise the real-time state of a printer and related parameters affecting the print preview; The method comprises the steps of carrying out printing pretreatment on the content to be printed based on the state parameters and generating a printing preview page, wherein the state parameters comprise the working states of heating points on a printing head, and concretely comprise the steps of obtaining the working states of each heating point on the printing head, judging whether the heating point in a fault state exists, if so, obtaining a column corresponding to the heating point in the fault state, and rendering the corresponding column of the printing preview page to generate a white line, and if not, normally displaying the content to be printed on the printing preview page; The method comprises the steps of displaying the print preview page for a user to view the printing effect, wherein the printer is connected with the print preview device and obtains state parameters of the print preview device, wherein the step of obtaining the brightness of the print preview device or a screen provider and adjusting an original image aiming at the current brightness and the color development of the provider is carried out, so that the preview result presented by the print preview page is close to the real printing effect.
- 2. The print preview method according to claim 1, wherein the status parameter includes a consumable supply margin, and wherein the print pre-processing is performed on the content to be printed based on the status parameter and a print preview page is generated, specifically comprising: judging the required consumable amount according to the content to be printed; Judging whether the consumable allowance is larger than the required consumable amount or not; if yes, the content to be printed is displayed completely on the print preview page; if not, displaying part of the content to be printed on the printing preview page according to the ratio of the consumable allowance to the required consumable amount.
- 3. The print preview method according to claim 1, wherein the status parameter includes a current temperature of a printhead, and wherein the print pre-processing is performed on the content to be printed based on the status parameter and generating a print preview page comprises: acquiring a temperature range of the printing head during normal operation; judging whether the current temperature of the printing head is in the temperature range or not; if yes, displaying the content to be printed on the print preview page in normal concentration; if not, determining the concentration to be displayed according to the difference value between the current temperature and the temperature range, and displaying the content to be printed on the printing preview page according to the concentration to be displayed.
- 4. The print preview method according to claim 1, wherein the status parameter includes a defect condition of a paper, and wherein the print preprocessing is performed on the content to be printed based on the status parameter, and a print preview page is generated, specifically comprising: acquiring a scanning image of a sheet to be printed; judging whether the paper is defective or not according to the scanned image; if yes, displaying a defect part in the scanned image on the print preview page, and displaying the content to be printed according to the defect part; And if not, completely displaying the content to be printed on the print preview page.
- 5. The print preview method according to claim 1, further comprising: and when judging that the printing preview page is abnormal, displaying printing abnormal prompt information on the printing preview page.
- 6. The print preview method according to claim 1, further comprising: Acquiring key information to be displayed in a floating way; generating a floating window containing the key information based on the state parameter; and displaying the floating window on the printing preview page.
- 7. A print preview apparatus applied to a print preview device, comprising: a communication connection establishment unit configured to establish a communication connection with a printer; The data acquisition unit is used for acquiring the content to be printed and the state parameters returned by the sensor when receiving the instruction of the print preview, wherein the state parameters comprise the real-time state of the printer and the related parameters affecting the print preview; the print preview page generating unit is used for carrying out print preprocessing on the content to be printed based on the state parameter and generating a print preview page; the printing preview page generation unit is specifically used for acquiring the working state of each heating point on the printing head, judging whether the heating point in a fault state exists or not, acquiring a column corresponding to the heating point in the fault state and rendering the corresponding column of the printing preview page to generate a white line if the heating point in the fault state exists, and normally displaying the content to be printed on the printing preview page if the heating point in the fault state exists; The printer is connected with the printing preview equipment and acquires state parameters of the printing preview equipment, wherein the acquisition of the brightness of the printing preview equipment or the screen provider is realized, and the original image is adjusted according to the current brightness and the color development of the provider, so that the preview result presented by the printing preview page is close to the real printing effect.
- 8. A print abnormality preview apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the print preview method of any of claims 1-7 when executing the program.
- 9. A computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the print preview method of any of claims 1-7.
Description
Print preview method, device, equipment and storage medium (The application is a divisional application for 202010585813.7 a print preview method, device, equipment and storage medium) Technical Field The present invention relates to the technical field of printed image display, and in particular, to a print preview method, apparatus, device and storage medium. Background Printers are widely available in life and can be largely classified into needle type, ink jet type, laser type, thermal transfer type, and the like. Whichever printer faces the challenge of whether the print effect meets the user's print effect expectations. The common print preview is only to generate print data for a print file in an upper computer (a computer or a mobile phone) and then send the print data to a printer for direct printing, and only the typesetting of the print page can be prejudged. In the prior art, the influence of the real-time state, configuration parameters and the like of the printer on printing is not predicted before printing, whether the printing effect can meet the expectations of the user cannot be predicted, and the real printing effect can only be obtained through the printer or a printed sample after the printing task is issued, or the problem of the printer is presumed. Disclosure of Invention Accordingly, an objective of the embodiments of the present invention is to provide a print preview method, apparatus, device and storage medium for previewing print results according to status parameters returned by a sensor. The embodiment of the invention provides a print preview method, which comprises the following steps: Establishing a communication connection with a printer; When receiving a print preview instruction, acquiring to-be-printed content and state parameters returned by a sensor, wherein the state parameters comprise the real-time state of a printer and related parameters affecting the print preview; Performing printing pretreatment on the content to be printed based on the state parameter, and generating a printing preview page; And displaying the print preview page so as to enable a user to view the printing effect. Preferably, the status parameter comprises consumable allowance, and the printing pretreatment is performed on the content to be printed based on the status parameter, and a printing preview page is generated, which specifically comprises the following steps: judging the required consumable amount according to the content to be printed; Judging whether the consumable allowance is larger than the required consumable amount or not; if yes, the content to be printed is displayed on the print preview page completely; if not, displaying part of the content to be printed on the print preview page according to the ratio of the consumable allowance to the required consumable amount. Preferably, the status parameter comprises the current temperature of the printing head, and the printing pretreatment is carried out on the content to be printed based on the status parameter, and a printing preview page is generated, which comprises the following steps: acquiring a temperature range of the printing head during normal operation; judging whether the current temperature of the printing head is in the temperature range or not; if yes, displaying the content to be printed on the print preview page in normal concentration; if not, determining the concentration to be displayed according to the difference value between the current temperature and the temperature range, and displaying the content to be printed on the printing preview page according to the concentration to be displayed. Preferably, the status parameter includes a working status of a heating point on the printing head, and the printing pretreatment is performed on the content to be printed based on the status parameter, and a printing preview page is generated, which specifically includes: acquiring the working state of each heating point on the printing head; judging whether a heating point in a fault state exists or not; If yes, acquiring a column corresponding to the heating point in the fault state, and rendering the corresponding column of the print preview page to generate a white line; if not, the content to be printed is displayed normally on the print preview page. Preferably, the status parameter includes a defect condition of paper, and the print preprocessing is performed on the content to be printed based on the status parameter, and a print preview page is generated, which specifically includes: acquiring a scanned image of a sheet to be printed; Judging whether the paper is defective or not according to the scanned image; If yes, displaying a defect part in the scanned image on the print preview page, and displaying the content to be printed according to the defect part; And if not, completely displaying the content to be printed on the print preview page. Preferably, the method further comprises: when judging that the prin