A label printing method
Through sensor detection and software algorithm optimization, the mobile label printing device has achieved precise backtracking of the printing start position and dynamic adjustment of the paper stop position, solving the problems of printing offset and paper jam caused by insufficient hardware precision, and improving the stability of the device and the compatibility of consumables.
Patent Information
- Application Number
- CN202610292530.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-11
- Publication Date
- 2026-11-20
AI Technical Summary
Mobile label printing devices, with their limited hardware precision and poor consumable compatibility, struggle to accurately trace back the printing start position and dynamically optimize the paper stop and tear positions, leading to content misalignment, label waste, and paper jams.
Sensors are used to detect the paper position, and software algorithms are used to control the paper feeder to move the gap position of the label paper to the tearer. When a new printing task is started, the label starting position is adjusted to the print head. Photoelectric sensors identify the thickness of the face paper and the backing paper to optimize the printing and tearing positions.
It enables each print to start precisely from the beginning of the label and stops the paper precisely at the edge of the paper tearer, avoiding content offset and label waste, and improving the stability and compatibility of the printing equipment.
Abstract
Description
Technical Field
[0001] This invention relates to the field of label printer technology, and in particular to a label printing method. Background Technology
[0002] In the field of mobile label printing technology, due to the multi-layered composite structure of label paper consisting of face stock, adhesive, and backing paper, and the fixed spacing between labels, the precise positioning of the printing start position and the accurate control of the tearing position have significantly higher technical requirements than ordinary thermal printing. Traditional label printers typically rely on precision mechanical structures to ensure that the print head is aligned with the starting end of the label, and the paper feeder transports the printed label to the edge of the serrated tearer for tearing. However, due to the cost, size, and power consumption constraints of mobile printing devices, the hardware structure often cannot achieve the assembly precision of industrial-grade printers, causing the printed content to easily deviate from the label's starting position, resulting in content truncation, uneven spacing, or even label waste. A more prominent technical bottleneck is that after the print head finishes printing the last line and the paper feeder stops, the label paper often remains in the face stock coverage area. The tearer position corresponds precisely to the label face stock and adhesive layer. Directly tearing the paper at this point not only requires greater tearing force due to the tight bond between the face stock and backing paper, but also leaves adhesive residue on the serrated surface of the tearer. Over long-term operation, adhesive accumulation will seriously interfere with paper feeding smoothness and may even cause paper jams. More importantly, label papers from different manufacturers and batches exhibit significant differences in physical parameters such as face stock thickness, backing paper weight, and adhesive light transmittance. Individual variations in the force and direction of the tearing action by users often lead to uncontrollable shifts in the initial position of the next label. Traditional printers typically begin feeding paper immediately upon receiving a new print job, failing to detect the actual position of the paper head relative to the print head, further exacerbating the problem of print start position deviation. Therefore, existing mobile label printing devices, constrained by limited hardware precision, poor consumable compatibility, and the lack of a closed-loop position correction mechanism, struggle to consistently achieve the technical goal of starting each print job from the label's initial position and precisely positioning the label gap at the tearer's blade edge with each paper stop. Thus, achieving accurate backtracking of the print start position and dynamic optimization of the paper stop and tearing position without significantly increasing hardware costs and structural complexity is a problem that needs to be solved in this field. Summary of the Invention
[0003] In view of the above problems, the present invention is proposed to provide a label printing method that overcomes or at least partially solves the above problems.
[0004] This invention discloses a label printing method applied to a label printer, the label printer including a printhead, a paper feeder, a paper tearer, and a sensor for detecting the paper position, the method comprising: Get the content to be printed; Determine the printing data based on the content to be printed; After the printing operation is completed, based on the paper position information detected by the sensor and the paper stop position information determined by the printing data, the paper feeder is controlled to move the gap position of the label paper to the paper tearer. In response to a new printing task, based on the current paper position information detected by the sensor, the paper feeder is controlled to move the starting position of the next label to the print head.
[0005] Optionally, determining the print data based on the content to be printed includes: The number of characters, font size, and line breaks in the content to be printed are analyzed, and the total number of lines required to print the content is calculated. Based on the total number of printed lines and the number of printable lines per label, the actual number of printed lines for the last label is determined, and paper stop position information indicating the expected termination position of the print head within the label area is generated based on the actual number of printed lines for the last label.
[0006] Optionally, after the printing operation is completed, controlling the paper feeder to move the gap position of the label paper to the tearer based on the paper position information detected by the sensor and the paper stop position information determined by the printing data includes: The sensor acquires a detection signal reflecting the paper thickness in real time after the printing operation is completed; Based on the abrupt change in the detection signal from the thickness of the face stock to the thickness of the backing paper, the gap position of the label paper is identified; Based on the paper stop position information, determine the target gap position that needs to be moved to the paper tearer; Based on the relative distance between the target gap position and the current paper position, the paper feeder is controlled to feed paper in the forward direction until the target gap position reaches the paper tearer.
[0007] Optionally, in response to a new printing task, controlling the paper feeder to move the starting position of the next label to the print head based on the current paper position information detected by the sensor includes: The sensor acquires a detection signal reflecting the paper thickness in real time when it receives the new printing task; Based on the abrupt change in the thickness of the base paper to the thickness of the face paper in the detection signal, the starting boundary of the next label is identified; Based on the offset distance between the starting boundary and the current paper position, the paper feeder is controlled to roll back in the opposite direction so that the starting boundary is aligned with the print head.
[0008] Optionally, the sensor is a photoelectric sensor, and the method further includes: The sensor is controlled to emit light toward the label paper and to receive photoelectric signals reflected or transmitted through the paper. A thickness characterization value reflecting the paper thickness is generated based on the intensity of the photoelectric signal; The changes in the thickness characterization value are used to identify the face material area, the backing material area, and the thickness abrupt boundary between the face material and the backing material of the label paper.
[0009] Optionally, the method further includes: Simulation tests were performed in advance for various types of label paper to obtain the sensor baseline detection values in the surface area and gap area of each type of label paper, as well as the specification information of each type of label paper; The sensor baseline detection values of each label paper in the surface area and gap area are associated and stored with the label paper specification information to form a paper feature library. During the printing operation, the paper feature library is matched with the real-time sensor detection values, and the specification information of the currently used label paper is retrieved to calculate the paper position.
[0010] Optionally, the method further includes: When a new print job is received, the content to be printed in the new print job is compared with the content to be printed in the previous print job. If the content to be printed in the two print jobs differs in the number of characters, font size, and line breaks, the print data is re-determined based on the content to be printed in the new print job, and the paper stop position information and the rollback operation before printing are adjusted based on the re-determined print data.
[0011] This invention has the following advantages: The label printing method of this invention acquires the content to be printed, determines printing data based on the content, and after the printing operation is completed, controls the paper feeder to move the gap position of the label paper to the tearer based on the paper position information detected by the sensor and the paper stop position information determined by the printing data. In response to a new printing task, the paper feeder is controlled to move the starting position of the next label to the print head based on the current paper position information detected by the sensor. This invention can accurately start printing at the beginning position of each label and stop at the serrated cutter. It achieves both accurate printing position and easy paper tearing. It solves the problem of insufficient hardware and structural precision, and with the support of software algorithms, ensures that each print job starts precisely at the beginning of the paper and feeds the paper to the tearer position after printing. Detailed Implementation
[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in further detail below.
[0013] 1. Adapted to new label paper: Label paper consists of a face stock, adhesive, and a backing paper. The face stock and adhesive combine to form a tear-off label that is attached to the backing paper, with a certain gap between the labels. The thickness of the face stock and backing paper varies for each type of label paper, as does the spacing between the labels. This means that the printer needs to adapt to each type of paper, learning the thickness of the face stock and backing paper. This is achieved by using a sensor to emit a beam of light onto the paper and analyzing the intensity of the reflected light to determine the label paper's thickness.
[0014] Different surface materials are identified by utilizing their varying light transmittance. Initially, different types of paper are used for testing and simulation, allowing the sensor to record and store the relevant paper data.
[0015] A photosensitive sensor itself cannot directly measure the thickness of paper, but it can estimate or calculate the thickness of paper through indirect methods combined with mechanical structures or optical principles. The method for learning and verifying this invention is as follows: Place the label paper on a flat reference platform, use a photosensitive sensor to measure the distance D1 from the sensor to the upper surface of the label paper (read the light brightness sensing register of the photosensitive sensor, and then calculate the approximate distance through internal conversion), and then measure the distance D2 between the label and the gap between the labels.
[0016] Thickness estimation: Thickness = D1 D2 2. Main components: (1) Print head: The printhead is the part of the printer that actually contacts the paper; it is usually located inside the printer.
[0017] (2) Paper tearer: A paper tearer is a strip of metal with serrated edges, used to quickly and neatly tear off a label.
[0018] (3) Paper feeder: The function of the paper feeder is to slowly convey a roll of label paper to the tearer at a certain speed.
[0019] 3. Implementation of the paper-stopping mechanism algorithm There is a certain distance between the printhead and the tearer. When the printer is printing a roll of label paper, the printhead finishes printing the last line of text, and the paper feed stops. However, at this point, the printed label paper is not fully exposed on the printer surface. The tearer is located at the current label paper face material position. If the paper is torn directly, it will cause a problem: the face material and adhesive are thick, increasing the difficulty of tearing, and adhesive residue is easily left on the tearer, causing paper jams in subsequent printing. Therefore, it is necessary to develop a mechanism so that after each printing, the paper feed stops at the tearer at the gap in the label paper, making it easier to tear.
[0020] Paper-stopping algorithm: This invention uses a reflective sensor to read the paper thickness and determine the paper's current position, then gradually feeds the paper to the gap for easy tearing. However, reflective sensors may not accurately detect black labels or the front end due to paper color (such as black labels), reflective coatings, stains, or aging; transmissive sensors may miss gaps if obstructed by dust.
[0021] At this point, the system needs to make judgments and use sensor data for seamless processing: the system makes judgments when printing each piece of content on the Android system. It calculates the amount of label paper needed based on the font size and content, thus predicting in advance where the paper will stop; at the same time as printing is completed, the system feeds the paper backward to the position of the paper gap based on the sensor values before tearing the paper.
[0022] Paper stop position calculation: The purpose of paper stop is to ensure that each print returns to the gap, which refers to the nearest gap. This involves two situations: 1. If the printout is before the nearest gap, that is, the content is printed on the label before the gap, then the paper feeder is driven to move backward to the gap; 2. If the printout is after the nearest gap, that is, the label after the gap has also been partially printed, then the paper feeder is also driven to move backward to the gap, but a little further than before.
[0023] Several key data points: Print distance: The printing action is usually initiated by the printing app, which calls the encapsulated printing interface. At this time, the Android system will determine the actual content, line breaks, and font size, and then allocate a fixed number of printing lines to each label based on the content feedback, for example: d=10 lines. When the system calculates how many lines the printed content needs, for example d1=101 lines, it subtracts d=10 with a remainder of 1, thus knowing that the last label was printed with a distance of 1 line.
[0024] Paper feed distance: Once the final label printing distance is known, the system can select the paper feed distance of the stepper motor based on the front and back distances, that is, drive the paper feeder to the gap between the labels.
[0025] Sensor data: This refers to the data read by the printer's internal photoelectric sensor. During printing, the photoelectric sensor collects photoelectric signals passing through the paper in real time. Because the photoelectric signal is weak from acquisition to conversion, it needs to be amplified and noise-reduced physically to reduce sensor noise (e.g., thermal noise and readout noise). After optimization, the photoelectric signal is converted into an analog signal, which is then converted into a digital signal—a process called analog-to-digital conversion (ADC)—converting the quantized level value into binary numbers (e.g., 0x0FF, 0b1010) for processor use. The general calculation formula is Vin = adc_value × 3.3V / 4095, where adc_value is the analog signal value, 3.3V is the reference voltage, 4095 refers to the 12-bit sampling precision, and Vin is the digital signal, i.e., the actual voltage.
[0026] The digital signal value obtained here needs to be converted into actual distance. Different sensors have different reference formulas. For example: Distance (mm) ≈ 1 / a*V+b, where a and b are reference values from the sensor datasheet: a: 27.728, b: 1.226.
[0027] 4. Re-printing label paper rewinding mechanism In point 3 above, the gap is moved to the tearer position to facilitate tearing off a label. However, at this point, the print head is already in the upper middle position of the next sheet, and printing directly would waste paper and fail to start printing from the beginning of the label. Therefore, a pre-print rollback algorithm mechanism is introduced. When printing a new sheet, the beginning of the label is rolled back to the print head position before printing begins.
[0028] Rollback Algorithm: Considering that each person's tearing action or force is inconsistent, the print head may not start printing at the very beginning of the label. Therefore, a rollback algorithm mechanism is introduced. When printing a new label, the beginning of the label is rolled back to the print head's position before printing begins. That is, at the start of printing, sensors detect paper data to determine the length of the current gap, and then the beginning of the label is rolled back to the print head's position before printing begins.
[0029] When the paper stops for the first time during printing, the paper feeder is already at the optimal position; a pre-print rollback mechanism is introduced to prevent discrepancies in font size or line breaks set by the customer before and after printing.
[0030] When the system checks the content sent by the app, it compares it with the previous printed content. If the comparison finds a difference in settings, it will recalculate the various data in point three and try to adjust the print head to the optimal position.
[0031] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. 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 the embodiments of the present invention.
[0032] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.
[0033] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0034] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A label printing method, characterized in that, Applied to a label printer, the label printer including a printhead, a paper feeder, a paper tearer, and a sensor for detecting paper position, the method includes: Get the content to be printed; Determine the printing data based on the content to be printed; After the printing operation is completed, based on the paper position information detected by the sensor and the paper stop position information determined by the printing data, the paper feeder is controlled to move the gap position of the label paper to the paper tearer. In response to a new printing task, based on the current paper position information detected by the sensor, the paper feeder is controlled to move the starting position of the next label to the print head.
2. The method according to claim 1, characterized in that, The step of determining the print data based on the content to be printed includes: The number of characters, font size, and line breaks in the content to be printed are analyzed, and the total number of lines required to print the content is calculated. Based on the total number of printed lines and the number of printable lines per label, the actual number of printed lines for the last label is determined, and paper stop position information indicating the expected termination position of the print head within the label area is generated based on the actual number of printed lines for the last label.
3. The method according to claim 2, characterized in that, After the printing operation is completed, based on the paper position information detected by the sensor and the paper stop position information determined by the printing data, the paper feeder is controlled to move the gap position of the label paper to the paper tearer, including: The sensor acquires a detection signal reflecting the paper thickness in real time after the printing operation is completed; Based on the abrupt change in the detection signal from the thickness of the face stock to the thickness of the backing paper, the gap position of the label paper is identified; Based on the paper stop position information, determine the target gap position that needs to be moved to the paper tearer; Based on the relative distance between the target gap position and the current paper position, the paper feeder is controlled to feed paper in the forward direction until the target gap position reaches the paper tearer.
4. The method according to claim 3, characterized in that, In response to a new printing task, based on the current paper position information detected by the sensor, the control of the paper feeder to move the starting position of the next label to the print head includes: The sensor acquires a detection signal reflecting the paper thickness in real time when it receives the new printing task; Based on the abrupt change in the thickness of the base paper to the thickness of the face paper in the detection signal, the starting boundary of the next label is identified; Based on the offset distance between the starting boundary and the current paper position, the paper feeder is controlled to roll back in the opposite direction so that the starting boundary is aligned with the print head.
5. The method according to claim 1, characterized in that, The sensor is a photoelectric sensor, and the method further includes: The sensor is controlled to emit light toward the label paper and to receive photoelectric signals reflected or transmitted through the paper. A thickness characterization value reflecting the paper thickness is generated based on the intensity of the photoelectric signal; The changes in the thickness characterization value are used to identify the face paper area, the backing paper area, and the thickness abrupt boundary between the face paper and the backing paper.
6. The method according to claim 1, characterized in that, The method further includes: Simulation tests were performed in advance for various types of label paper to obtain the sensor baseline detection values in the surface area and gap area of each type of label paper, as well as the specification information of each type of label paper; The sensor baseline detection values of each label paper in the surface area and gap area are associated and stored with the label paper specification information to form a paper feature library. During the printing operation, the paper feature library is matched with the real-time sensor detection values, and the specification information of the currently used label paper is retrieved to calculate the paper position.
7. The method according to claim 1, characterized in that, The method further includes: When a new print job is received, the content to be printed in the new print job is compared with the content to be printed in the previous print job. If the content to be printed in the two print jobs differs in the number of characters, font size, and line breaks, the print data is re-determined based on the content to be printed in the new print job, and the paper stop position information and the rollback operation before printing are adjusted based on the re-determined print data.
