Table data printing method and device and readable storage medium
By communicating between the client and server and using drag-and-drop commands to determine the coordinates and configuration information of table elements, the problem of low efficiency in adjusting CSS code in web overlay printing is solved, enabling efficient and accurate printing of table data, and improving user experience and server performance.
Patent Information
- Application Number
- CN202511528850.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-03
AI Technical Summary
In existing technologies, web-based pre-printing requires developers to modify CSS code to adjust print positioning, resulting in poor system flexibility and low adjustment efficiency, which affects business processing efficiency.
By communicating with the server through the client, drag-and-drop commands are used to determine the coordinate data of table elements in the printed document, table configuration information, and timestamps. A strategy of caching first and then batch submitting is adopted to reduce the frequency of network interaction and ensure smooth operation and accuracy.
It enables efficient and accurate printing of tabular data, reduces human error, improves debugging efficiency and user experience, and reduces server load.
Smart Images

Figure CN121455431A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a table data printing method, device and readable storage medium. BACKGROUND
[0002] In related technologies, in the Web (webpage) spooling scenario, the system flexibility is poor and the adjustment efficiency is low due to the hard coding way of realizing printing positioning, the user cannot self-adjust the printing position, and the CSS code needs to be modified by the developer and debugged through repeated printing trial and error, which affects the business processing efficiency. SUMMARY
[0003] The present application aims to solve the technical problems in the prior art or related technologies that the CSS code needs to be modified by the developer and debugged through repeated printing trial and error, and the average adjustment of a single field takes too long time, which seriously restricts the business response efficiency.
[0004] To this end, the first aspect of the present application provides a table data printing method.
[0005] The second aspect of the present application provides a table data printing method.
[0006] The third aspect of the present application provides a table data printing device.
[0007] The fourth aspect of the present application provides a table data printing device.
[0008] The fifth aspect of the present application provides a table data printing device.
[0009] The sixth aspect of the present application provides a readable storage medium.
[0010] Therefore, according to the first aspect of the present application, a table data printing method is provided, which is used for a client, the client communicates with a server, and the table data printing method comprises the following steps: obtaining first table data, determining a printing document according to the first table data; sending a first table data establishment completion signal to the server according to the first table data; receiving initialization table data sent by the server; determining coordinate data of a table element in the first table data, table configuration information and a time stamp in the printing document based on a dragging instruction; determining printing position configuration data according to the coordinate data, the table configuration information and the time stamp, and sending the printing position configuration data to the server.
[0011] The table data printing method provided in the application is used for a client, the client communicates with a server, and the table data printing method comprises the following steps: obtaining first table data, determining a printing document according to the first table data; sending a first table data establishment completion signal to the server according to the first table data; receiving initialization table data sent by the server; determining coordinate data of a table element in the printing document, table configuration information and a timestamp in the first table data based on a dragging instruction; determining printing position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the printing position configuration data to the server. When a user presses a left mouse button on a certain table element, the system firstly records the initial coordinate (xstart, ystart) of the pressed position, and sets a global state flag isMouseDown to true (indicating true), namely the start of the dragging operation.
[0012] The application does not simply record the element position, but immediately calculates the precise offset of the mouse pointer relative to the top-left corner of the dragged element (topHeight-event.clientY and leftWidth-event.clientX). It is ensured that the element can be always bound to the mouse pointer during the subsequent movement, maintaining the stability and predictability of the dragging. Meanwhile, the system displays a prompt box to provide real-time position feedback for the user.
[0013] During the mouse movement, the system continuously checks the isMouseDown state. When the instruction is true, the position update is performed, avoiding misoperation. The real-time client coordinates (event.clientX / Y) of the mouse are added to the previously calculated offset, the new top-left corner coordinates of the element are dynamically calculated, and the top and left CSS styles of the element are immediately applied. The movement of the element is continuous, real-time and WYSIWYG. The coordinates of the prompt box are also updated synchronously, enhancing the position feedback.
[0014] When the user releases the left mouse button, the dragging operation ends. At this time, the system caches the final position of the moved element in the form of a CSS Cascading Style Sheet style (such as style="top:100px;left:200px;"). Then, the isMouseDown flag is reset to false, marking the completion of the current dragging event loop. After all the position verifications are completed, the system batch saves all the adjusted column position data (namely "marker bits") to the backend database at one time, completing the whole process from interface interaction to data persistence.
[0015] By calculating the relative offset and applying the CSS coordinates in real time, the complex table element positioning task is converted into a user instinctive drag operation. The operation intuitiveness and positioning accuracy are improved, and human errors are effectively reduced, which is the basis for realizing high-precision "copying and printing".
[0016] The prompt box integrated in the drag process and the real-time movement of the element provide continuous visual feedback. This enables the user to accurately estimate the final printing effect without repeated trial printing, shortens the debugging cycle from the "modify-save-request backend-print preview" cycle to an instant local operation, and greatly improves the debugging efficiency.
[0017] The application adopts the strategy of caching first and submitting in batches. During the drag process, all position changes are handled only on the browser side, without frequent interaction with the backend server, ensuring smooth operation. Finally, all data is submitted at once, reducing the number of network requests and reducing server pressure.
[0018] In some technical solutions, based on the drag instruction, the coordinate data of the table element in the print document, the table configuration information and the timestamp in the first table data are determined, including: in response to the left button down event of the drag instruction, the initial coordinates of the mouse and the offset of the mouse pointer relative to the upper left corner of the dragged table element are obtained, and the drag start flag is set; in response to the move event of the drag instruction, when the drag start flag is true, the updated position of the table element is determined according to the initial coordinates of the mouse and the offset; in response to the left button up event of the drag instruction, the current position of the table element is cached, and the drag start flag is reset, and the coordinate data of the table element in the print document, the table configuration information and the timestamp are determined.
[0019] In the technical solutions of the application, by responding to the left button down event and calculating the offset of the mouse pointer relative to the upper left corner of the dragged table element, it is ensured that the starting point of the drag behavior is accurate and conforms to the user's intuition. The user is not interacting with an abstract digital coordinate, but directly clicking on the table element itself on the screen. In the move event, the system dynamically calculates and updates the element position according to the real-time position of the mouse and the initial offset, so that the movement of the element is continuous, smooth and completely predictable, achieving the precise visual effect of "dragging to where it is".
[0020] The entire process is controlled by the drag start flag (such as isMouseDown) as the core of the state, and the start flag ensures that only after the effective start of the drag, the movement event will handle the position update, effectively preventing abnormal behavior caused by accidental touch. When the left button up event is triggered, the system resets the drag start flag to end the operation, and caches the current position of the table element. The temporary position on the graphical interface is solidified as persistent data, laying a solid foundation for subsequent generation of final coordinate data, table configuration information and timestamp, ensuring that each operation is reliable and traceable.
[0021] After the completion of the drag operation, a complete data packet containing coordinates, configuration information and timestamp is automatically generated. The coordinate data is a direct mapping of the drag result, the table configuration information defines the properties of the element, and the timestamp records the time of this configuration, so that the client can efficiently send the configuration result to the server for saving, and also provides accurate positioning basis for subsequent batch printing tasks without the need for manual adjustment again.
[0022] The second aspect of the application provides a table data printing method, the table data printing method is used for a server, the server communicates with a client, and the table data printing method comprises the following steps: receiving a first table data establishment completion signal sent by the client; sending initialization table data to the client according to the first table data establishment completion signal; obtaining printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a timestamp; determining printing data according to the printing position configuration data, and storing the printing data.
[0023] The application provides a table data printing method. The table data printing method is used for a server, the server communicates with a client, and the table data printing method comprises the following steps: receiving a first table data establishment completion signal sent by the client; sending initialization table data to the client according to the first table data establishment completion signal; obtaining printing position configuration data sent by the client, wherein the printing position configuration data is determined by the client according to coordinate data, table configuration information and a timestamp; and determining printing data according to the printing position configuration data and storing the printing data. After receiving the first table data establishment completion signal (i.e. a state notification that the client completes table rendering and is ready), the server sends the initialization table data to the client, wherein the initialization table data contains basic information such as table structure and initial style, thereby avoiding data competition. Subsequently, the server obtains the printing position configuration data sent by the client, i.e. structured data containing accurate coordinate data (positioning position of an element in a printing document), table configuration information (such as element style and type) and a timestamp (operation time mark) generated by the user through a drag operation, thereby processing complex real-time interaction logic by the client, and significantly reducing the server load. Finally, the server determines the printing data according to the printing position configuration data and stores the printing data, thereby fixing the layout effect seen by the user on the client interface into a printing template that can be called in batches and version-traced, and ensuring high precision and business reusability of the output of the printing template.
[0024] In some technical solutions, the step of determining the printing data according to the printing position configuration data and storing the printing data comprises the following steps: verifying the integrity of the printing position configuration data, and determining printing position configuration data that passes the verification; determining the printing data according to the printing position configuration data that passes the verification and storing the printing data, wherein a data rollback operation is performed when the printing data storage fails.
[0025] In the technical solutions of the application, the server verifies the integrity of the printing position configuration data (i.e. checks whether the data packet received from the client contains all necessary coordinate data, table configuration information and a timestamp and other key fields, so as to prevent misplacement caused by incomplete data), and only processes the printing position configuration data that passes the verification to generate final available printing data, i.e. output instruction set that is completely bound to the printing template and can be used to accurately "print" by a printer; when a fault occurs in the process of storing the printing data, the system performs a data rollback operation, thereby effectively preventing the problem of partial data update or partial success of storage caused by network interruption or server exception, fundamentally ensuring that each saving operation is either completely successful or completely invalid, avoiding storage of dirty data, and ensuring that the printing position information carefully configured by the user through dragging can be safely and accurately saved persistently.
[0026] In some technical solutions, optionally, the table data printing method further comprises monitoring the client connection state, and automatically saving the progress data when the operation is interrupted.
[0027] In the technical solutions of the present application, the server monitors the client connection state in real time, continuously detects whether the network session with the client is active, and when an operation interruption caused by network anomalies, unexpected page closure, or client crash is detected, the system triggers automatic saving of progress data, persistently stores the coordinate data corresponding to the table elements completed by the user through dragging and positioning, table configuration information, time stamps, and other intermediate states, so that the system can continue to configure from the latest saved progress point after the user reconnects or resumes the operation, rather than starting from zero, greatly reducing the time waste and repeated labor caused by unexpected interruptions, and improving the user's experience smoothness and data security in the complex printing template configuration process, which is an important reliability supplement to the core dragging and positioning function.
[0028] In some technical solutions, optionally, the server and the client receive and send data through an application programming interface.
[0029] In the technical solutions of the present application, the server and the client receive and send data through an application programming interface, which can improve the data transmission efficiency.
[0030] The third aspect of the present application provides a table data printing device, the table data printing device is used for a client, the client communicates with a server, and the table data printing device comprises a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module, and a fifth acquisition module. The first acquisition module is used for acquiring first table data and determining a printing document according to the first table data. The second acquisition module is used for sending a first table data establishment completion signal to the server according to the first table data. The third acquisition module is used for receiving initialization table data sent by the server. The fourth acquisition module is used for determining coordinate data of table elements in the printing document, table configuration information, and time stamps in the first table data based on a dragging instruction. The fifth acquisition module is used for determining printing position configuration data according to the coordinate data, the table configuration information, and the time stamps, and sending the printing position configuration data to the server.
[0031] The application provides a table data printing device, the table data printing device is used for a client, the client communicates with a server, and the table data printing device comprises a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module and a fifth acquisition module, the first acquisition module is used for acquiring first table data, and determining a printing document according to the first table data; the second acquisition module is used for sending a first table data establishment completion signal to the server according to the first table data; the third acquisition module is used for receiving initialization table data sent by the server; the fourth acquisition module is used for determining coordinate data of a table element in the printing document, table configuration information and a timestamp in the first table data based on a dragging instruction; and the fifth acquisition module is used for determining printing position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the printing position configuration data to the server. The element positioning of the data table is calculated by mouse dragging, the pixel distance of the mouse pointer from the left side of the visual area of the browser window and the pixel distance from the right side are used as the reference, the page scrolling, zooming and table positioning mode are not affected, the debugging efficiency is improved, and the user interaction experience and operation effectiveness are effectively improved.
[0032] The fourth aspect of the application provides a table data printing device, the table data printing device is used for a server, the server communicates with a client, and the table data printing device comprises a first determination module, a second determination module, a third determination module and a fourth determination module; the first determination module is used for receiving a first table data establishment completion signal sent by the client; the second determination module is used for sending initialization table data to the client according to the first table data establishment completion signal; the third determination module is used for acquiring printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a timestamp; and the fourth determination module is used for determining printing data according to the printing position configuration data, and storing the printing data.
[0033] The application provides a table data printing device. The table data printing device is used for a server, the server communicates with a client, and the table data printing device comprises a first determination module, a second determination module, a third determination module and a fourth determination module. The first determination module is used for receiving a first table data establishment completion signal sent by the client. The second determination module is used for sending initialization table data to the client according to the first table data establishment completion signal. The third determination module is used for obtaining printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a timestamp. The fourth determination module is used for determining printing data according to the printing position configuration data and storing the printing data. The element positioning of the data table is calculated by mouse dragging position. The pixel distance of the mouse pointer from the left side of the visual area of the browser window and the pixel distance of the mouse pointer from the right side of the visual area of the browser window are used as the reference, and the page scrolling, zooming and table positioning mode are not affected, so that the debugging efficiency is improved, and the user interaction experience and operation effectiveness are effectively improved.
[0034] A fifth aspect of the application provides a table data printing device comprising a processor and a memory. The memory stores programs or instructions. When the processor executes the programs or instructions in the memory, the steps of the table data printing method according to any one of the above technical solutions are implemented. Therefore, the table data printing device has all the beneficial effects of the table data printing method according to any one of the above technical solutions.
[0035] A sixth aspect of the application provides a readable storage medium. The readable storage medium stores programs or instructions. When the programs or instructions are executed by a processor, the steps of the table data printing method according to any one of the above technical solutions are implemented. Therefore, the readable storage medium has all the beneficial effects of the table data printing method according to any one of the above technical solutions.
[0036] Additional aspects and advantages of the application will become apparent in the light of the following description and by practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0037] The above and / or additional aspects and advantages of the application will become apparent and be readily appreciated from the following description, including the appended drawings, wherein: Figure 1 One of flowcharts of a table data printing method provided in some embodiments of the application is shown; Figure 2 Another of flowcharts of a table data printing method provided in some embodiments of the application is shown; Figure 3 One of structural block diagrams of a table data printing device provided in some embodiments of the application is shown; Figure 4Fig. 2 shows a structural block diagram of a table data printing device according to some embodiments of the present application; Figure 5 Fig. 3 shows a structural block diagram of a table data printing device according to some embodiments of the present application. DETAILED DESCRIPTION
[0038] In order to enable a more clear understanding of the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the features in the embodiments and the embodiments can be combined with each other without conflict.
[0039] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and therefore the scope of protection of the present application is not limited by the specific embodiments disclosed below.
[0040] The following description refers to the accompanying drawings and specific embodiments. Figures 1 to 5 The table data printing method, device and readable storage medium according to some embodiments of the present application are described.
[0041] As Figure 1 shown, the embodiments of the present application provide a table data printing method, the table data printing method is used for a client, the client communicates with a server, and the table data printing method steps include: Step 102, obtaining first table data, determining a print document according to the first table data; Step 104, sending a first table data establishment completion signal to the server according to the first table data; Step 106, receiving initialization table data sent by the server; Step 108, determining coordinate data of table elements in the first table data, table configuration information and a timestamp in the print document based on the drag instruction; Step 110, determining print position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the print position configuration data to the server.
[0042] The application provides a table data printing method. The table data printing method is used for a client, the client communicates with a server, and the table data printing method comprises the following steps: obtaining first table data, determining a printing document according to the first table data; sending a first table data establishment completion signal to the server according to the first table data; receiving initialization table data sent by the server; determining coordinate data of a table element in the printing document, table configuration information and a timestamp in the first table data based on a dragging instruction; determining printing position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the printing position configuration data to the server. When a user presses a left mouse button on a certain table element, the system firstly records the initial coordinate (xstart, ystart) of the pressed position, and sets a global state flag isMouseDown to true (indicating true), namely the start of the dragging operation.
[0043] The application does not simply record the element position, but immediately calculates the precise offset of the mouse pointer relative to the top-left corner of the dragged element (topHeight-event.clientY and leftWidth-event.clientX). This ensures that the element can be always bound to the mouse pointer during the subsequent movement, and maintains the stability and predictability of the dragging. Meanwhile, the system displays a prompt box to provide real-time position feedback for the user.
[0044] During the mouse movement, the system continuously checks the isMouseDown state. When the isMouseDown state is true, the position update is performed, and the misoperation is avoided. The real-time client coordinates (event.clientX / Y) of the mouse are added to the previously calculated offset, the new top-left corner coordinates of the element are dynamically calculated, and the top and left CSS styles of the element are immediately applied. The movement of the element is continuous, real-time and WYSIWYG. The coordinates of the prompt box are also updated synchronously, and the position feedback is strengthened.
[0045] When the user releases the left mouse button, the dragging operation is completed. At this time, the system caches the final position of the moved element in the form of a CSS style (such as style="top:100px;left:200px;"). Then, the isMouseDown flag is reset to false, indicating the completion of the current dragging event loop. After all the position verifications are completed, the system batch saves all the adjusted column position data (namely the "mark bit") to the backend database, and completes the whole process from interface interaction to data persistence.
[0046] By calculating the relative offset and applying the CSS coordinates in real time, the complex table element positioning task is converted into a user instinctive drag operation. The operation intuitiveness and positioning accuracy are improved, and human errors are effectively reduced, which is the basis for realizing high-precision "filling".
[0047] The prompt box integrated in the drag process and the real-time movement of the element provide continuous visual feedback. This enables the user to accurately estimate the final printing effect without repeated trial printing, shortens the debugging cycle from the'modify-save-request backend-print preview' cycle to an instant local operation, and greatly improves the debugging efficiency.
[0048] The application adopts the strategy of caching first and submitting in batches. During the drag process, all position changes are handled only on the browser side, without frequent interaction with the backend server, ensuring smooth operation. Finally, all data is submitted at once, reducing the number of network requests and reducing server pressure.
[0049] In some technical solutions, based on the drag instruction, the coordinate data of the table element in the print document, the table configuration information and the timestamp in the first table data are determined, including: in response to the left button down event of the drag instruction, the initial coordinates of the mouse and the offset of the mouse pointer relative to the upper left corner of the dragged table element are obtained, and the drag start flag is set; in response to the move event of the drag instruction, when the drag start flag is true, the updated position of the table element is determined according to the initial coordinates of the mouse and the offset; in response to the left button up event of the drag instruction, the current position of the table element is cached, and the drag start flag is reset, and the coordinate data of the table element in the print document, the table configuration information and the timestamp are determined.
[0050] In the technical solutions of the application, by responding to the left button down event and calculating the offset of the mouse pointer relative to the upper left corner of the dragged table element, it is ensured that the starting point of the drag behavior is accurate and conforms to the user's intuition. The user is not interacting with an abstract digital coordinate, but directly clicking on the table element itself on the screen. In the move event, the system dynamically calculates and updates the element position according to the real-time position of the mouse and the initial offset, so that the movement of the element is continuous, smooth and completely predictable, achieving the precise visual effect of "dragging to where it is".
[0051] The whole process is controlled by the drag start flag (such as isMouseDown) as the core of the state, and the start flag ensures that only after the effective start of the drag, the movement event will handle the position update, effectively preventing abnormal behavior caused by accidental touch. When the left button up event is triggered, the system resets the drag start flag to end the operation, and caches the current position of the table element. The temporary position on the graphical interface is solidified as persistent data, laying a solid foundation for subsequent generation of final coordinate data, table configuration information and timestamp, ensuring that each operation is reliable and traceable.
[0052] After the completion of the drag operation, a complete data packet containing coordinates, configuration information and timestamp is automatically generated. The coordinate data is a direct mapping of the drag result, the table configuration information defines the properties of the element, and the timestamp records the time of this configuration, so that the client can efficiently send the configuration result to the server for saving, and also provides accurate positioning basis for subsequent batch printing tasks without the need for manual adjustment again.
[0053] As shown in Figure 2 The embodiment of the present application provides a table data printing method, and the table data printing method is used for a server, the server communicates with a client, and the table data printing method comprises the following steps: Step 202, receiving a first table data establishment completion signal sent by the client; Step 204, sending initialization table data to the client according to the first table data establishment completion signal; Step 206, obtaining printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a timestamp; Step 208, determining printing data according to the printing position configuration data and storing the printing data.
[0054] The application provides a table data printing method. The table data printing method is used for a server, the server communicates with a client, and the table data printing method comprises the following steps: receiving a first table data establishment completion signal sent by the client; sending initialization table data to the client according to the first table data establishment completion signal; obtaining printing position configuration data sent by the client, wherein the printing position configuration data is determined by the client according to coordinate data, table configuration information and a timestamp; and determining printing data according to the printing position configuration data and storing the printing data. After receiving the first table data establishment completion signal (i.e. a state notification that the client completes table rendering and is ready), the server sends the initialization table data to the client, wherein the initialization table data comprises basic information such as table structure and initial style, so that data competition is avoided. Then, the server obtains the printing position configuration data sent by the client, i.e. structured data generated by the client through user dragging operation, wherein the structured data comprises accurate coordinate data (positioning position of an element in a printing document), table configuration information (such as element style and type) and a timestamp (operation time mark), so that complex real-time interaction logic is processed by the client, and server load is significantly reduced. Finally, the server determines the printing data according to the printing position configuration data and stores the printing data, so that the layout effect seen by the user on the client interface is solidified into a printing template which can be called in batches and version-traced, and high precision and business reusability of the output of the printing template are ensured.
[0055] In some technical solutions, the step of determining the printing data according to the printing position configuration data and storing the printing data comprises the following steps: verifying the integrity of the printing position configuration data, and determining printing position configuration data that passes the verification; determining the printing data according to the printing position configuration data that passes the verification and storing the printing data, wherein a data rollback operation is performed when the printing data storage fails.
[0056] In the technical solutions of the application, the server verifies the integrity of the printing position configuration data (i.e. checks whether the data packet received from the client contains all necessary coordinate data, table configuration information and a timestamp and other key fields, so as to prevent misplacement caused by incomplete data), and only processes the printing position configuration data that passes the verification to generate final available printing data, i.e. an output instruction set that is completely bound to the printing template and can be used to accurately "print" by driving a printer; when a fault occurs in the process of storing the printing data, the system performs a data rollback operation, so that the problem of partial data update or partial success of storage caused by network interruption or server exception is effectively prevented, the operation of each saving is either completely successful or completely invalid, storage of dirty data is avoided, and the printing position information carefully configured by the user through dragging can be safely and accurately saved.
[0057] In some embodiments, the table data printing method further comprises monitoring the client connection state, and automatically saving the progress data when the operation is interrupted.
[0058] In the technical solution of the present application, the server monitors the client connection state in real time, continuously detects whether the network session with the client is active, and when an operation interruption caused by network anomalies, unexpected page closure, or client crash is detected, the system triggers automatic saving of progress data, persistently stores the coordinate data corresponding to the table elements completed by the user during the dragging and positioning, table configuration information, and timestamps and other intermediate states, so that the system can continue to configure from the latest saved progress point after the user reconnects or resumes the operation, rather than starting from zero, greatly reducing the time waste and repetitive labor caused by unexpected interruptions, and improving the user's experience smoothness and data security during the complex print template configuration process. It is an important reliability supplement to the core dragging and positioning function.
[0059] In some embodiments, the server and the client receive and send data through an application programming interface.
[0060] In the technical solution of the present application, the server and the client receive and send data through an application programming interface, which can improve the data transmission efficiency.
[0061] As shown in Figure 3 The embodiment of the present application provides a table data printing device 300, which is used for a client, the client communicates with a server, and the table data printing device 300 comprises a first acquisition module 302, a second acquisition module 304, a third acquisition module 306, a fourth acquisition module 308, and a fifth acquisition module 310. The first acquisition module 302 is used for acquiring first table data and determining a print document according to the first table data. The second acquisition module 304 is used for sending a first table data establishment completion signal to the server according to the first table data. The third acquisition module 306 is used for receiving initialization table data sent by the server. The fourth acquisition module 308 is used for determining coordinate data of table elements in the print document, table configuration information, and a timestamp in the first table data based on a dragging instruction. The fifth acquisition module 310 is used for determining print position configuration data according to the coordinate data, the table configuration information, and the timestamp, and sending the print position configuration data to the server.
[0062] The application provides a table data printing device 300, the table data printing device 300 is used for a client, the client communicates with a server, and the table data printing device 300 comprises a first acquisition module 302, a second acquisition module 304, a third acquisition module 306, a fourth acquisition module 308 and a fifth acquisition module 310, the first acquisition module 302 is used for acquiring first table data, and determining a printing document according to the first table data; the second acquisition module 304 is used for sending a first table data establishment completion signal to the server according to the first table data; the third acquisition module 306 is used for receiving initialization table data sent by the server; the fourth acquisition module 308 is used for determining coordinate data of a table element in the printing document, table configuration information and a timestamp in the first table data based on a drag instruction; and the fifth acquisition module 310 is used for determining printing position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the printing position configuration data to the server. The element positioning of the data table is calculated by mouse dragging position, and the pixel distance of the mouse pointer from the left side and the pixel distance of the mouse pointer from the right side of the visual area of the browser window are used as the reference, so that the page scrolling, zooming and table positioning mode are not affected, the debugging efficiency is improved, and the user interaction experience and operation effectiveness are effectively improved.
[0063] As shown in Figure 4 The embodiment of the application provides a table data printing device 400, the table data printing device 400 is used for a server, the server communicates with a client, and the table data printing device 400 comprises a first determination module 402, a second determination module 404, a third determination module 406 and a fourth determination module 408; the first determination module 402 is used for receiving a first table data establishment completion signal sent by the client; the second determination module 404 is used for sending initialization table data to the client according to the first table data establishment completion signal; the third determination module 406 is used for acquiring printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a timestamp; and the fourth determination module 408 is used for determining printing data according to the printing position configuration data, and storing the printing data.
[0064] The application provides a table data printing device 400, which is used for a server, the server communicates with a client, and the table data printing device 400 comprises a first determining module 402, a second determining module 404, a third determining module 406 and a fourth determining module 408; the first determining module 402 is used for receiving a first table data establishment completion signal sent by the client; the second determining module 404 is used for sending initialization table data to the client according to the first table data establishment completion signal; the third determining module 406 is used for acquiring printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information and a time stamp; and the fourth determining module 408 is used for determining printing data according to the printing position configuration data and storing the printing data. The element positioning of the data table is calculated by mouse dragging position, the pixel distance of the mouse pointer from the left side of the visual area of the browser window and the pixel distance of the mouse pointer from the right side of the visual area of the browser window are used as the reference, the page scrolling, zooming and table positioning mode are not affected, the debugging efficiency is improved, and the user interaction experience and operation effectiveness are effectively improved.
[0065] As shown in Figure 5 The embodiment of the application provides a table data printing device 500, which comprises a processor 502 and a memory 504, the memory 504 stores programs or instructions, and the processor 502 implements the steps of the table data printing method of any one of the above-mentioned embodiments when executing the programs or instructions in the memory 504. Therefore, the table data printing device 500 has all the beneficial effects of the table data printing method of any one of the above-mentioned embodiments.
[0066] The embodiment of the application provides a readable storage medium, the readable storage medium stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the table data printing method of any one of the above-mentioned embodiments. Therefore, the readable storage medium has all the beneficial effects of the table data printing method of any one of the above-mentioned embodiments.
[0067] It should be noted that, in the claims, the specification and the drawings of the application, the terms "multiple" refers to two or more, unless otherwise specifically defined, the terms "upper", "lower" and the like indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, only for more convenient description of the application and make the description process more simple, and not for indicating or implying that the device or element must have the described specific orientation, constructed and operated in a particular orientation, therefore these descriptions can not be understood as a limitation of the application; the terms "connection", "installation", "fixed" and the like should be understood broadly, for example, "connection" can be fixed connection between multiple objects, can also be detachable connection between multiple objects, or integrally connected; can be direct connection between multiple objects, can also be indirect connection between multiple objects through intermediate medium. For those skilled in the art, the specific meaning of the above terms in the application can be understood according to the specific circumstances of the above data.
[0068] In the claims, the specification and the drawings of the application, the description of the terms "one embodiment", "some embodiments", "a specific embodiment" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the application. In the claims, the specification and the drawings of the application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0069] The above is only the preferred embodiment of the application, and is not used to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement and the like within the spirit and principle of the application shall be included in the protection scope of the application.
Claims
1. A tabular data printing method characterized by comprising: The table data printing method is used for a client in communication with a server, and comprises: obtaining first table data and determining a print document according to the first table data; sending a first table data establishment completion signal to the server according to the first table data; receiving initialization table data sent by the server; determining coordinate data, table configuration information and a timestamp of a table element in the first table data in the print document based on a drag instruction; determining print position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the print position configuration data to the server.
2. The tabular data printing method of claim 1, wherein, The determination of the coordinate data, the table configuration information and the timestamp of the table element in the first table data in the print document based on the drag instruction comprises: in response to the drag instruction being a left button press event, obtaining initial mouse coordinates and an offset of a mouse pointer relative to the upper left corner of the table element being dragged, and setting a drag start flag; in response to the drag instruction being a movement event, when the drag start flag is true, determining an updated position of the table element according to the initial mouse coordinates and the offset; in response to the drag instruction being a left button release event, caching a current position of the table element and resetting the drag start flag, and determining the coordinate data, the table configuration information and the timestamp of the table element in the print document.
3. A tabular data printing method characterized by, The table data printing method is used for a server in communication with a client, and comprises: receiving a first table data establishment completion signal sent by the client; sending initialization table data to the client according to the first table data establishment completion signal; obtaining print position configuration data sent by the client, wherein the client determines the print position configuration data according to coordinate data, table configuration information and a timestamp; determining print data according to the print position configuration data, and storing the print data.
4. The tabular data printing method according to claim 3, characterized by, The determination of the print data according to the print position configuration data and the storage of the print data comprise: verifying the integrity of the print position configuration data, and determining print position configuration data that passes the verification; determining print data according to the print position configuration data that passes the verification, and storing the print data, wherein a data rollback operation is performed when the storage of the print data fails.
5. The tabular data printing method of claim 3, wherein, Further comprising: monitoring the connection state of the client and automatically saving progress data when the operation is interrupted.
6. The tabular data printing method of claim 3, wherein, The server and the client receive and send data through an application programming interface.
7. A tabular data printing apparatus characterized by comprising: The table data printing device is used for a client in communication with a server, and comprises: a first obtaining module for obtaining first table data and determining a print document according to the first table data; a second obtaining module for sending a first table data establishment completion signal to the server according to the first table data; a third obtaining module for receiving initialization table data sent by the server; a fourth obtaining module for determining coordinate data, table configuration information and a timestamp of a table element in the first table data in the print document based on a drag instruction; and a fifth obtaining module for determining print position configuration data according to the coordinate data, the table configuration information and the timestamp, and sending the print position configuration data to the server. The fourth obtaining module is configured to determine, based on the dragging instruction, coordinate data of a table element in the first table data in the printed document, table configuration information, and a timestamp; The fifth obtaining module is configured to determine printing position configuration data according to the coordinate data, the table configuration information, and the timestamp, and send the printing position configuration data to the server.
8. A tabular data printing apparatus characterized by comprising: The table data printing device is used for a server, the server communicates with a client, and the table data printing device comprises: The first determining module is configured to receive a first table data establishment completion signal sent by the client; The second determining module is configured to send initialization table data to the client according to the first table data establishment completion signal; The third determining module is configured to obtain printing position configuration data sent by the client, wherein the client determines the printing position configuration data according to coordinate data, table configuration information, and a timestamp; The fourth determining module is configured to determine printing data according to the printing position configuration data, and store the printing data.
9. A tabular data printing apparatus characterized by comprising: comprise: a processor; a memory, wherein the memory stores programs or instructions, and the processor implements the steps of the table data printing method according to claim 1 or 2 and / or the steps of the table data printing method according to any one of claims 3 to 6 when executing the programs or instructions in the memory.
10. A readable storage medium, characterized by, The readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the table data printing method according to claim 1 or 2 and / or the steps of the table data printing method according to any one of claims 3 to 6.