Printing method, device and equipment and computer readable storage medium
By obtaining the font size of the thermal recorder print data and determining the separator size, the physical overlap problem caused by printing again after the printing content is interrupted, the obvious separation between the printed content is achieved, and the availability of the printed data is improved.
Patent Information
- Application Number
- CN202510139770.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-16
AI Technical Summary
When the existing thermal recorder prints again after the printing content is interrupted, it is easy to cause physical overlap of the printed content, and it is impossible to effectively distinguish the printed content at each moment.
By obtaining the font size of the data that was printed this time and the last time it was printed when receiving the printing command, determining the size of the current separator, and controlling the thermal recorder to print the separator according to the size of the separator, and then printing the data this time.
It avoids the physical overlap problem caused by printing again after printing interruption, ensures that the separation between the various print contents is obvious, and improves the availability of print data.
Smart Images

Figure CN120010799A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of thermal printing, and in particular to a printing method, device, equipment and computer-readable storage medium. Background Art
[0002] At present, most electrocardiographs or patient monitors on the market are equipped with thermal recorders, which are used to record patient data. The thermal recorder itself contains a roll of thermal paper and a thermal recorder device. The host using the thermal recorder generally sends instructions and data to the thermal recorder to control the recorder to feed paper and realize the function of printing data on the thermal recorder.
[0003] In actual use, because thermal paper is different from ordinary A4 paper, A4 paper is a single independent sheet, but thermal paper is a roll continuous, so the conventional distinction method will cause the printed content to overlap due to various reasons, and it is impossible to effectively distinguish the printed content at each moment. The overlap here means that the last printed content is continuous with the current printed content or the interval is not obvious.
[0004] Therefore, how to avoid overlapping of the printed content of thermal recorders is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a printing method, apparatus, device and computer-readable storage medium, which solve the problem in the prior art that printed content overlaps and makes it impossible to distinguish printed content at different times.
[0006] In order to solve the above technical problems, the present invention provides a printing method, comprising:
[0007] When a print instruction is received, the font size of the current print data and the font size of the last print data are obtained;
[0008] Determine the size of the current separator based on the font size of the data printed this time and the font size of the data printed last time;
[0009] The thermal recorder is controlled to print the separator according to the size of the print separator, and the current print data is printed after the separator is printed.
[0010] Optionally, determining the size of the current separator based on the font size of the data printed this time and the font size of the data printed last time includes:
[0011] The font size and / or the number of lines of the current separator are determined based on the font size of the current print data and the font size of the previous print data.
[0012] Optionally, determining the font size of the current separator based on the font size of the data printed this time and the font size of the data printed last time includes:
[0013] The largest font size of the data printed this time and the font size of the data printed last time is used as the font size of the current separator;
[0014] Alternatively, the sum of the font size of the data printed this time and the font size of the data printed last time is used as the font size of the current separator;
[0015] Alternatively, the smallest font size between the font size of the data printed this time and the font size of the data printed last time is obtained, and N times of the smallest font size is used as the font size of the current separator; wherein N is greater than 1.
[0016] Optionally, determining the number of rows of the current separator based on the font size of the data printed this time and the font size of the data printed last time includes:
[0017] If the font size of the current print data is M times the font size of the last print data, the number of rows of the current separator is M; M is an integer multiple greater than 1;
[0018] Alternatively, the smallest font size between the font size of the data printed this time and the font size of the data printed last time is obtained, and the number of rows of the current separator is determined according to the smallest font size.
[0019] Optionally, controlling a thermal recorder to print the separator according to the size of the print separator includes:
[0020] Obtaining the resolution of the thermal recorder, and calculating the number of paper feed steps for this printing according to the resolution, the number of lines of the print delimiter, and the font size;
[0021] The thermal recorder is controlled to print the separator. When the number of paper feeding steps of the thermal recorder reaches the number of paper feeding steps for this printing, the separator is printed.
[0022] Optionally, after the delimiter is printed and the current print data is printed, the method further includes:
[0023] Get the paper length of the current paper roll;
[0024] Determine the actual print length based on the number of lines printed each time;
[0025] When the actual printing length is greater than the paper length, a risk prompt is given that there is overlap or is about to be overlapped in the output paper printing.
[0026] Optionally, after determining the size of the current separator based on the font size of the current print data and the font size of the last print data, the method further includes:
[0027] Get the physical width and height of the display area of the display;
[0028] Obtaining the current resolution of the display screen;
[0029] If the display screen is set to landscape display, determining the actual physical size of the separator based on the separator size, the width of the current resolution and the physical width, and performing a preview;
[0030] If the display screen is set to vertical display, the actual physical size of the separator is determined based on the separator size, the height of the current resolution and the physical height, and a preview is performed.
[0031] The present invention also provides a printing device, comprising:
[0032] A font size acquisition module, used to acquire the font size of the current print data and the font size of the last print data when receiving a print instruction;
[0033] A separator size determination module, used to determine the size of the current separator based on the font size of the current print data and the font size of the last print data;
[0034] The printing control module is used to control the thermal recorder to print the separator according to the size of the printing separator, and print the current printing data after the separator is printed.
[0035] The present invention also provides an electronic device, comprising:
[0036] Memory for storing computer programs;
[0037] A processor is used to implement the steps of the printing method as described above when executing the computer program.
[0038] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the steps of the printing method described above are implemented.
[0039] It can be seen that the present invention obtains the font size of the current print data and the font size of the previous print data when receiving a print instruction; determines the size of the current separator based on the font size of the current print data and the font size of the previous print data; controls the thermal recorder to print the separator according to the size of the print separator, and prints the current print data after the separator is printed. The present invention solves the problem of physical overlap of printed content caused by reprinting after printing is interrupted; and also solves the problem of unclear intervals between printed contents caused by improper setting of separators between two consecutive print contents.
[0040] In addition, the present invention also provides a printing device, equipment and computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0042] Figure 1 A flow chart of a printing method provided by an embodiment of the present invention;
[0043] Figure 2 An example flow chart of a printing method provided by an embodiment of the present invention;
[0044] Figure 3 An example flow chart of another printing method provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the structure of a printing device provided by an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] At present, most electrocardiographs or patient monitors on the market are equipped with thermal recorders, which are used to record patient data. The thermal recorder itself contains a roll of thermal paper and a thermal recorder device. The host generally controls the paper feeding of the thermal recorder by sending instructions and data to the thermal recorder to realize the function of printing data on the thermal recorder. Taking the patient monitor as an example, when the doctor clicks the print waveform button, the thermal recorder generally prints waveform data for several seconds, and then stops until the doctor clicks the button again, and the thermal recorder prints the waveform again. In order to distinguish the content printed at different times, some monitors currently on the market use the method of adding horizontal lines and certain blank lines at the end of the printed content to facilitate doctors to distinguish the content printed at different times.
[0049] However, in actual use, because thermal paper is different from ordinary A4 paper, A4 paper is a single independent sheet, but thermal paper is a roll continuous, so this method will cause visual overlap of printed content due to various reasons, such as during the printing process, the system is powered off, and then it is turned on and printed again, resulting in physical overlap of printed data; during the printing process, the host crashes, and after it returns to normal, it prints again, resulting in physical overlap of printed data; during the printing process, the thermal recorder abnormally does not feed the paper correctly, and after it returns to normal, it prints again, resulting in physical overlap of printed data. Physical overlap means that the data of this print and the last print are continuous and cannot be distinguished, resulting in unusable print data. The current printing method also has visual overlap, such as this print is small font, the separator at the end of the print content is relatively small, and the next print is large font. Because the separator between the two print contents is small, the visual content interval is not obvious.
[0050] In order to solve the above problems, the present invention provides a printing method. Figure 1 , Figure 1 A flowchart of a printing method provided by an embodiment of the present invention. The method may include:
[0051] S101: When a print instruction is received, the font size of the current print data and the font size of the previous print data are obtained.
[0052] The execution subject of this embodiment is the host computer that controls the thermal recorder. When printing is required, the font size of the current print data (recorded as B) and the font size of the last print data (recorded as A) are obtained. The purpose of step S101 is to avoid the problem of unreasonable separator size setting due to inconsistent font sizes of continuously printed data, so as to avoid physical overlap and unclear visual intervals.
[0053] S102: Determine the size of the current separator based on the font size of the current print data and the font size of the previous print data.
[0054] This embodiment does not limit the separator, and the purpose of the separator is to distinguish the print data at different times. The separator can be a slash ( / ), a vertical bar (|), an asterisk (※), a pound sign (#), a space, etc. The host calculates the appropriate separator font size or content for two consecutive print contents, which is recorded as C. The calculation method of C is not limited, as long as it is calculated by a combination of at least A and B. The current separator size includes but is not limited to the separator font size and the number of separator lines.
[0055] It should be noted that the above-mentioned determination of the font size of the current separator based on the font size of the currently printed data and the font size of the last printed data may specifically include the following steps:
[0056] The maximum font size of the current print data and the font size of the previous print data is used as the font size of the current separator; or, the sum of the font size of the current print data and the font size of the previous print data is used as the font size of the current separator; or, the minimum font size of the current print data and the font size of the previous print data is obtained, and N times the minimum font size is used as the font size of the current separator; N is greater than 1.
[0057] Here we take the separator font size as an example. The calculation of the separator font size can refer to the following formula:
[0058] (1) C = max (A, B): the larger the font size, the better.
[0059] (2) C = A + B: the sum of the two font sizes;
[0060] (3) C = 2*min(A, B): calculated by twice the font size of the smaller one.
[0061] It should be noted that the above-mentioned determination of the number of rows of the current separator based on the font size of the current print data and the font size of the last print data may specifically include the following steps:
[0062] If the font size of the current print data is M times the font size of the last print data, the number of rows of the current separator is M; M is an integer multiple greater than 1; or, obtain the minimum font size between the font size of the current print data and the font size of the last print data, and determine the number of rows of the current separator based on the minimum font size.
[0063] Here we take the number of separator rows as an example. The calculation of the number of separator rows can refer to the following formula:
[0064] (1) C = number of separator lines * (B / A): If the font size of B is twice that of A, the separator will be two lines;
[0065] (2) C = number of separator lines * min(A, B) / 5: Divide the smaller font size by 5 to get the number of separator lines.
[0066] S103: Controlling the thermal recorder to print the separator according to the size of the print separator, and printing the current print data after the separator is printed.
[0067] This embodiment takes the separator as the starting point, that is, adds the separator at the beginning of printing, and after the separator is printed, the data of this time can be printed immediately. In other words, in each printing, the separator is printed first and then the data is printed, rather than printing the separator at the end of printing.
[0068] Furthermore, the above-mentioned controlling the thermal recorder to print the separator according to the size of the print separator may include the following steps:
[0069] Step 21: Obtain the resolution of the thermal recorder, and calculate the number of paper feed steps for this printing according to the resolution, the number of lines of the print delimiter, and the font size;
[0070] Step 22: Control the thermal recorder to print the separator. When the number of paper feed steps of the thermal recorder reaches the number of paper feed steps for this printing, the separator is printed.
[0071] Specifically, here we take the separator as a space as an example. Assuming that the font size of the separator is calculated to be P and the number of lines of the separator is F, then according to the standard formula of 1 dot = 0.376 mm, and then according to P*0.376*F / D=M, it is concluded that the paper feed direction needs to move M steps. Where D is the resolution of the thermal recorder, that is, the dpi of the thermal recorder in the paper feed direction, recorded as D, and the unit is dot / mm. When executing this printing, first control the thermal recorder to move forward M steps, and when it ends, the separator printing is completed. After the separator printing is completed, the host sends the data to be printed this time to the thermal recorder to start printing.
[0072] Furthermore, after the delimiter is printed and the current print data is printed, the following steps may be included:
[0073] Step 31: Get the paper length of the current paper roll;
[0074] Step 32: Determine the actual printing length according to the number of lines printed each time;
[0075] Step 33: When the actual printing length is greater than the paper length, a risk prompt is displayed that there is overlap or is about to be overlapped in the output paper printing.
[0076] Specifically, please refer to Figure 2. The length of a roll of thermal paper is recorded as LT mm (this length can be set by the user or obtained by the host through communication with the thermal recorder); after initialization, reset the actual printing length LP to 0 mm; for each subsequent printing, set LP=LP+P*0.376 for each line printed; when LP is greater than LT, it is judged that the paper printing has overlapped or is about to overlap, and a risk reminder is issued. When the host detects that the paper has been taken out (for example, the paper is missing), the software needs to reset LP to 0.
[0077] Furthermore, after determining the size of the current separator based on the font size of the current print data and the font size of the last print data, the following steps may be included:
[0078] Step 41: Obtain the physical width and physical height of the display area of the display screen;
[0079] Step 42: Get the current resolution of the display screen;
[0080] Step 43: If the display screen is set to landscape display, determine the actual physical size of the separator based on the separator size, the width of the current resolution and the physical width, and perform a preview;
[0081] Step 44: If the display screen is set to vertical display, the actual physical size of the separator is determined based on the separator size, the height of the current resolution and the physical height, and a preview is performed.
[0082] The traditional print preview function displays the proportional relationship, not the real physical size. The present invention is based on the following algorithm, which can preview the real physical size before printing, so that before printing, the physical distance of the separator under the real physical size can be previewed, so that before printing, it can be known whether the interval of the printed content is visually difficult to distinguish:
[0083] (1) The physical width of the display area is recorded as W mm, and the physical height is recorded as H mm;
[0084] (2) The current resolution of the display, with the width recorded as X pixels and the height recorded as Y pixels;
[0085] (3) When the display screen displays the physical size calculated by the separator size above, it must be combined with the physical size and resolution of the display screen to display the same size as the physical distance on the screen;
[0086] (4) If the separator is displayed horizontally on the display screen, the number of pixels to be displayed = X / W*P*0.376*F;
[0087] (5) If the separator is displayed vertically on the display screen, the number of pixels to be displayed = Y / H*P*0.376*F.
[0088] The printing method provided by the embodiment of the present invention is applied, by obtaining the font size of the current print data and the font size of the last print data when a print instruction is received; determining the size of the current separator based on the font size of the current print data and the font size of the last print data; controlling the thermal recorder to print the separator according to the size of the print separator, and printing the current print data after the separator is printed. The present invention solves the problem of physical overlap of the printed content caused by reprinting after printing is interrupted; and also solves the problem of unclear intervals between the printed contents caused by improper setting of the separator between two consecutive print contents.
[0089] Suppose you are printing, and the power goes out before the printing is finished. Then the power comes back on and the printing continues. Because the separator is added at the beginning of printing, there will be no physical overlap between the two prints. Suppose the last print was in font size A, and this print will be in font size B. Font size A is smaller, and font size B is larger. Because the separator size is dynamically calculated before printing B, there will be no visual overlap between the last print and the current print. You can also refer to the printing process. Figure 3 , Figure 3 The flowchart of another printing method provided by the embodiment of the present invention may specifically include: the host sends a command to the thermal recorder to drive the thermal recorder to print, and the roll paper starts to move.
[0090] The printing device provided by the embodiment of the present invention is introduced below. The printing device described below and the printing method described above can be referred to each other.
[0091] Please refer to Figure 4 , Figure 4 A schematic diagram of a printing device provided in an embodiment of the present invention may include:
[0092] The font size acquisition module 100 is used to acquire the font size of the current print data and the font size of the last print data when receiving a print instruction;
[0093] A separator size determination module 200, configured to determine the size of the current separator based on the font size of the current print data and the font size of the last print data;
[0094] The printing control module 300 is used to control the thermal recorder to print the separator according to the size of the printing separator, and print the current printing data after the separator is printed.
[0095] Based on the above embodiment, the delimiter size determination module 100 may include:
[0096] The determining unit is used to determine the font size and / or the number of lines of the current separator based on the font size of the data printed this time and the font size of the data printed last time.
[0097] Based on the above embodiment, the determining unit may include:
[0098] The delimiter font size determination subunit is used to use the maximum font size of the font size of the data printed this time and the font size of the data printed last time as the font size of the current delimiter; or, use the sum of the font size of the data printed this time and the font size of the data printed last time as the font size of the current delimiter; or, obtain the minimum font size of the font size of the data printed this time and the font size of the data printed last time, and use N times the minimum font size as the font size of the current delimiter; wherein N is greater than 1.
[0099] Based on the above embodiment, the determining unit may include:
[0100] The delimiter row number determination subunit is used to determine the number of delimiter rows of the current delimiter if the font size of the current print data is M times the font size of the last print data; M is an integer multiple greater than 1; or, obtain the minimum font size between the font size of the current print data and the font size of the last print data, and determine the number of delimiter rows of the current delimiter based on the minimum font size.
[0101] Based on the above embodiment, the printing control module 300 may include:
[0102] A paper feed step number calculation unit, used to obtain the resolution of the thermal recorder, and calculate the paper feed step number of this printing according to the resolution, the number of lines of the print delimiter, and the font size;
[0103] The separator printing unit is used to control the thermal recorder to print the separator. When the number of paper feeding steps of the thermal recorder reaches the number of paper feeding steps for this printing, the separator is printed.
[0104] Based on the above embodiment, the printing device may further include:
[0105] The paper length acquisition module is used to obtain the paper length of the current paper roll;
[0106] The actual printing length acquisition module is used to determine the actual printing length according to the number of lines printed each time;
[0107] The risk warning module is used to output a risk warning that there is overlap or is about to be overlapped in paper printing when the actual printing length is greater than the paper length.
[0108] Based on the above embodiment, the printing device may further include:
[0109] A display area physical size acquisition module is used to obtain the physical width and height of the display area of the display screen;
[0110] A resolution acquisition module, used to acquire the current resolution of the display screen;
[0111] A horizontal preview module, configured to determine the actual physical size of the separator based on the separator size, the width of the current resolution and the physical width, and perform a preview if the display screen is set to horizontal display;
[0112] A vertical preview module is used to determine the actual physical size of the separator based on the separator size, the height of the current resolution and the physical height, and perform a preview if the display screen is set to vertical display.
[0113] It should be noted that the order of the modules and units in the above printing device can be changed without affecting the logic.
[0114] The printing device provided by the embodiment of the present invention is used, through the font size acquisition module 100, to obtain the font size of the current print data and the font size of the last print data when receiving the print instruction; the separator size determination module 200 is used to determine the size of the current separator based on the font size of the current print data and the font size of the last print data; the printing control module 300 is used to control the thermal recorder to print the separator according to the size of the print separator, and print the current print data after the separator is printed. This device solves the problem of physical overlap of the printed content caused by printing again after the printing is interrupted; it also solves the problem that the separator between two consecutive print contents is improperly set, resulting in unclear intervals between the printed contents.
[0115] The electronic device provided by the embodiment of the present invention is introduced below. The electronic device described below and the printing method described above can be referred to each other.
[0116] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention may include:
[0117] A memory 10, used for storing computer programs;
[0118] The processor 20 is used to execute the computer program to implement the above printing method.
[0119] The memory 10 , the processor 20 , and the communication interface 31 all communicate with each other via the communication bus 32 .
[0120] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
[0121] When receiving a print instruction, obtaining the font size of the current print data and the font size of the last print data;
[0122] Determine the size of the current separator based on the font size of the data printed this time and the font size of the data printed last time;
[0123] The thermal recorder is controlled to print the separator according to the size of the print separator, and the current print data is printed after the separator is printed.
[0124] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0125] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0126] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0127] The communication interface 31 may be an interface of a communication module, and is used to connect to other devices or systems.
[0128] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.
[0129] The computer-readable storage medium provided in the embodiment of the present invention is introduced below. The computer-readable storage medium described below and the printing method described above can be referred to each other.
[0130] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned printing method are implemented.
[0131] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0133] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0134] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0135] The above is a detailed introduction to a printing method, device, equipment and computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A printing method, characterized in that: include: When a print instruction is received, the font size of the current print data and the font size of the last print data are obtained; Determine the size of the current separator based on the font size of the data printed this time and the font size of the data printed last time; The thermal recorder is controlled to print the separator according to the size of the print separator, and the current print data is printed after the separator is printed.
2. The printing method according to claim 1, characterized in that: Determining the size of the current separator based on the font size of the current print data and the font size of the last print data includes: The font size and / or the number of lines of the current separator are determined based on the font size of the current print data and the font size of the previous print data.
3. The printing method according to claim 2, characterized in that: Determining the font size of the current separator based on the font size of the current print data and the font size of the last print data includes: The largest font size of the data printed this time and the font size of the data printed last time is used as the font size of the current separator; Alternatively, the sum of the font size of the data printed this time and the font size of the data printed last time is used as the font size of the current separator; Alternatively, the smallest font size between the font size of the data printed this time and the font size of the data printed last time is obtained, and N times of the smallest font size is used as the font size of the current separator; wherein N is greater than 1.
4. The printing method according to claim 2, characterized in that: Determining the number of rows of the current separator based on the font size of the current print data and the font size of the last print data includes: If the font size of the current print data is M times the font size of the last print data, the number of rows of the current separator is M; M is an integer multiple greater than 1; Alternatively, the smallest font size between the font size of the data printed this time and the font size of the data printed last time is obtained, and the number of rows of the current separator is determined according to the smallest font size.
5. The printing method according to claim 1, characterized in that: Controlling a thermal recorder to print the delimiter according to the size of the print delimiter includes: Obtaining the resolution of the thermal recorder, and calculating the number of paper feed steps for this printing according to the resolution, the number of lines of the print delimiter, and the font size; The thermal recorder is controlled to print the separator. When the number of paper feeding steps of the thermal recorder reaches the number of paper feeding steps for this printing, the separator is printed.
6. The printing method according to claim 1, characterized in that: After the delimiter is printed and the current print data is printed, the method further includes: Get the paper length of the current paper roll; Determine the actual print length based on the number of lines printed each time; When the actual printing length is greater than the paper length, a risk prompt is given that there is overlap or is about to be overlapped in the output paper printing.
7. The printing method according to claim 1, characterized in that: After determining the size of the current separator based on the font size of the current print data and the font size of the last print data, the method further includes: Get the physical width and height of the display area of the display; Obtaining the current resolution of the display screen; If the display screen is set to landscape display, determining the actual physical size of the separator based on the separator size, the width of the current resolution and the physical width, and performing a preview; If the display screen is set to vertical display, the actual physical size of the separator is determined based on the separator size, the height of the current resolution and the physical height, and a preview is performed.
8. A printing device, characterized in that: include: A font size acquisition module, used to acquire the font size of the current print data and the font size of the last print data when receiving a print instruction; A separator size determination module, used to determine the size of the current separator based on the font size of the current print data and the font size of the last print data; The printing control module is used to control the thermal recorder to print the separator according to the size of the printing separator, and print the current printing data after the separator is printed.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the printing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the steps of the printing method according to any one of claims 1 to 7 are implemented.