A printing control method, device, printer and storage medium
Patent Information
- Application Number
- CN202311548983.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-11-20
AI Technical Summary
[0003]在便携打印机中经常需要使用电池对打印机供电打印,在一些打印场景下,例如打印快递面单时,常常需要打印整条的横线,这就导致在打印该点行时需要耗费较大的功率,以致超出电池的供给范围导致打印机触发断电保护
[0031]综上所述,本实施例通过去掉待打印数据集的一些打印点,使得在略微降低打印质量的情况下提高打印的速度,本实施例特别适应一些对打印质量要求不高而对打印速度要求较高的打印场景,例如对快递面单的打印。
Smart Images

Figure CN117681576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer technology, and more particularly to a printing control method, apparatus, printer, and storage medium. Background Technology
[0002] Printers, as a common computer output device, are widely used in people's work, study, and daily life. With the development of technology and changes in work and lifestyle, small, portable printers are becoming increasingly popular. Portable printers allow people to carry them with them for printing anytime, anywhere.
[0003] Portable printers often require batteries to power the printer. In some printing scenarios, such as printing express waybills, it is often necessary to print entire horizontal lines. This results in a large power consumption when printing such lines, which may exceed the battery's power supply range and trigger the printer's power-off protection.
[0004] In existing technologies, adapters are also used to power printers. To ensure that the printer works properly, existing technologies generally increase the peak current of the adapter or print in segments. However, increasing the peak current of the adapter requires a more expensive adapter, which increases costs. Segmented printing will significantly reduce the printing speed and is not suitable for some high-speed printing scenarios. Summary of the Invention
[0005] In view of this, the object of the present invention is to provide a printing control method, apparatus, printer and storage medium to improve the above-mentioned problems.
[0006] This invention provides a printing control method, which includes:
[0007] S1. Obtain the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer;
[0008] S2. When it is determined that the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1, if there exists an integer n such that ceil(N3 / N1)<ceil(N2 / N1),N3 / N2> If p satisfies the condition, remove n print points from the dataset to be printed, obtain the actual print dataset, and execute step S3; otherwise, execute step S4; where ceil() represents the rounding function, p is the preset minimum print ratio, and N3 = N2 - n.
[0009] S3. Print the current print point row according to the actual print dataset;
[0010] S4. Print the current print point row according to the dataset to be printed.
[0011] Preferably, when there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make N3 as large as possible.
[0012] Preferably, when there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make ceil(N2 / N1)-ceil(N3 / N1) as large as possible.
[0013] Preferably, when removing n print points from the dataset to be printed:
[0014] The pixel removal interval is determined based on the integer n and the number of print dots N2, and the pixel removal process is performed on the dataset to be printed according to the pixel removal interval to obtain the actual print dataset; wherein, the pixel removal interval is...
[0015] d=array_dots-1=(N2 / n)-1.
[0016] Preferably, when removing n print points from the dataset to be printed:
[0017] Divide the dataset to be printed into n groups based on the number of printable dots N2 and the integer n, and obtain the number of dots in each group and the number of remaining dots; where the number of dots in each group array_dots = N2 / n, and the number of remaining dots residual_dots = N2%n;
[0018] Distribute the remaining points evenly among the groups, where the array group removes one print point for every array_dots points, and the remaining residual_dots group removes one print point for every (array_dots+1) points; array = n - residual_dots.
[0019] Preferably, during dot removal, the position of the first print dot to be removed is determined by a random function; the position of the first print dot to be removed is start_bit_addr = rand() % array_dots.
[0020] Preferably, it further includes:
[0021] For a print point that has been removed from the print, determine whether its neighboring points are print points;
[0022] If so, increase the proportion of heating time for nearby points.
[0023] This invention also provides a printing control device, which includes:
[0024] The data acquisition unit is used to acquire the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer;
[0025] The judgment unit is used to determine if, when the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1, there exists an integer n such that ceil(N3 / N1).<ceil(N2 / N1),N3 / N2> If p satisfies the condition, then remove n print points from the dataset to be printed, obtain the actual print dataset, and notify the first printing unit; otherwise, notify the second printing unit; where ceil() represents the rounding up function, p is the preset minimum printing ratio, and N3 = N2 - n;
[0026] The first printing unit is used to print the current print point row according to the actual print dataset;
[0027] The second printing unit is used to print the current print point row according to the dataset to be printed.
[0028] This invention also provides a printer, which includes a heating head and a controller. The controller is electrically connected to the heating head. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0029] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the printing control method described above.
[0030] In summary, this embodiment is particularly suitable for printed content with many long solid lines, such as express delivery waybills.
[0031] In summary, this embodiment improves printing speed by removing some print points from the dataset to be printed, while slightly reducing print quality. This embodiment is particularly suitable for printing scenarios where print quality requirements are not high but printing speed requirements are high, such as printing express delivery waybills. Attached Figure Description
[0032] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart illustrating the printing control method provided in the first embodiment of the present invention.
[0034] Figure 2 This is a printout of the waybill before it is checked.
[0035] Figure 3 This is a printout of a line with a maximum of 24 dots removed.
[0036] Figure 4 This is a printout of a line with a maximum of 56 dots removed.
[0037] Figure 5 This is a printout of a line with a maximum of 88 dots removed.
[0038] Figure 6 This is a printout of a line with a maximum of 120 dots removed.
[0039] Figure 7 This is a printout of a line with a maximum of 190 dots removed.
[0040] Figure 8 This is a schematic diagram of the printing control device provided in the second embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0043] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0044] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0045] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0046] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0047] The terms "first" and "second" used in the embodiments are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein.
[0048] First Embodiment
[0049] Please see Figure 1 The first embodiment of the present invention provides a printing control method, which is applied to a printer and includes the following steps:
[0050] S1, obtain the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer.
[0051] In this embodiment, the printer is specifically a thermal printer, which has a printhead with multiple heating points. The printer can achieve the printing function by selectively energizing the heating points.
[0052] In this embodiment, the dataset to be printed may include a dot array. Typically, the dot array corresponds one-to-one with the heating points on the print head. For example, for a 468 resolution print head, there are 468 heating points, and each dot array also has 468 data points, which consist of 1s and / or 0s. Data 1 indicates that the corresponding heating point needs to be powered, and data 0 indicates that the corresponding heating point does not need to be powered.
[0053] In this embodiment, the maximum number of printable dots of the printer refers to the maximum number of dots that the printer can heat up at the same time. The maximum number of printable dots N1 of the printer is determined by the parameters of the printer's adapter. In particular, the higher the maximum output power or maximum output current of the adapter, the greater its maximum number of printable dots, but correspondingly, the cost of the adapter is also higher.
[0054] S2, when it is determined that the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1, if there exists an integer n such that ceil(N3 / N1)<ceil(N2 / N1),N3 / N2> If p satisfies the condition, remove n print points from the dataset to be printed, obtain the actual print dataset, and execute step S3; otherwise, execute step S4; where ceil() represents the rounding function, p is the preset minimum print ratio, and N3 = N2 - n.
[0055] S3. Print the current print point row according to the actual print dataset;
[0056] S4. Print the current print point row according to the dataset to be printed.
[0057] In this embodiment, the number of print points N2 corresponding to the dataset to be printed is the number of data points with a value of 1 in the dataset to be printed. If the number of print points N2 is greater than the maximum number of printable points N1, it means that the dataset to be printed cannot be printed in one go under normal circumstances. The dataset to be printed needs to be printed in segments, and the number of segments is ceil(N2 / N1), where ceil() represents the rounding up function.
[0058] For example, when the number of printable dots N2 = 400 and the maximum printable dots N1 = 250, it needs to be printed in two segments; when the number of printable dots N2 = 400 and the maximum printable dots N1 = 120, it needs to be printed in four segments.
[0059] As mentioned earlier, segmented printing reduces printing speed, and the more segments there are, the slower the printing speed becomes. Therefore, it is not suitable for high-speed printing scenarios, such as when a large number of express delivery waybills need to be printed.
[0060] Therefore, in this embodiment, if there exists an integer n such that ceil(N3 / N1)<ceil(N2 / N1),N3 / N2> If p is satisfied simultaneously, the number of print points in the dataset to be printed will be reduced by removing some print points that were originally required to be printed. This reduces the number of print points and the number of segments, thereby increasing the printing speed. If no such integer n exists, it means that removing print points does not reduce the number of print segments when N3 / N2>p is satisfied. In this case, the normal printing process will still be followed, i.e., the current print point row will be printed according to the dataset to be printed.
[0061] It is understandable that removing dots will obviously reduce the print quality. Therefore, this embodiment sets a minimum print ratio p to limit the number of dots removed. For example, the value of p can be set to greater than or equal to 50%, preferably p = 75%. This avoids affecting the recognition and reading of the printed content due to excessive dot removal.
[0062] Based on these considerations, if the actual number of printed points in the actual printed dataset after point removal is N3, then ceil(N3 / N1) should be satisfied.<ceil(N2 / N1),N3 / N2> p.
[0063] In other words, point removal printing should only be performed if the number of segments is reduced but the printing ratio is greater than the minimum printing ratio; otherwise, the current print point row will still be printed based on the dataset to be printed.
[0064] In this embodiment, after obtaining the actual set of print dots, the printer controller can print the current print dot row based on the actual set of print dots.
[0065] like Figures 2 to 7 As shown, Figure 2 This is a printout of a waybill that has not been checked. Figures 3-7 This is a printout of a shipping label after removing different numbers of dots. Figures 2-7 The corresponding printhead resolution is 760 (i.e.) Figures 2-7 Each dotted row array contains 760 data points consisting of 1s and / or 0s. Figures 3-7 The images show the printed appearance of shipping labels with a maximum of 24, 56, 88, 120, and 190 dots removed per line. It can be seen that in scenarios where readability is not a primary concern, removing these dots does not significantly impact readability.
[0066] In summary, in this embodiment, by removing some print points from the dataset to be printed, the printing speed is maintained while slightly reducing print quality.
[0067] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be described in further detail below.
[0068] Preferably, when there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make N3 as large as possible.
[0069] In the above embodiments, for ceil(N3 / N1)<ceil(N2 / N1),N3 / N2> p, the integer n that satisfies the condition usually has many possible values.
[0070] For example, if p = 50%, and the number of printable dots N2 = 400, and the maximum number of printable dots N1 = 250, then before dot removal, the print needs to be divided into two segments. When removing dots, removing 150 to 200 dots can satisfy the requirement of printing in one segment. In this embodiment, N3 is set to be as large as possible, that is, to retain as many printable dots as possible, i.e., to remove 150 dots, thereby improving the print quality.
[0071] For example, if p = 50%, and the number of printable dots N2 = 400, and the maximum number of printable dots N1 = 120, then without removing dots, the print needs to be divided into 4 segments. When removing dots, removing 40 to 200 dots can reduce the number of print segments. In this embodiment, N3 is set to be as large as possible, that is, to retain as many printable dots as possible, thereby improving print quality. That is, 40 printable dots are removed, and the number of print segments becomes 3.
[0072] Preferably, when there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make ceil(N2 / N1)-ceil(N3 / N1) as large as possible.
[0073] For example, if p = 50%, and the number of printable dots N2 = 400, and the maximum number of printable dots N1 = 120, then without removing dots, it needs to be printed in 4 segments. When removing dots, removing 40 to 200 dots can satisfy the requirement of reducing the number of print segments. In this embodiment, the setting is to make ceil(N2 / N1) - ceil(N3 / N1) as large as possible, that is, to reduce the number of print segments as much as possible, thereby improving the printing speed. That is, 160 printable dots are removed, and the number of print segments becomes 2.
[0074] Preferably, when removing n print points from the dataset to be printed:
[0075] The dot removal spacing is determined based on the integer n and the number of print dots N2, and the dataset to be printed is processed to remove dots based on the dot removal spacing to obtain the actual print dataset; wherein, the dot removal spacing d = array_dots-1 = (N2 / n)-1.
[0076] In this embodiment, the number of removed dots needs to be reasonably distributed within the dataset to be printed to ensure the legibility of the printed content. Therefore, in this embodiment, these removed dots are evenly distributed throughout the print array.
[0077] For example, if the number of printable dots N2 = 400 and the maximum number of printable dots N1 = 120, then 40 printable dots need to be removed. The dot removal interval d = N2 / n-1 = 400 / 40-1 = 9, which means that one printable dot is removed every 9 printable dots (corresponding to data 1), or one printable dot is removed every 10 printable dots.
[0078] Of course, in some cases, the dot spacing d is not necessarily an integer. For example, if the number of printable dots N2 = 400 and the maximum number of printable dots N1 = 120, then 160 printable dots need to be removed. In this case, the dot spacing d = array_dots - 1 = 400 / 160 - 1 = 5 / 2 - 1 = 3 / 2, which means that 2 printable dots need to be removed for every 5 printable dots. Therefore, we can sample the following dot removal method: first remove 1 printable dot every other dot, then remove 1 printable dot every 2 dots, and repeat this process.
[0079] In summary, this embodiment aims to distribute the removed print dots relatively evenly across the print array.
[0080] In another embodiment, when removing n print points from the dataset to be printed:
[0081] Divide the dataset to be printed into n groups based on the number of printable dots N2 and the integer n, and obtain the number of dots in each group and the number of remaining dots; where the number of dots in each group array_dots = N2 / n, and the number of remaining dots residual_dots = N2%n;
[0082] Distribute the remaining points evenly among the groups, where the array group removes one print point for every array_dots points, and the remaining residual_dots group removes one print point for every (array_dots+1) points; array = n - residual_dots.
[0083] 1) Specifically, first calculate how many print points constitute a group (there are n groups in total):
[0084] array_dots = N2 / n, the remaining number of dots is residual_dots = N2%n, that is, N2 = n*array_dots + residual_dots.
[0085] When residual_dots is much larger than array_dots, the unevenness of the sampling will be more obvious because the remaining residual_dots points will not be sampled.
[0086] Therefore, in this embodiment, the remaining points are evenly distributed, and array = n - residual_dots. Then, for the first array group, one point is removed for every array_dots of points, and for the remaining residual_dots group, one print point is removed for every (array_dots + 1) points. Of course, in other embodiments, it could also be that for the last array group or any intermediate array group, one point is removed for every array_dots of points (as long as one print point is removed for every array_dots of points in any of the array groups), and for the remaining residual_dots group, one print point is removed for every (array_dots + 1) points.
[0087] At this point, we can see:
[0088] (array*array_dots)+remian_dots*(array_dots+1)
[0089] =(array+remian_dots)*array_dots+remian_dots=n*array_dots+remian_dots
[0090] =N2.
[0091] The sum of the number of print points removed and the actual number of print points is N². This achieves a relatively uniform removal of n print points from the dataset to be printed.
[0092] Preferably, during the dot removal process, the position of the first print dot to be removed is determined by a random function.
[0093] In this embodiment, to avoid drawing dots in the same column for adjacent rows or several adjacent rows (continuous drawing dots in the same column will produce a column of white lines), the position of the first print dot that needs to be canceled is determined by a random number. The random value is set within the range of array_dots, i.e., start_bit_addr = rand() % array_dots. Adjacent array_dots rows are unlikely to be drawn at the same position, thus improving print quality.
[0094] Preferably, it further includes:
[0095] For a print point that has been removed from the print, determine whether its neighboring points are print points;
[0096] If so, increase the proportion of heating time for nearby points.
[0097] In this embodiment, if a print point that has been removed from printing is a neighboring print point, the heating time of the surrounding print points can be increased to enhance the surrounding area and improve print quality.
[0098] Second Embodiment
[0099] Please see Figure 8 The second embodiment of the present invention also provides a printing control device, which includes:
[0100] The data acquisition unit 210 is used to acquire the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer;
[0101] The judgment unit 220 is used to determine if there exists an integer n such that ceil(N3 / N1) when the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1.<ceil(N2 / N1),N3 / N2> If p satisfies the condition, then remove n print points from the dataset to be printed, obtain the actual print dataset, and notify the first printing unit; otherwise, notify the second printing unit; where ceil() represents the rounding up function, p is the preset minimum printing ratio, and N3 = N2 - n;
[0102] The first printing unit 230 is used to print the current print point row according to the actual print dataset;
[0103] The second printing unit 240 is used to print the current print point row according to the dataset to be printed.
[0104] A third embodiment of the present invention also provides a printer, which includes a heater and a controller. The controller is electrically connected to the heating head. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0105] The fourth embodiment of the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the printing control method described above.
[0106] For example, the various devices and process steps described above can be implemented by a computer program, which can be divided into one or more units, which are stored in the memory and executed by the processor to complete the present invention.
[0107] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0108] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the present invention by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0109] If the unit integrated into the electronic device or printer is implemented as 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, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0110] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0111] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A printing control method, characterized in that, include: S1. Obtain the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer; S2. When it is determined that the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1, if there exists an integer n such that ceil(N3 / N1)<ceil(N2 / N1),N3 / N2> If p satisfies the condition, then remove n print points from the dataset to be printed, obtain the actual print dataset, and execute step S3. Otherwise, proceed to step S4; where ceil() represents the rounding function, p is the preset minimum printing ratio, and N3 = N2 - n; where, when removing n print points from the dataset to be printed: the removal interval is determined according to the integer n and the number of print points N2, and the dataset to be printed is processed according to the removal interval to obtain the actual print dataset; where the removal interval d = array_dots - 1 = (N2 / n) - 1; or, the dataset to be printed is divided into n groups according to the number of print points N2 and the integer n, and the number of points and the number of remaining points in each group are obtained; where the number of points in each group array_dots = N2 / n, and the number of remaining points residual_dots = N2% n; the remaining points are evenly distributed among the groups, where the array group removes one print point for every array_dots points, and the remaining residual_dots group removes one print point for every (array_dots + 1) points; array = n - residual_dots; S3. Print the current print point row according to the actual print dataset; S4. Print the current print point row according to the dataset to be printed.
2. The printing control method according to claim 1, characterized in that, When there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make N3 as large as possible.
3. The printing control method according to claim 1, characterized in that, When there are multiple integers n that satisfy the condition, ceil(N3 / N1) is satisfied.<ceil(N2 / N1),N3 / N2> Given p, make ceil(N2 / N1) - ceil(N3 / N1) as large as possible.
4. The printing control method according to claim 1, characterized in that, During dot removal, the position of the first print dot to be removed is determined by a random function; the position of the first print dot to be removed is start_bit_addr = rand()%array_dots.
5. The printing control method according to claim 1, characterized in that, Also includes: For a print point that has been removed from the print, determine whether its neighboring points are print points; If so, then increase the proportion of heating time for the adjacent points.
6. A printing control device, characterized in that, include: The data acquisition unit is used to acquire the dataset to be printed for the current print row and the maximum number of printable dots N1 of the printer; The judgment unit is used to determine if, when the number of printable points N2 corresponding to the dataset to be printed is greater than the maximum number of printable points N1, there exists an integer n such that ceil(N3 / N1).<ceil(N2 / N1),N3 / N2> If p satisfies all conditions, then remove n print points from the dataset to be printed, obtain the actual print dataset, and notify the first printing unit. Otherwise, notify the second printing unit; where ceil() represents the rounding function, p is the preset minimum printing ratio, and N3 = N2 - n; where, when removing n printing points from the dataset to be printed: the removal interval is determined according to the integer n and the number of printing points N2, and the dataset to be printed is processed according to the removal interval to obtain the actual printed dataset; where, the removal interval d = array_dots - 1 = (N2 / n) - 1; or, the dataset to be printed is divided into n groups according to the number of printing points N2 and the integer n, and the number of points in each group and the number of remaining points are obtained; where, the number of points in each group array_dots = N2 / n, and the number of remaining points residual_dots = N2% n; the remaining points are evenly distributed among the groups, where the array group removes one printing point for every array_dots points, and the remaining residual_dots group removes one printing point for every (array_dots + 1) points; array = n - residual_dots; The first printing unit is used to print the current print point row according to the actual print dataset; The second printing unit is used to print the current print point row according to the dataset to be printed.
7. A printer, characterized in that, The device includes a heating head and a controller, both of which are electrically connected to the heating head. The controller includes a memory and a processor. The memory stores a computer program that can be executed by the processor to implement the printing control method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located to implement the printing control method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Serial dot printer and control method thereof
CN105584227A
Segmented printing method and device for printer and thermal printer
CN109532239A