CN-121996178-A - Label editing and printing method and system based on physical resolution of printer
Abstract
The invention relates to a label editing printing system based on physical resolution of a printer, which comprises the following steps of establishing a conversion relation between an editing unit and printing points according to physical resolution parameters of a target printer, establishing a label template, configuring an object to form a layer, selecting the object to be added to the label template, editing the object, establishing a printing task, mapping the label template completed by the configuring object into a printing instruction based on the conversion relation, executing the printing task, and executing the printing task, wherein the process of executing the printing task comprises the steps of executing the printing instruction by the target printer, realizing collaborative work among label design, printing output and detection verification, and ensuring consistency and reliability of labels in the processes of multiple editing, printing and detection.
Inventors
- LIN YUHAN
- LIN LIANGYU
- WANG MEIQI
Assignees
- 上海亚佩贸易有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260127
Claims (10)
- 1. The label editing and printing method based on the physical resolution of the printer is characterized by comprising the following steps of: Establishing a conversion relation between an editing unit and a printing point according to the physical resolution parameter of the target printer; the method for configuring the object comprises the steps of selecting the object to be added to the label template, and editing the object; The process of establishing the print job comprises the steps of mapping a label template completed by a configuration object into a print instruction based on a conversion relation; Executing the print task, wherein the process of executing the print task comprises the step of executing a print instruction by the target printer.
- 2. The label editing printing system of claim 1, wherein the process of creating the print job further comprises generating a reference image based on the same label template, the executing the print job further comprising: the visual acquisition equipment acquires a scanned image of the printed label; aligning the scanned image with the reference image and comparing the differences, wherein the process of aligning the scanned image with the reference image comprises obtaining a homography matrix based on characteristic point matching and performing perspective transformation and/or affine fine tuning, Unifying the brightness of the scanned image and the reference image, performing difference, thresholding, morphological denoising, connected domain analysis and contour analysis in a jet printing region mask of the reference image, extracting a defect region, and generating a comparison result according to the area, the number and the category of the defect region; And the audible and visual alarm equipment outputs alarm information according to the judging result.
- 3. The label editing and printing method based on printer physical resolution of claim 1, wherein the selecting object is added to the label template to generate anchor point, the method for editing the object comprises: Adding object content, setting the length and width of an object, and setting the position of an anchor point on a label template; Stepwise scaling the barcode object; Importing Excel batch to replace fields of text objects.
- 4. The method for editing and printing a label based on the physical resolution of a printer according to claim 1, wherein the method for creating the label template comprises opening the stored label template or creating a new label template or importing a printing order.
- 5. The method for editing and printing labels based on physical resolution of printer according to claim 1, wherein the text object comprises a time field, and the method for editing the text object comprises setting the content of the time field to be automatically generated according to the current time or the printing time or a preset rule.
- 6. A label editing printing system based on printer physical resolution as in claim 1, wherein the process of establishing a print job further comprises setting a trigger time or time window.
- 7. A label editing and printing system based on printer physical resolution is characterized by comprising A physical resolution conversion module for establishing a conversion relationship between the editing unit and the printing point; an edit constraint module for applying a print physical constraint to an object; The object management module is used for managing objects such as characters, graphics, bar codes and the like; a print instruction generation module for mapping the label template into a print instruction based on the conversion relation; a print job scheduling module for distributing print jobs to print control modules of the target printers; and the printing control module is used for controlling the target printer to execute the printing instruction.
- 8. The label editing and printing system based on printer physical resolution of claim 7, further comprising a print instruction parsing module for performing structural parsing of print instructions and reconstructing a label template based on the scaling relationship.
- 9. A label editing printing system based on printer physical resolution as in claim 7, further comprising An image output module for generating a reference image based on the tag template; The image acquisition module is used for acquiring the printed label to generate a scanning image; a visual alignment module for aligning the scanned image with the reference image and for comparing the differences.
- 10. A label editing printing system based on printer physical resolution as in claim 9, wherein the print control module comprises A print communication unit for transmitting a print instruction to a printer and receiving the callback data; the state analysis and flow linkage unit is used for analyzing the state signals in the return data stream and driving the scanning control module; The scanning control unit is used for starting and stopping the image acquisition module and maintaining a scanning state file and a session directory; the scanning splicing unit is used for reading the multi-frame images in the session directory and splicing the multi-frame images to generate scanning images; and the alarm linkage unit is used for controlling the audible and visual alarm equipment.
Description
Label editing and printing method and system based on physical resolution of printer Technical Field The invention relates to a label editing and printing system based on printer physical resolution. Background The label is used as an important carrier for industrial production, logistics management and product tracing, is widely applied to the fields of manufacturing, storage, medical treatment, retail and the like, and the existing label editing and printing software generally constructs a label template in a screen pixel or assembly mode and performs adaptive output through driving or instructions in a printing stage. However, the printer has a fixed physical resolution in the actual working process, and the printing instructions thereof all show discretization characteristics in terms of position, size, bar code magnification and the like. Because the existing software does not introduce the physical resolution constraint of the printer in the editing stage, the problems of size deviation, position drift and accuracy degradation after multiple exports and imports exist between the display effect of the editing interface and the actual printing result. In addition, along with the improvement of the industrial automation level, the labels are not only used for printing output, but also gradually participate in links such as printing quality detection, visual comparison and production takt control, and the like, the conventional scheme generally lacks systematic support for printing task scheduling, printing image output and collaborative work with a visual detection system, and is difficult to meet the industrial application requirements of high consistency and high reliability. Disclosure of Invention In view of the technical problems existing in the background art, the invention aims to provide a label editing and printing method and system based on physical resolution of a printer, so that labels are constrained by the physical resolution of the printer in an editing stage. The label editing and printing method based on the physical resolution of the printer comprises the following steps of establishing a conversion relation between an editing unit and printing points according to physical resolution parameters of a target printer, establishing a label template, configuring an object to form a layer, selecting the object to be added to the label template, editing the object, establishing a printing task, mapping the label template completed by the configuring object into a printing instruction based on the conversion relation, executing the printing task, and executing the printing task, wherein the target printer executes the printing instruction. In the scheme, one object corresponds to one layer, typesetting is convenient, the complex label template is subjected to layered controllable editing, a printing instruction is generated based on a conversion relation, the position, the size and the morphological parameters of the object are integer multiples of printing points, an intermediate state which cannot be expressed by a printer is not generated, and the consistency of the position and the size of the object in an editing stage and a printing output stage is ensured. Preferably, the process of establishing the print job further comprises generating a reference image based on the same label template, the process of executing the print job further comprises the steps of acquiring a scanned image of the printed label by a vision acquisition device, aligning and comparing the scanned image with the reference image, aligning the scanned image with the reference image, wherein the process of aligning the scanned image with the reference image comprises the steps of acquiring a homography matrix based on feature point matching, performing perspective transformation and/or affine fine tuning, comparing the scanned image with the reference image, wherein the process of aligning the scanned image with the reference image comprises the steps of unifying the brightness of the scanned image with the reference image, performing difference, thresholding, morphological denoising, connected domain analysis and contour analysis in a jet printing region mask of the reference image, extracting a defect region, generating a comparison result according to the area, the number and the category of the defect region, and outputting alarm information according to a judgment result by an audible-visual alarm device. In the scheme, through alignment, brightness normalization and jet printing area shielding, false alarm caused by illumination change and slight displacement is reduced, the printing result is confirmed, and the subsequent printing quality is ensured. Preferably, the method for selecting the object and generating the anchor point by adding the object to the label template and editing the object comprises the steps of adding the object content, setting the length and the width of the object, setting the position