PDF (Portable Document Format) multi-page signing method and system based on dynamic rendering and automatic positioning

Through the PDF signing method of dynamic rendering and automatic positioning, the problems of degraded rendering performance, high memory usage and low signing efficiency in the existing technology are solved, and an efficient and accurate PDF signing process is achieved.

CN120448649APending Publication Date: 2025-08-08SHENZHEN JINNIU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510539706.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing PDF signing methods have problems such as degraded rendering performance, high memory usage, low signing efficiency and easy to miss signature locations, especially in PDF files with multiple pages or multiple signature areas.

Method used

By pre-storing the detailed information of the PDF document's document identity and signature area on the server, the client dynamically renders and automatically locates the signature area, loads only the necessary pages, generates a signature box and automatically scrolls to the signature box, and updates the signature status in real time.

Benefits of technology

It significantly reduces memory usage and rendering time, improves signing efficiency, ensures the accuracy and completeness of the signing process, reduces dependence on network bandwidth, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448649A_ABST
    Figure CN120448649A_ABST
Patent Text Reader

Abstract

The invention discloses a PDF (Portable Document Format) multi-page signing method and system based on dynamic rendering and automatic positioning. The method comprises the following steps that: a server stores a document identifier of each PDF document, position information of a signature region and a page number of the signature region in a database in advance; when receiving an instruction of opening a target PDF document, the client sends an information acquisition request to the server; the server obtains detailed information of each signature area of the target PDF document according to the document identifier of the target PDF document, and returns the detailed information to the client; the client dynamically renders a to-be-signed page where the signature area is located in the target PDF document according to the page number where the signature area is located; dynamically generating a signature box on the to-be-signed page by the client, and automatically rolling and positioning to the signature box; and when the client monitors a signature action completion instruction corresponding to the signature box, updating the signature state to be signed, sending the signature state to the server, and dynamically rendering a next to-be-signed page of the target PDF document. According to the method, the signing efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of document signing, and in particular to a PDF multi-page signing method and system based on dynamic rendering and automatic positioning. Background Art

[0002] Electronic signature technology has been widely used in areas such as remote contract signing and document verification, especially in PDF files involving multiple signature pages or areas. Currently, the industry's common practice is to pre-render all pages of a PDF document and mark the signature locations within the document. When signing, users often need to manually scroll through the PDF file page by page to find the signature location, or click on the signature list on the side of the document to jump to the corresponding page one by one and sign. For example, electronic signature platforms such as Adobe Acrobat and DocuSign each mark the signature location separately, allowing users to find and sign one by one through the sidebar or by manually scrolling.

[0003] However, the above approach presents the following issues. First, rendering the entire PDF file, especially for larger files, can result in degraded rendering performance and excessive memory usage, impacting the user experience. For example, loading a 10-page contract in full can consume as much as 310MB of memory. Furthermore, in weak network conditions, preloading can fail and make it impossible to resume progress. These issues stem from a lack of proper allocation of static resources and a failure to dynamically load pages based on user needs. Second, when PDF documents have many pages to sign or signature locations are scattered, users must manually locate signature locations one by one, a cumbersome and redundant process that significantly reduces signing efficiency. For example, signing a 10-page contract can require an average of eight clicks. This stems from a lack of a link between scrolling and intelligent content loading. Finally, during the signing process, users can easily miss the signature location, compromising the completeness and accuracy of the contract or document. Similar to the second issue, manual methods can leave hidden signature fields unsigned. Summary of the Invention

[0004] The purpose of the present invention is to provide a PDF multi-page signing method and system based on dynamic rendering and automatic positioning, aiming to solve the problems of low signing efficiency and easy omission of signature position in existing document signing technologies.

[0005] In a first aspect, an embodiment of the present invention provides a PDF multi-page signing method based on dynamic rendering and automatic positioning, comprising:

[0006] The server pre-stores in the database the document identifier of each PDF document and detailed information of each signature area in each PDF document, the detailed information including the location information of the signature area and the page number where the signature area is located;

[0007] When the client receives the instruction to open the target PDF document, it sends an information acquisition request to the server, wherein the information acquisition request includes the document identifier of the target PDF document;

[0008] The server obtains detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and returns the information to the client;

[0009] The client dynamically renders the page to be signed where the signature area is located in the target PDF document according to the page number where the signature area is located;

[0010] The client dynamically generates a signature box on the page to be signed according to the position information of the signature area, and automatically scrolls to locate the signature box;

[0011] When the client monitors the signature action completion instruction corresponding to the signature box, it updates the signature status to signed, sends the signature status to the server, and dynamically renders the next page to be signed of the target PDF document.

[0012] In a second aspect, an embodiment of the present invention further provides a PDF multi-page signing system based on dynamic rendering and automatic positioning, which includes: a server and a client;

[0013] The server is used to pre-store in a database the document identifier of each PDF document and detailed information of each signature area in each PDF document, wherein the detailed information includes the location information of the signature area and the page number where the signature area is located;

[0014] The client is configured to send an information acquisition request to the server upon receiving an instruction to open a target PDF document, wherein the information acquisition request includes a document identifier of the target PDF document;

[0015] The server is further configured to obtain detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and return the information to the client;

[0016] The client is further configured to dynamically render the page to be signed in the target PDF document where the signature area is located according to the page number where the signature area is located;

[0017] The client is further configured to dynamically generate a signature box on the page to be signed based on the location information of the signature area, and automatically scroll to locate the signature box;

[0018] The client is also used to update the signature status to signed when monitoring the signature action completion instruction corresponding to the signature box, send the signature status to the server, and dynamically render the next page to be signed of the target PDF document.

[0019] The embodiment of the present invention provides a PDF multi-page signing method and system based on dynamic rendering and automatic positioning. The method dynamically renders only the pages containing the signature area in the target PDF document, avoiding the full loading of the entire PDF document, significantly reducing memory usage and rendering time, and thus improving the user experience. Furthermore, by automatically scrolling to the signature box position, the user's manual search for the signature area is reduced, the complexity of the operation is reduced, the signing process is ensured to be accurate and efficient, and the signing efficiency is greatly improved. In addition, the client guides the user to sign one by one according to the detailed information of the signature area provided by the server, ensuring that the user will not miss any signature location, thereby ensuring the integrity and accuracy of the PDF document signing. At the same time, the dynamic loading of pages reduces the dependence on network bandwidth. Even in a weak network environment, the user can smoothly perform the signing operation, avoiding the loss of progress due to network problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a sub-process of a PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of another sub-process of the PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of another sub-process of the PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of another sub-process of the PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of another sub-process of the PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of another sub-process of the PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention;

[0028] Figure 8 A schematic diagram of the principle flow of a PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0030] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0031] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0032] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0033] See also Figure 1 , Figure 1 A flowchart of a PDF multi-page signing method based on dynamic rendering and automatic positioning provided by an embodiment of the present invention includes steps S101 to S106:

[0034] S101. The server pre-stores in a database the document identifier of each PDF document and detailed information of each signature area in each PDF document, the detailed information including the location information of the signature area and the page number where the signature area is located;

[0035] In this embodiment, a relational database or a NoSQL database can be used to record the document identifier of each PDF document and the detailed information of each signature area in each PDF document. Specifically, the detailed information of each PDF document includes that each PDF document has its own unique document identifier (such as a document ID), which is used to uniquely identify the document in the system, and these document identifiers are stored in the database so that the corresponding document information can be quickly retrieved through the document identifier later. The detailed information also includes the location information of the signature area, which specifically describes the coordinate position of the signature area on the page (for example, the coordinates of the upper left corner and the lower right corner) so that the client can accurately display the signature box on the page; the page number where the signature area is located, which records the PDF page number where the signature area is located, so that the client can quickly locate the page containing the signature area when rendering.

[0036] In a specific embodiment, a reasonable data table structure can be designed in the database to store detailed information about the document identification and signature area. For example, a table can be designed that contains fields such as "document ID", "signature area ID", "page number", "X coordinate", "Y coordinate", etc. to ensure the integrity and queryability of the data. The server can read the content of the PDF file through a PDF parsing tool (such as Apache PDFBox, iText, etc.) to extract the location and page number information of the signature area. The extracted information is stored in a relational database (such as MySQL, PostgreSQL) or a non-relational database (such as MongoDB), and an index is established for the document identification and signature area information so that the client can quickly retrieve the required data when requesting.

[0037] In a more specific embodiment, during the electronic contract signing process, the server can quickly guide users to sign at key locations in the contract by storing the document identifier of each PDF document and detailed information about each signature area within each PDF document. For multi-page documents containing multiple signature areas, the information stored by the server can help the client achieve efficient page rendering and signature positioning.

[0038] In summary, by pre-storing the signature area information, the client can directly obtain the required data from the server when sending a request to the server, without having to parse the PDF file again, which significantly improves the data retrieval efficiency.

[0039] S102: When receiving an instruction to open a target PDF document, the client sends an information acquisition request to the server, where the information acquisition request includes a document identifier of the target PDF document.

[0040] In this embodiment, the client monitors the user's operations, such as clicking the "Open Document" button or selecting a PDF file. The target PDF document selected by the user needs to be identified by its unique document identifier (such as a document ID). The client extracts the document identifier (such as a document ID) of the target PDF document selected by the user. An information acquisition request is constructed, and the document identifier of the target PDF document is included in the request as a key parameter. The client sends the information acquisition request to the server via the network, requesting the server to provide detailed information about the signature area of the target PDF document. The request is usually sent via the HTTP / HTTPS protocol to ensure the security and reliability of data transmission.

[0041] In a specific embodiment, the client provides a user interface (such as a web page or mobile application interface) to allow the user to select or enter the identifier of the target PDF document. The user's operation instructions are captured through an event monitoring mechanism (such as addEventListener in JavaScript or click event monitoring in mobile applications). An HTTP request is constructed using an HTTP client library (such as fetch, axios in JavaScript, or HttpClient in mobile applications). The document identifier is sent to the server as a request parameter (such as a URL parameter or JSON data in the request body). Ensure that the request is sent via the HTTPS protocol to prevent the data from being stolen or tampered with during transmission. It should be noted that authentication information (such as API keys, user session tokens, etc.) can be added to the request to ensure that only authorized users can obtain document information.

[0042] In summary, the client can quickly respond to user commands and initiate requests to the server in a timely manner, improving the smoothness of user interaction. By using a clear document identifier as a request parameter, the client can accurately obtain the signature area information of the target PDF document, avoiding data confusion or errors.

[0043] S103, the server obtains detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and returns it to the client;

[0044] In this embodiment, after receiving a request containing a document identifier from a client, the server performs a database query to accurately retrieve detailed information about each signature area in the target PDF document based on the document identifier, including the signature area's location (e.g., coordinates) and the page number on which it is located. This signature area information is pre-stored in a database, and the server uses efficient query statements (e.g., SQL queries) to quickly locate and extract the required data. The server encapsulates the retrieved signature area details, typically organizing this information in a structured data format (e.g., JSON or XML). This encapsulated data is then sent back to the client via the network in the form of an HTTP response, ensuring the integrity and accuracy of the data transmission.

[0045] In summary, the server, through the database's indexing mechanism and optimized query statements, can quickly retrieve the signature area information of the target PDF document from a large amount of data, significantly improving system response speed. The client can receive the required information promptly, reducing user wait time and improving the user experience. The server directly retrieves the pre-stored signature area information from the database, ensuring data accuracy and consistency.

[0046] Furthermore, the server and client exchange data through standardized interfaces (such as RESTful APIs), reducing the coupling between system components. Centralized database storage and management facilitates system scalability, supporting the storage and query of more PDF documents and signature area information. When processing requests, the server can incorporate authentication and authorization mechanisms to ensure that only legitimate clients can access signature area information, enhancing system security.

[0047] S104: The client dynamically renders the page to be signed in the target PDF document where the signature area is located according to the page number where the signature area is located;

[0048] In this embodiment, after receiving the signature area information returned by the server, the client only loads and renders the page containing the signature area, rather than the entire PDF document. This on-demand loading method avoids unnecessary resource consumption and improves rendering efficiency.

[0049] Specifically, the client uses a PDF rendering library (such as PDF.js or other third-party libraries) to achieve dynamic rendering of PDF pages. Based on the page number information where the signature area is located, the client only requests and renders the page containing the signature area, rather than rendering the entire document at once. By rendering only the page containing the signature area, the client significantly reduces memory usage and CPU resource consumption, especially when processing large PDF documents, the performance improvement is more obvious. The dynamic rendering mechanism enables the client to respond to user operations quickly, reduces user waiting time, and improves the user experience. Users can quickly locate the page that needs to be signed without waiting for the entire PDF document to load, reducing the operation steps and waiting time. The dynamic rendering method enables the client to run efficiently even in a weak network environment, avoiding freezes or loading failures caused by network delays. The on-demand loading and dynamic rendering mechanisms enable the client to flexibly handle PDF documents of different sizes and complexities without the need to pre-process the entire document.

[0050] Furthermore, the server doesn't need to transmit the entire PDF document all at once; it only needs to provide the page number information for the signature area, which reduces network bandwidth usage. The client's on-demand loading mechanism also reduces the server load, improving the overall performance and stability of the system.

[0051] In one embodiment, if Figure 2 As shown, step S104 includes steps S201 to S203:

[0052] S201, loading the page to be signed where the signature area is located in the target PDF document through the PDF.js library;

[0053] S202: Parsing the data content of the page to be signed by JavaScript;

[0054] S203: Draw the data content of the page to be signed on the canvas of the web page.

[0055] In this embodiment, in step S201, the target PDF document's page containing the signature area is loaded using the PDF.js library. PDF.js is an open-source JavaScript library for rendering PDF files on web pages. It efficiently parses the structure and content of PDF documents and converts them into a format that can be displayed in a browser.

[0056] In step S202, JavaScript is used to parse the loaded page data to be signed. JavaScript can read the page content provided by PDF.js, extract text, images, layout and other information, and convert it into a format suitable for display on the web page.

[0057] In step S203, the parsed page data is drawn onto the webpage's canvas. Canvas is a drawing API provided by HTML5 that allows developers to draw graphics, images, text, and other content on webpages. Through Canvas, the content of the PDF page can be accurately rendered onto the webpage, providing users with an intuitive visual experience.

[0058] In summary, the PDF.js library enables rapid loading and rendering of PDF pages, particularly when loading only pages containing signature areas, significantly improving rendering efficiency and reducing resource consumption. This on-demand loading approach is particularly suitable for processing large PDF documents, avoiding the performance issues associated with full loading. By parsing the data content of PDF pages using JavaScript, it is possible to accurately extract elements such as text and images from the page and display them fully on the web page. Canvas drawing technology ensures high-quality rendering of page content, ensuring users experience visual results consistent with the original PDF document.

[0059] Furthermore, PDF.js is a widely used open-source library with excellent browser compatibility, running on a wide range of devices and platforms. Its JavaScript and Canvas-based implementation also facilitates future functionality expansion, such as adding annotations and highlighting signature areas. Users can quickly view and manipulate pages containing signature areas without having to wait for the entire PDF document to load. Canvas drawing technology provides a smooth scrolling and zooming experience, enhancing user interactivity with the document.

[0060] Furthermore, the PDF.js library effectively handles PDF documents of various formats when parsing and rendering them, preventing rendering failures due to file corruption or formatting errors. Furthermore, Canvas drawing technology ensures stable display of page content and reduces rendering errors.

[0061] In one embodiment, if Figure 3 As shown, the step S201 includes steps S301 to S302:

[0062] S301, sorting the page numbers where the signature area is located;

[0063] S302: Load the pages to be signed that are at the front of the target PDF document in sequence through the PDF.js library.

[0064] In this embodiment, the client sorts the pages containing the signature area. By extracting the page numbers and arranging them in ascending order, the order in which the signature areas are loaded aligns with the document's actual page order. Using the PDF.js library, the pages containing the signature area in the target PDF document are loaded sequentially according to the sorted page order. PDF.js supports on-demand loading of specific pages, allowing the client to request and render these pages one by one based on the sorting results, rather than loading the entire document all at once.

[0065] During the loading process, the client can dynamically render the page that needs to be viewed based on the user's operation, and cache the loaded pages. If the user needs to return to view the previous page, they can directly obtain it from the cache without reloading.

[0066] In summary, through page sorting and sequential loading, users can view and sign signature areas in the document's actual order, eliminating the tedious process of jumping back and forth within the document to find the signature location, significantly improving signing efficiency. This sequential loading mechanism ensures that users can smoothly view document content page by page during the signing process, reducing wait times and page switching delays. Users can work in a natural reading order, improving the overall user experience.

[0067] S105: The client dynamically generates a signature box on the page to be signed according to the location information of the signature area, and automatically scrolls to locate the signature box;

[0068] In this embodiment, the client dynamically generates a signature box on the page to be signed using signature area location information (e.g., coordinates, dimensions, etc.) obtained from the server. This location information is used to determine the specific location and size of the signature box on the page, ensuring that the signature box accurately covers the signature area. The client automatically scrolls the view to the location of the signature box using page scrolling control technology. Specifically, this is achieved by calculating the relative position of the signature box on the page and the current view, and then scrolling to position the signature box within the user's visible area.

[0069] It should be noted that when generating the signature box, the client will consider the overall layout of the page and the user interaction experience. The design of the signature box needs to be consistent with the page content and provide clear visual cues to guide users in signing.

[0070] In summary, the dynamic generation of the signature box and its automatic scrolling position reduces the time and steps required for users to manually locate their signature. Users no longer need to scroll back and forth on the page or search for the signature area; they can sign directly in the signature box, significantly improving signing efficiency. The automatic scrolling position function ensures that users can smoothly view and operate the signature area during the signing process, avoiding the inconvenience caused by page jumps or scrolling. The dynamic generation of the signature box and the clear visual cues also enhance the user's interactive experience with the document.

[0071] In one embodiment, if Figure 4 As shown, step S105 includes steps S401 to S402:

[0072] S401: Dynamically create a signature box on the page to be signed based on the location information of the signature area;

[0073] S402: Detect whether the signature box is within the visible area. If so, control page scrolling through the browser native API to position the signature box to the viewport of the visible area.

[0074] In this embodiment, the client uses the signature area location information (such as coordinates and dimensions) obtained from the server to dynamically create a signature box on the page to be signed. This information is used to determine the specific location and size of the signature box, ensuring that the signature box accurately covers the signature area. The client uses the browser-provided API (the Intersection Observer API is a browser-provided API that efficiently and asynchronously detects the intersection of a target element and the viewport) to detect whether the signature box is within the current visible area. This is achieved by calculating the relative position of the signature box to the browser viewport.

[0075] If the signature box is not in the visible area, the client controls the page scrolling through the browser's native API to scroll the signature box into the visible area. This scrolling operation can be smooth or instant, depending on the user experience design.

[0076] In summary, by dynamically creating a signature box and precisely laying it out based on its location, the signature box accurately covers the signature area, preventing users from signing in the wrong location. Detecting whether the signature box is within the visible area and positioning it within the viewport through page scrolling reduces the need for users to manually scroll the page, improving the smoothness and convenience of the signing process. Furthermore, the dynamic creation of the signature box and the automatic scrolling function provide users with clear visual cues and interactive guidance, helping them quickly locate the location they need to sign, reducing the possibility of operational errors.

[0077] In one embodiment, step S401 includes step S501:

[0078] S501. Create an HTML element of a corresponding size at a corresponding position on the page to be signed according to the coordinate information and size information of the signature area on the page to be signed, and generate a signature box according to the HTML element.

[0079] In this embodiment, the client determines the specific location and size of the signature box on the page to be signed based on the signature area's coordinate information (e.g., upper-left corner coordinates) and dimensions (e.g., width and height) obtained from the server. Specifically, JavaScript is used to dynamically create an HTML element and style it to match the signature area's coordinates and dimensions. This HTML element serves as the container for the signature box.

[0080] Next, set the CSS style for the created HTML element, including position, width, height, border, etc., to ensure that the signature box can be accurately displayed in the specified location on the page to be signed and has an appropriate appearance. Insert the created HTML element into the DOM structure of the page to be signed and bind it to the signature function, such as adding event listeners to handle user signature operations (such as mouse clicks or touch events).

[0081] In summary, by utilizing the signature area's coordinates and dimensions, the signature box appears precisely at the designated location on the page to be signed, and its size perfectly matches the signature area. This ensures that users can sign in the correct location, avoiding issues with inaccurate signature placement. Using HTML and CSS techniques to create the signature box allows for flexible customization to suit different document styles and user needs. For example, the signature box's color, border style, and transparency can be adjusted to enhance the visual effect.

[0082] S106. When the client monitors the signature action completion instruction corresponding to the signature box, it updates the signature status to signed, sends the signature status to the server, and dynamically renders the next page to be signed of the target PDF document.

[0083] In this embodiment, the client detects the user's signature completion instruction in the signature box through an event monitoring mechanism (such as monitoring mouse clicks, touch events, or other interactive events). Once the signature completion is detected, the client immediately updates the signature status to "Signed" and associates this status with the signature area to ensure the accuracy of the signature status. The client sends the updated signature status to the server via a network request (such as an HTTP POST or PUT request), ensuring that the server can obtain the latest signature status in real time. The server receives and processes the signature status update and stores it in a database for subsequent query and verification.

[0084] Furthermore, after completing the signature status update and status synchronization, the client dynamically renders the next page to be signed in the target PDF document based on the next signature area information (such as page number and location) returned by the server. If there are no more pages to be signed, the client can prompt the user to complete the signing or provide other operation options.

[0085] In summary, upon detecting the completion of a signature action, the client immediately updates the signature status and synchronizes it with the server, ensuring real-time and accurate signature status. This helps avoid signing errors or duplicate signatures caused by status desynchronization. After the client completes the signature status update, it automatically renders the next page to be signed, reducing manual steps for the user and improving the efficiency of the signing process. Users can sign multiple signature areas continuously without interruption.

[0086] In one embodiment, if Figure 5 As shown, in the step S106, before the dynamic rendering of the next page to be signed of the target PDF document, steps S601 to S602 are also included:

[0087] S601: Determine whether there is any signature box with an unsigned status on the page to be signed;

[0088] S602: If yes, automatically scroll to the next signature box of the page to be signed; if no, dynamically render the next page to be signed.

[0089] In this embodiment, after the client completes signing the current signature box, it traverses the status of all signature boxes on the current page to be signed to check whether there is a signature box whose signature status is still "unsigned". This is usually achieved by maintaining a signature box status list, which records the location and signing status of each signature box.

[0090] If there is an unsigned signature box in the current page to be signed, the client automatically scrolls the view to the next unsigned signature box through page scrolling control technology (such as Element.scrollIntoView or window.scrollTo) to ensure that the signature box enters the visible area.

[0091] If all signature boxes on the current page have been signed, the client triggers the dynamic rendering process of the next page to be signed. Specifically, the client obtains the signature area information of the next page to be signed from the server and renders the new page based on this information.

[0092] In one embodiment, if Figure 6 As shown, the PDF multi-page signing method based on dynamic rendering and automatic positioning further includes steps S110 to S120:

[0093] S110, obtaining the page number of the target PDF document that does not have a signature box;

[0094] S120: Keep all corresponding pages in the target PDF document in a dormant state according to the acquired page numbers without signature boxes.

[0095] In this embodiment, the client or server extracts all pages containing signature boxes from the signature area information of the PDF document. By comparing the total number of pages in the target PDF document, the pages without signature boxes are filtered out, generating a list of pages without signature boxes. Based on this list of pages without signature boxes, the client implements dormant state management for these pages. Pages in dormant state are not loaded or rendered unless actively triggered by the user. This state management can be implemented through page loading strategies, for example, loading the content of a specific page only when the user scrolls to that page.

[0096] In summary, by keeping pages without signature boxes dormant, the client can reduce unnecessary page loading and rendering operations, significantly reducing memory usage and CPU resource consumption. This is particularly effective when processing large PDF documents and can improve overall system performance. Furthermore, users no longer need to wait for irrelevant pages to load during the signing process, allowing them to locate the page they need to sign more quickly. This reduces waiting time and operation steps, improving signing efficiency and user experience.

[0097] In one embodiment, if Figure 7 As shown, the PDF multi-page signing method based on dynamic rendering and automatic positioning further includes steps S130 to S160:

[0098] S130. Upon receiving the signature status, the server updates the status of the signature box corresponding to the target PDF document in the database and returns the updated result to the client.

[0099] S140. After completing the signing actions in all signature boxes, the client sends a request to the server to generate a complete signed document;

[0100] S150: The server updates the signing status of the target PDF document in the database according to the request to generate a complete signed file, so as to generate a corresponding complete signed file in the database, obtain the corresponding file information from the database, and return it to the client;

[0101] S160: The client receives the file information.

[0102] In this embodiment, in step S130, the server receives a signature status update request from the client via the network. The request includes the identifier of the target PDF document and the signed signature box information. Based on the received signature status, the server updates the signature box status of the corresponding target PDF document in the database from "unsigned" to "signed." The server returns the updated signature status result to the client, confirming that the signature status has been successfully updated.

[0103] In step S140, after completing the signature operations in all signature boxes, the client sends a request to the server to generate a fully signed document. This request includes the identifier of the target PDF document, indicating that all signature operations have been completed. The server receives the request and prepares to proceed to the next step.

[0104] In step S150, the server updates the overall signing status of the target PDF document in the database based on the request to generate a complete signed file, and updates the document status from "not fully signed" to "fully signed". The server generates the corresponding complete signed file based on the updated signature status and document information. This may involve merging all signature information into the original PDF document to generate a new signed PDF file. The server obtains the information of the generated complete signed file from the database, including the file path, file name, file size, etc. The server returns the information of the complete signed file to the client so that the client can download or view the file.

[0105] In step S160, the client receives the complete signed file information returned by the server and confirms that the file has been successfully generated. The client can prompt the user to download the file, view the file, or perform other operations based on the returned file information.

[0106] In summary, the server updates the signature box status in the database, ensuring accurate and consistent recording of signature status. This provides reliable data support for subsequent signature verification and document management. After the client completes signing in all signature boxes, it promptly sends a request to the server to generate the fully signed document. The server quickly responds and generates the complete document, ensuring the efficiency of the signing process. Furthermore, after signing, the client can quickly obtain information about the fully signed document, reducing user wait time. Users can immediately download or view the signed document, improving the overall user experience.

[0107] like Figure 8 As shown, a flowchart of the principle of PDF multi-page signing method based on dynamic rendering and automatic positioning is provided, involving four parts: user, front-end page (client), back-end API service (server), and database. The following is a detailed analysis of the flowchart:

[0108] First, a user opens a PDF document to be signed through the client. The front-end page then requests detailed information about the PDF document from the back-end API service. The back-end API service retrieves the signature location data from the database based on the request and returns it to the front-end page. This data includes the location of each signature area and the page number on which it is located, arranged in sequential order.

[0109] The backend API service then returns the retrieved signature location information to the frontend page in a list. After receiving the list of signature locations, the frontend page renders the first signature page in the list. The frontend page automatically scrolls to the first signature location, allowing the user to begin signing.

[0110] Furthermore, the user performs a signature operation at the current location, and the front-end page detects that the user has completed the signature. The front-end page sends the signature completion information to the back-end API service and requests to update the signature status. After receiving the update request, the back-end API service updates the status of the corresponding signature box in the database to "signed" and returns the update result to the front-end page. The front-end page receives the update result and confirms that the update is successful. Next, the front-end page determines whether there are any unsigned signature positions on the current page. If so, the front-end page automatically scrolls to the next signature position, and the user continues the signing process. If not, the front-end page dynamically renders the next page to be signed and automatically scrolls to the first signature position on that page.

[0111] Finally, when all signature boxes are signed, the front-end page sends a request to the server to generate a fully signed document. Based on the request, the back-end API service updates the signing status of the target PDF document in the database and generates the corresponding fully signed document. The back-end API service retrieves the corresponding file information from the database and returns it to the front-end page. The front-end page receives the file information returned by the back-end API service, displays the signing completion status, and provides a download link for the file. The front-end page displays the signing completion status and provides the user with a download link.

[0112] The embodiment of the present invention also provides a PDF multi-page signing system based on dynamic rendering and automatic positioning, including: a server and a client;

[0113] The server is used to pre-store in a database the document identifier of each PDF document and detailed information of each signature area in each PDF document, wherein the detailed information includes the location information of the signature area and the page number where the signature area is located;

[0114] The client is configured to send an information acquisition request to the server upon receiving an instruction to open a target PDF document, wherein the information acquisition request includes a document identifier of the target PDF document;

[0115] The server is further configured to obtain detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and return the information to the client;

[0116] The client is further configured to dynamically render the page to be signed in the target PDF document where the signature area is located according to the page number where the signature area is located;

[0117] The client is further configured to dynamically generate a signature box on the page to be signed based on the location information of the signature area, and automatically scroll to locate the signature box;

[0118] The client is also used to update the signature status to signed when monitoring the signature action completion instruction corresponding to the signature box, send the signature status to the server, and dynamically render the next page to be signed of the target PDF document.

[0119] In one embodiment, the client includes:

[0120] A loading unit, configured to load the page to be signed where the signature area is located in the target PDF document through the PDF.js library;

[0121] A parsing unit, configured to parse the data content of the page to be signed using JavaScript;

[0122] The drawing unit is used to draw the data content of the page to be signed on the canvas of the web page.

[0123] The system dynamically renders only the pages containing the signature area in the target PDF document, avoiding the full loading of the entire PDF document, significantly reducing memory usage and rendering time, and thus improving the user experience. Furthermore, by automatically scrolling to the signature box position, the user's manual search for the signature area is reduced, the complexity of the operation is reduced, and the signing process is ensured to be accurate and efficient, greatly improving the signing efficiency. In addition, the client guides the user to sign one by one according to the detailed information of the signature area provided by the server, ensuring that the user will not miss any signature location, thereby ensuring the integrity and accuracy of the PDF document signing. At the same time, the dynamic loading of pages reduces the dependence on network bandwidth. Even in a weak network environment, users can smoothly perform the signing operation, avoiding the loss of progress due to network problems.

[0124] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with 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 terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can 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.

[0125] In the several embodiments provided herein, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the units described is merely a logical function division. In actual implementation, other division methods may be used. Units with the same function may also be combined into a single unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented.

[0126] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.

[0127] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0129] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A PDF multi-page signing method based on dynamic rendering and automatic positioning, characterized in that: include: The server pre-stores in the database the document identifier of each PDF document and detailed information of each signature area in each PDF document, the detailed information including the location information of the signature area and the page number where the signature area is located; When the client receives the instruction to open the target PDF document, it sends an information acquisition request to the server, wherein the information acquisition request includes the document identifier of the target PDF document; The server obtains detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and returns the information to the client; The client dynamically renders the page to be signed where the signature area is located in the target PDF document according to the page number where the signature area is located; The client dynamically generates a signature box on the page to be signed according to the position information of the signature area, and automatically scrolls to locate the signature box; When the client monitors the signature action completion instruction corresponding to the signature box, it updates the signature status to signed, sends the signature status to the server, and dynamically renders the next page to be signed of the target PDF document.

2. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 1 is characterized in that: The client dynamically renders the page to be signed in the target PDF document where the signature area is located according to the page number where the signature area is located, including: Load the page to be signed where the signature area is located in the target PDF document using the PDF.js library; Parsing the data content of the page to be signed through JavaScript; The data content of the page to be signed is drawn on the canvas of the web page.

3. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 2 is characterized in that: The step of loading the page to be signed in the target PDF document where the signature area is located by using the PDF.js library includes: Sort the page numbers where the signature area is located; The pages to be signed that are numbered first in the target PDF document are loaded sequentially using the PDF.js library.

4. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 1 is characterized in that: The client dynamically generates a signature box on the page to be signed according to the position information of the signature area, and automatically scrolls to locate the signature box, including: Dynamically create a signature box on the page to be signed according to the position information of the signature area; Detect whether the signature box is in the visible area. If so, control page scrolling through the browser native API to position the signature box to the viewport of the visible area.

5. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 4 is characterized in that: The location information of the signature area includes coordinate information and size information of the signature area on the page to be signed. The dynamically creating a signature box on the page to be signed based on the location information of the signature area includes: According to the coordinate information and size information of the signature area on the page to be signed, an HTML element of corresponding size is created at the corresponding position of the page to be signed, and a signature box is generated according to the HTML element.

6. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 1 is characterized in that: Before dynamically rendering the next page to be signed of the target PDF document, the method further includes: Determine whether there is any signature box with an unsigned status on the page to be signed; If yes, the process automatically scrolls to the next signature box of the page to be signed; otherwise, the process dynamically renders the next page to be signed.

7. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 1 is characterized in that: Also includes: Obtaining the page number of the target PDF document that does not have a signature box; All corresponding pages in the target PDF document are kept in a dormant state according to the acquired page numbers without the signature box.

8. The PDF multi-page signing method based on dynamic rendering and automatic positioning according to claim 1 is characterized in that: Also includes: Upon receiving the signature status, the server updates the status of the signature box corresponding to the target PDF document in the database and returns the updated result to the client; After completing the signing actions in all signature boxes, the client sends a request to the server to generate a complete signed document; The server updates the signing status of the target PDF document in the database according to the request to generate a complete signed document, so as to generate a corresponding complete signed document in the database, obtains the corresponding file information from the database, and returns it to the client; The client receives the file information.

9. A PDF multi-page signing system based on dynamic rendering and automatic positioning, characterized in that: include: Server and client; The server is used to pre-store in a database the document identifier of each PDF document and detailed information of each signature area in each PDF document, wherein the detailed information includes the location information of the signature area and the page number where the signature area is located; The client is configured to send an information acquisition request to the server upon receiving an instruction to open a target PDF document, wherein the information acquisition request includes a document identifier of the target PDF document; The server is further configured to obtain detailed information of each signature area of the target PDF document from the database according to the document identifier of the target PDF document, and return the information to the client; The client is further configured to dynamically render the page to be signed in the target PDF document where the signature area is located according to the page number where the signature area is located; The client is further configured to dynamically generate a signature box on the page to be signed based on the location information of the signature area, and automatically scroll to locate the signature box; The client is also used to update the signature status to signed when monitoring the signature action completion instruction corresponding to the signature box, send the signature status to the server, and dynamically render the next page to be signed of the target PDF document.

10. The PDF multi-page signing system based on dynamic rendering and automatic positioning according to claim 9, characterized in that: The client includes: A loading unit, configured to load the page to be signed where the signature area is located in the target PDF document through the PDF.js library; A parsing unit, configured to parse the data content of the page to be signed using JavaScript; The drawing unit is used to draw the data content of the page to be signed on the canvas of the web page.