OFD document saddle-seal signing method, device, electronic device and storage medium
By directly stamping the picture of the stitching seal in the OFD document and setting the cropping Clip attribute, the problem of inefficiency caused by the large amount of calculation of the signing of the stitching seal in the existing technology is solved, and a more efficient signing process is achieved.
Patent Information
- Application Number
- CN202411979340.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, OFD documents have a large amount of calculation during the signing of the stitch seal, resulting in inefficient signing.
By obtaining the OFD documents and pictures of the slit seal to be signed, determine the page group and designated locations that need to be stamped, directly stamp the slit seal when the number of pages is less than or equal to the preset threshold, and set the crop Clip attribute of the appearance of the seal to display some slit seal pictures, and finally digitally sign the OFD document.
It effectively reduces the amount of computing, improves the efficiency of signatures, and avoids the calculation amount and storage space problems caused by cropping and multiple digital signatures.
Smart Images

Figure CN119376846B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of saddle-seal signature, and in particular to an OFD document saddle-seal signature method, device, electronic equipment and storage medium. Background Art
[0002] In recent years, Open Fixed-layout Document (OFD) documents have been continuously promoted and applied in the fields of electronic invoices, electronic certificates, electronic contracts, electronic bidding, etc. In business applications, OFD documents often need to be electronically signed, and in some scenarios (such as bidding), the document needs to be signed with a saddle stamp.
[0003] In the related art, signing a saddle stamp requires cropping the seal image according to the number of pages of the OFD document, and then using the cropped seal image segments to stamp each page of the OFD document, and each signing involves a digital signature; cropping to generate multiple new images requires a large amount of computation, and if there are many page numbers, the cropped images may not be integer pixels or not enough to be segmented; at the same time, the signing method of the saddle stamp in the related art requires multiple digital signatures, and each signature requires a large amount of computation, and each signature result value needs to be stored separately, occupying a large storage space, resulting in a large expansion of the OFD document after signing.
[0004] It can be seen that the OFD document saddle-stamping method in the related art has a technical problem that the signing efficiency is affected due to the large amount of calculation in the process of signing the OFD document saddle-stamping. Summary of the invention
[0005] The present invention provides a method, device, electronic device and storage medium for signing an OFD document with a saddle seal, which are used to reduce the amount of calculation in the process of signing an OFD document with a saddle seal and improve the signing efficiency. The present invention solves the technical problem that the OFD document signing method with a saddle seal in the related art has a large amount of calculation in the process of signing an OFD document with a saddle seal, which affects the signing efficiency.
[0006] The invention provides an OFD document saddle seal signing method, comprising the following steps: obtaining an OFD document to be signed and a saddle seal image to be stamped on the OFD document to be signed; determining a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image; stamping the saddle seal image at the designated position of each page when the number of pages in the group of pages is less than or equal to a preset page threshold; setting the clipping attribute of the signature appearance StampAnnot of each page so that each page displays part of the saddle seal image, and digitally signing the OFD document to be signed to obtain a signed OFD document, wherein the part of the saddle seal image displayed on each page is sequentially combined according to the page number sequence of the group of pages to obtain the saddle seal image.
[0007] According to a method for signing an OFD document with a saddle seal provided by the present invention, after determining a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image, the method further comprises: when the number of pages in the group of pages is greater than a preset page threshold, determining the number of groups according to the number of pages in the group of pages; dividing the group of pages into multiple groups of pages according to the number of groups, wherein the number of pages in each group of pages in the multiple groups of pages is less than or equal to the preset page threshold; taking each group of pages in the multiple groups of pages as a target group page to execute preset steps to obtain a page corresponding to the target group of pages; The target group page has been signed. After executing the preset steps for each group of pages in the multiple groups of pages, the OFD document to be signed is digitally signed to obtain the signed OFD document; the preset steps include: stamping the interleaving seal image at a specified position on each page of the target group page; setting the Clip attribute of StampAnnot of each page of the target group page so that each page of the target group page displays part of the interleaving seal image to obtain the signed target group page, wherein the part of the interleaving seal image displayed on each page of the target group page is combined in sequence according to the page number order of the target group page to obtain the interleaving seal image.
[0008] According to a method for signing an OFD document with a saddle stamp provided by the present invention, determining the number of groups based on the number of pages in the group of pages includes: dividing the number of pages in the group of pages by the preset page threshold to obtain a target ratio; and determining the smallest integer greater than the target ratio as the number of groups.
[0009] According to a method for signing an OFD document with a saddle seal provided by the present invention, the setting of the clipping attribute of the signature appearance StampAnnot of each page so that each page displays part of the saddle seal image includes: determining an allocation ratio interval according to the number of pages in the group of pages; setting the Clip attribute of the StampAnnot of each page so that each page displays part of the saddle seal image, wherein the proportion of the part of the saddle seal image displayed on each page in the saddle seal image falls within the allocation ratio interval.
[0010] According to a method for signing an OFD document with a saddle stamp provided by the present invention, the allocation ratio interval is determined according to the number of pages in the group of pages, comprising: dividing 1 by the number of pages in the group of pages to obtain a value as the allocation ratio; multiplying the allocation ratio by 0.8 to obtain a value as the left endpoint value of the allocation ratio interval, and multiplying the allocation ratio by 1.2 to obtain a value as the right endpoint value of the allocation ratio interval.
[0011] According to an OFD document saddle seal signing method provided by the present invention, after setting the clipping attribute of the signature appearance StampAnnot of each page so that each page displays part of the saddle seal image, the method further includes:
[0012] In the case that the OFD document to be signed needs to be stamped with a batch seal, obtain the batch seal images that need to be stamped on the OFD document to be signed; determine a group of batch pages of the OFD document to be signed that need to be stamped with the batch seal images, and a designated position of each batch page that needs to be stamped with the batch seal images; stamp the batch seal images at the designated position of each batch page; set the Clip property of StampAnnot of each batch page so that each batch page displays all the batch seal images, and digitally sign the OFD document to be signed to obtain the signed OFD document.
[0013] The present invention also provides an OFD document saddle seal signing device, comprising the following modules: an acquisition module, used to acquire an OFD document to be signed and a saddle seal image that needs to be stamped on the OFD document to be signed; a determination module, used to determine a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image; a first execution module, used to stamp the saddle seal image at a designated position of each page when the number of pages in the group of pages is less than or equal to a preset page threshold; a second execution module, used to set the clipping attribute of the signature appearance StampAnnot of each page so that each page displays part of the saddle seal image, and digitally sign the OFD document to be signed to obtain a signed OFD document, wherein the part of the saddle seal image displayed on each page is sequentially combined in the page number order of the group of pages to obtain the saddle seal image.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned OFD document saddle-seal signing methods is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the OFD document saddle-stamping method as described above is implemented.
[0016] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements any of the above-mentioned OFD document saddle-seal signing methods.
[0017] The OFD document saddle seal signing method, device, electronic device and storage medium provided by the present invention obtain an OFD document to be signed and a saddle seal image to be stamped on the OFD document to be signed; determine a group of pages to be stamped with the saddle seal image and a designated position to be stamped with the saddle seal image on each page of the OFD document to be signed; stamp the saddle seal image at the designated position of each page when the number of pages in a group of pages is less than or equal to a preset page threshold; set the clipping attribute of the signature appearance StampAnnot of each page so that each page displays a part of the saddle seal image, and An FD document is digitally signed to obtain a signed OFD document, wherein the partial interline seal images displayed on each page are sequentially combined in the order of the page numbers of a group of pages to obtain the interline seal images; in the present invention, there is no need to crop the interline seal images, and by setting the clipping Clip property of the signature appearance StampAnnot of each page, so that each page displays a partial interline seal image, the amount of calculation is effectively reduced, thereby solving the technical problem of the OFD document interline seal signing method in the related art that the efficiency of signing is affected due to the large amount of calculation in the process of signing the interline seal of the OFD document. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. 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 creative work.
[0019] Figure 1 It is a flow chart of the OFD document saddle-seal signing method provided by the present invention.
[0020] Figure 2 It is one of the schematic diagrams of the OFD document saddle-seal signing method provided by the present invention.
[0021] Figure 3 This is the second schematic diagram of the OFD document saddle-seal signing method provided by the present invention.
[0022] Figure 4 This is the third schematic diagram of the OFD document saddle-seal signing method provided by the present invention.
[0023] Figure 5 This is the fourth schematic diagram of the OFD document saddle-seal signing method provided by the present invention.
[0024] Figure 6 It is a structural schematic diagram of the OFD document saddle-seal signing device provided by the present invention.
[0025] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] It should be noted that, in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0028] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0029] In recent years, Open Fixed-layout Document (OFD) documents have been continuously promoted and applied in the fields of electronic invoices, electronic certificates, electronic contracts, electronic bidding, etc. In business applications, OFD documents often need to be electronically signed, and in some scenarios (such as bidding), the document needs to be signed with a saddle stamp.
[0030] In the related art, signing a saddle stamp requires cutting the seal image according to the number of pages of the OFD document, and then using the cut seal image fragments to sign each page of the OFD document, and each signing involves a digital signature; cutting to generate multiple new images requires a large amount of calculation, and if there are many page numbers, the cut images may not be integer pixels or not enough to be cut; at the same time, the signing method of the saddle stamp in the related art requires multiple digital signatures, each signature requires a large amount of calculation, and each signature result value needs to be stored separately, occupying a large storage space, resulting in a large expansion of the OFD document after signing. It can be seen that the OFD document saddle stamp signing method in the related art has a technical problem that the signing efficiency is affected due to the large amount of calculation in the process of signing the OFD document.
[0031] In order to at least solve some of the above problems, the following Figure 1-Figure 7 The present invention describes the OFD document saddle-seal signing method, device, electronic device and storage medium provided by the present invention.
[0032] The OFD document saddle seal signing method provided in this embodiment can be applied to the scenario of signing an OFD document saddle seal. The OFD document saddle seal signing method in this embodiment can be executed by a signature system, and the signature system can be set in a server.
[0033] Figure 1 : is a flow chart of the OFD document saddle-seal signing method provided by the present invention, such as Figure 1 As shown, including but not limited to the following steps:
[0034] Step 101, obtaining the OFD document to be signed and the image of the saddle seal that needs to be stamped on the OFD document to be signed.
[0035] In this embodiment, the saddle seal image is an image of the saddle seal that needs to be stamped on the OFD document to be signed; preferably, the saddle seal image is a rectangular image.
[0036] Step 102, determining a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position of each page that needs to be stamped with a saddle seal image.
[0037] In this embodiment, which pages of the OFD document to be signed are stamped is pre-set according to the document content and requirements of the OFD document to be signed; preferably, the designated position of each page to be stamped with a saddle stamp image is located at the page edge of each page.
[0038] It should be noted that the saddle stamps include left saddle stamp, right saddle stamp, left and right saddle stamps, and top and bottom saddle stamps; left saddle stamp: when the document is bound on the right side, a saddle stamp is stamped on all pages on the left side; right saddle stamp: when the document is bound on the left side, a saddle stamp is stamped on all pages on the right side; left and right saddle stamps: if not bound, all pages are laid out in sequence from left to right, and a saddle stamp is stamped on the seam between every two pages; top and bottom saddle stamps: if not bound, all pages are laid out in sequence from top to bottom, and a saddle stamp is stamped on the seam between every two pages.
[0039] Step 103, when the number of pages in a group of pages is less than or equal to a preset page threshold, a saddle stamp image is stamped at a designated position of each page.
[0040] Step 104, set the clipping attribute of the signature appearance StampAnnot of each page so that each page displays a partial saddle stamp image, and digitally sign the OFD document to be signed to obtain a signed OFD document, wherein the partial saddle stamp image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the saddle stamp image.
[0041] Figure 2 1 is one of the schematic diagrams of the OFD document saddle-seal signing method provided by the present invention, such as Figure 2 As shown, Figure 2 The present invention describes a process in which, when signing a saddle seal, the saddle seal image needs to be cut and then each page needs to be signed with a seal fragment; the signature objects 1-3 represent the three pages that need to be signed with the saddle seal, and the seal fragment 1-3 represents that the saddle seal image is cut into three parts to obtain seal fragments 1-3. After the signature objects 1-3 are signed with seal fragments 1-3 respectively, a digital signature will be performed each time the signature is signed, thereby obtaining the signature result 1-3.
[0042] In this embodiment, when the number of pages in a group of pages is less than or equal to a preset page threshold, a saddle seal image is stamped at a specified position on each page, that is, the saddle seal image is not cut, and a complete saddle seal image is directly stamped at a specified position on each page, thereby effectively reducing the amount of calculation caused by cutting the saddle seal image.
[0043] Furthermore, the clipping Clip property of the seal appearance StampAnnot of each page is set so that each page displays a partial seal image, and the OFD document to be signed is digitally signed to obtain a signed OFD document, wherein the partial seal image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the seal image; here, the StampAnnot of each page is a document annotation type, which is used to represent the seal attributes in the document. StampAnnot contains a Clip attribute, and the Clip attribute is used to define the display area of the seal, and only the part within the clipping path is displayed; by setting the Clip property of the StampAnnot of each page, so that each page displays a partial seal image, the partial seal image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the seal image.
[0044] It should be noted that setting the Clip attribute of StampAnnot and the digital signature step of each page are carried out simultaneously. During the entire signing process, the OFD document only needs to be digitally signed once. After completing the signing process and the digital signature process for a group of pages of the OFD document to be signed, the signed OFD document is obtained. The StampAnnot and Clip attributes in this embodiment are only applicable to OFD documents.
[0045] Figure 3 Schematic diagram 2 of the OFD document saddle-seal signing method provided by the present invention, such as Figure 3 As shown, for signature objects 1-3, each signature object uses the same complete seal image (saddle seal image). For different signature objects, different parts of the seal image can be used. At the same time, only one digital signature is performed on signature objects 1-3 to generate a signature result.
[0046] When a group of pages has a large number of pages, if only one saddle seal is affixed, the pixels of the seal image allocated to each page may be small, resulting in the problem that the saddle seal image is difficult to distinguish; therefore, in this embodiment, when the number of pages in a group of pages is less than or equal to the preset page threshold, the saddle seal image is affixed to the designated position of each page, that is, when the number of pages in a group of pages is less than or equal to the preset page threshold, it is considered that the pixels of the saddle seal image allocated to each page are sufficient to be distinguishable, and therefore, the saddle seal image is directly affixed to the designated position of each page.
[0047] Through the embodiments provided by the present application, an OFD document to be signed and a saddle seal image that needs to be stamped on the OFD document to be signed are obtained; a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position of each page that needs to be stamped with a saddle seal image are determined; when the number of pages in a group of pages is less than or equal to a preset page threshold, a saddle seal image is stamped at a designated position of each page; the clipping attribute of the signature appearance StampAnnot of each page is set so that each page displays a portion of the saddle seal image, and the OFD document to be signed is digitally signed to obtain a signed OFD document, wherein the portion of the saddle seal image displayed on each page can be combined in sequence according to the page number order of a group of pages to obtain the saddle seal image; the OFD document saddle seal signing method in the related art is solved, in which the technical problem of affecting the signing efficiency due to the large amount of calculation in the process of signing the OFD document saddle seal is solved, and the signing efficiency is improved.
[0048] As an optional solution, after determining a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position where each page needs to be stamped with a saddle seal image, the method further includes:
[0049] S11, when the number of pages in a group of pages is greater than a preset page threshold, determining the number of groups according to the number of pages in the group of pages;
[0050] S12, dividing a group of pages into multiple groups of pages according to the number of groups, wherein the number of pages in each group of the multiple groups of pages is less than or equal to a preset page threshold;
[0051] S13, taking each group of pages in the multiple groups of pages as a target group page to execute preset steps, and obtaining a signed target group page corresponding to the target group page. After executing the preset steps for each group of pages in the multiple groups of pages, digitally signing the OFD document to be signed, and obtaining a signed OFD document;
[0052] The preset steps include:
[0053] Add a saddle stamp image at the designated location of each page of the target group;
[0054] The Clip property of StampAnnot of each page of the target group page is set so that each page of the target group page displays a partial saddle stamp image, and a signed target group page is obtained, wherein the partial saddle stamp image displayed on each page of the target group page is combined in sequence according to the page number order of the target group page to obtain the saddle stamp image.
[0055] In this embodiment, when the number of pages in a group of pages is greater than a preset page threshold, the number of groups is determined according to the number of pages in the group of pages; the number of pages in a group of pages is positively correlated with the number of groups.
[0056] A group of pages is divided into multiple groups of pages according to the number of groups, wherein the number of pages in each group of the multiple groups of pages is less than or equal to a preset page threshold; exemplarily, the preset page threshold is 20, and when the number of pages in a group of pages is 30, the number of groups is 2, and a group of pages is divided into multiple groups of pages according to the number of groups, that is, a group of pages can be divided into a first group and a second group, the number of pages in the first group is 15, and the number of pages in the second group is 15.
[0057] Each group of pages in the multiple groups of pages is used as a target group page to execute preset steps to obtain a signed target group page corresponding to the target group page. After executing the preset steps for each group of pages in the multiple groups of pages, the OFD document to be signed is digitally signed to obtain a signed OFD document.
[0058] The preset steps include: stamping a saddle stamp image at a designated position of each page of the target group page; setting the Clip property of StampAnnot of each page of the target group page so that each page of the target group page displays a portion of the saddle stamp image to obtain a signed target group page, wherein the portion of the saddle stamp image displayed on each page of the target group page is sequentially combined in the order of the page numbers of the target group page to obtain the saddle stamp image; through the preset steps, each group of pages in the multiple groups of pages can be stamped with the saddle stamp image.
[0059] Through this embodiment, a scheme for grouping a group of pages when the number of pages in a group is large is described, which improves the clarity of the saddle stamp on each page when the number of pages is large, thereby improving the reliability and stability of the OFD document saddle stamp signing method of this embodiment.
[0060] As an optional solution, the number of groups is determined according to the number of pages in a group of pages, including:
[0061] S21, dividing the number of pages in a group of pages by a preset page threshold to obtain a target ratio;
[0062] S22, determining the smallest integer greater than the target ratio as the number of groups.
[0063] Exemplarily, the number of pages in a group of pages is 30, the preset page threshold is 20, the number of pages in a group of pages is divided by the preset page threshold to obtain a target ratio of 1.5, and the smallest integer 2 greater than the target ratio of 1.5 is selected as the number of groups.
[0064] Through this embodiment, the specific steps of determining the number of groups according to the number of pages in a group of pages are described, which improves the accuracy of the determined number of groups, thereby improving the reliability and stability of the OFD document saddle-seal signing method of this embodiment.
[0065] As an optional solution, set the Clip property of the signature appearance StampAnnot of each page to display part of the saddle stamp image on each page, including:
[0066] S31, determining an allocation ratio interval according to the number of pages in a group of pages;
[0067] S32, setting the Clip property of StampAnnot of each page, so that each page displays a part of the interleaving stamp image, wherein the proportion of the part of the interleaving stamp image displayed on each page in the interleaving stamp image falls within the allocated proportion range.
[0068] In this embodiment, when stamping the upper and lower saddle seals or the left and right saddle seals, a random number can be used to allow the distribution ratio of the saddle seals on the two pages to float within a certain range, so as to prevent the problem that when the saddle seal images are evenly distributed, the saddle seals on the two pages before and after one page can be deleted and still match up.
[0069] In this embodiment, the allocation ratio interval is determined according to the number of pages in a group of pages, and the proportion of the partial interline seal picture displayed on each page in the interline seal picture falls within the allocation ratio interval. The proportion of the partial interline seal picture displayed on each page in the interline seal picture can fluctuate randomly within the allocation ratio interval, thereby avoiding the problem of aligning the interline seals of the two pages before and after deleting one page when stamping the upper and lower interline seals or the left and right interline seals.
[0070] Optionally, the proportion of some interleaving seal images on two adjacent pages can be allocated, and random numbers can be used to make the distribution ratio of the interleaving seal images on the two pages float within a certain range, such as 40%-60%, to prevent the interleaving seal images on the two pages from being evenly distributed at 50%.
[0071] Through this embodiment, the proportion of the partial interline seal image displayed on each page in the interline seal image is limited, which can improve the reliability and accuracy of the OFD document interline seal signing method of this embodiment.
[0072] As an optional solution, the allocation ratio interval is determined according to the number of pages in a group of pages, including:
[0073] S41, dividing 1 by the number of pages in a group of pages to obtain a value as an allocation ratio;
[0074] S42, multiplying the allocation ratio by 0.8 to obtain a value as the left endpoint value of the allocation ratio interval, and multiplying the allocation ratio by 1.2 to obtain a value as the right endpoint value of the allocation ratio interval.
[0075] Exemplarily, when the number of pages in a group of pages is 20, dividing 1 by the number of pages in a group of pages obtains a distribution ratio of 0.05, multiplying the distribution ratio by 0.8 obtains a value that is used as the left endpoint value of the distribution ratio interval, 0.04, and multiplying the distribution ratio by 1.2 obtains a value that is used as the right endpoint value of the distribution ratio interval, 0.06; that is, the proportion of the partial interline seal image displayed on each page in the interline seal image is in the range of 0.04-0.06.
[0076] Through this embodiment, the specific steps of determining the allocation ratio interval according to the number of pages in a group of pages are described, thereby improving the reliability and stability of the OFD document saddle-seal signing method of this embodiment.
[0077] As an optional solution, after setting the clipping attribute of the stamp appearance StampAnnot of each page so that each page displays a part of the saddle stamp image, the method further includes:
[0078] S51, when the OFD document to be signed needs to be stamped with batch seals, obtaining batch seal images that need to be stamped with the OFD document to be signed;
[0079] S52, determining a group of batch pages of the OFD document to be signed that need to be stamped with a batch signature image, and a designated position of each batch page that needs to be stamped with a batch signature image;
[0080] S53, stamping a batch signature image at a designated position on each batch page;
[0081] S54, setting the Clip property of StampAnnot of each batch page so that each batch page displays all batch seal images, and digitally signing the OFD document to be signed to obtain a signed OFD document.
[0082] In this embodiment, batch stamping refers to stamping a complete batch stamp on part or all pages of a document page by page.
[0083] Figure 4 This is the third schematic diagram of the OFD document saddle-seal signing method provided by the present invention, see Figure 4 , Figure 4 The document describes the signing and signing process of related technologies when signing batch signatures. The signature objects 1-3 represent different pages, the seal image copies 1-3 represent the same batch seal images, and the seal results 1-3 represent that each time a signature is made, a digital signature needs to be made synchronously to obtain the signature result. The batch signature technology in the related technology requires a digital signature for each batch signature, and the signing speed and subsequent seal verification speed are slow. In addition, multiple signatures require the storage of multiple signature result data and multiple batch seal images, which take up a lot of space and cause a large file size after signing.
[0084] In this embodiment, in order to solve the above problems, when the OFD document to be signed needs to be stamped with a batch seal, the batch seal images that need to be stamped on the OFD document to be signed are obtained; a group of batch pages of the OFD document to be signed that need to be stamped with the batch seal images, and the designated positions of each batch page that need to be stamped with the batch seal images are determined; the batch seal images are stamped at the designated positions of each batch page; the Clip property of the StampAnnot of each batch page is set so that each batch page displays all the batch seal images, and the OFD document to be signed is digitally signed to obtain a signed OFD document.
[0085] Figure 5 Schematic diagram of the OFD document saddle-seal signing method provided by the present invention is shown in FIG. Figure 5 As shown, all pages in this embodiment share the same signature result and the same picture after being stamped with batch seals, which can effectively save storage space.
[0086] It should be noted that, in this embodiment, when batch signatures and saddle seals need to be signed simultaneously, when the batch signatures and saddle seals are completed, only one digital signature needs to be performed simultaneously to obtain the signed OFD document.
[0087] Through this embodiment, the signing process in the case where batch signing and saddle stamping exist at the same time is described, which improves the reliability and stability of the OFD document saddle stamping method of this embodiment.
[0088] Optionally, when a left or right saddle seal is affixed, the display ratio of the saddle seal on the first and last pages can be adjusted separately to ensure that the text of the saddle seal can appear in the saddle seals of the first and last pages, avoiding the risk of the first and last pages being replaced after printing when only the saddle seal boundary line appears on the first and last pages.
[0089] Optionally, the signature system in this embodiment provides a control switch for double-sided printing. When printing on one side, all pages are stamped with a saddle stamp; when printing on both sides, only odd pages or even pages are stamped with a saddle stamp.
[0090] Optionally, after obtaining the signed OFD document, during subsequent document parsing, multiple signature objects are created based on multiple StampAnnots, and each signature object can be clicked for interactive verification.
[0091] Figure 6 : is a structural schematic diagram of the OFD document saddle-seal signing device provided by the present invention, such as Figure 6 As shown, including but not limited to the following modules:
[0092] An acquisition module 601 is used to acquire the OFD document to be signed and the image of the saddle seal that needs to be stamped on the OFD document to be signed;
[0093] The determination module 602 is used to determine a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position of each page that needs to be stamped with a saddle seal image;
[0094] The first execution module 603 is used to stamp a saddle stamp image at a designated position of each page when the number of pages in a group of pages is less than or equal to a preset page threshold;
[0095] The second execution module 604 is used to set the clipping attribute of the signature appearance StampAnnot of each page so that each page displays a partial saddle stamp image, and digitally sign the OFD document to be signed to obtain a signed OFD document, wherein the partial saddle stamp image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the saddle stamp image.
[0096] Through the embodiments of the present application, an OFD document to be signed and a saddle seal image that needs to be stamped on the OFD document to be signed are obtained; a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position of each page that needs to be stamped with a saddle seal image are determined; when the number of pages in a group of pages is less than or equal to a preset page threshold, a saddle seal image is stamped at a designated position of each page; the clipping attribute of the signature appearance StampAnnot of each page is set so that each page displays a portion of the saddle seal image, and the OFD document to be signed is digitally signed to obtain a signed OFD document, wherein the portion of the saddle seal image displayed on each page can be combined in sequence according to the page number order of a group of pages to obtain the saddle seal image; the OFD document saddle seal signing method in the related art is solved, and the technical problem of affecting the signing efficiency due to the large amount of calculation in the process of signing the OFD document saddle seal is solved, thereby improving the signing efficiency.
[0097] It should be noted that the OFD document saddle-stamp signing device provided by the present invention can execute the OFD document saddle-stamp signing method of any of the above-mentioned embodiments during specific operation, which will not be elaborated in this embodiment.
[0098] Figure 7 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 7As shown, the electronic device may include: a processor (processor) 710 , a communication interface (Communications Interface) 720 , a memory (memory) 730 and a communication bus 740 , wherein the processor 710 , the communication interface 720 , and the memory 730 communicate with each other through the communication bus 740 . The processor 710 can call the logic instructions in the memory 730 to execute the OFD document saddle stamp signing method, which includes: obtaining the OFD document to be signed and the saddle stamp image that needs to be stamped on the OFD document to be signed; determining a group of pages of the OFD document to be signed that need to be stamped with the saddle stamp image, and the designated position of each page that needs to be stamped with the saddle stamp image; when the number of pages in a group of pages is less than or equal to a preset page threshold, stamping the saddle stamp image at the designated position of each page; setting the clipping Clip property of the signature appearance StampAnnot of each page so that each page displays a part of the saddle stamp image, and digitally signing the OFD document to be signed to obtain a signed OFD document, wherein the part of the saddle stamp image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the saddle stamp image.
[0099] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0100] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the OFD document saddle seal signing method provided by the above-mentioned embodiments, the method including: obtaining the OFD document to be signed and the saddle seal image that needs to be stamped on the OFD document to be signed; determining a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image; when the number of pages in a group of pages is less than or equal to a preset page threshold, stamping the saddle seal image at the designated position of each page; setting the clipping Clip property of the signature appearance StampAnnot of each page so that each page displays a part of the saddle seal image, and digitally signing the OFD document to be signed to obtain a signed OFD document, wherein the part of the saddle seal image displayed on each page is combined in sequence according to the page number order of a group of pages to obtain the saddle seal image.
[0101] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the OFD document saddle seal signing method provided in the above-mentioned embodiments, the method comprising: obtaining an OFD document to be signed and a saddle seal image that needs to be stamped on the OFD document to be signed; determining a group of pages of the OFD document to be signed that need to be stamped with a saddle seal image, and a designated position of each page that needs to be stamped with a saddle seal image; when the number of pages in a group of pages is less than or equal to a preset page threshold, stamping the saddle seal image at the designated position of each page; setting the clipping Clip property of the signature appearance StampAnnot of each page so that each page displays a portion of the saddle seal image, and digitally signing the OFD document to be signed to obtain a signed OFD document, wherein the portion of the saddle seal image displayed on each page is sequentially combined in the order of the page numbers of a group of pages to obtain the saddle seal image.
[0102] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0103] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for signing an OFD document with a saddle seal, characterized in that: include: Obtain an OFD document to be signed and an image of a saddle stamp to be stamped on the OFD document to be signed; Determine a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image; When the number of pages in the group of pages is less than or equal to a preset page threshold, stamping the interlineation seal image at a designated position of each page; The clipping property of the signature appearance StampAnnot of each page is set so that each page displays part of the saddle seal image, and the OFD document to be signed is digitally signed to obtain a signed OFD document, wherein the part of the saddle seal image displayed on each page is combined in sequence according to the page number order of the group of pages to obtain the saddle seal image.
2. The OFD document saddle-seal signing method according to claim 1, characterized in that: After determining a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image, the method further includes: When the number of pages in the group of pages is greater than a preset page threshold, determining the number of groups according to the number of pages in the group of pages; Dividing the group of pages into multiple groups of pages according to the number of groups, wherein the number of pages in each group of the multiple groups of pages is less than or equal to the preset page threshold; Performing preset steps on each group of pages in the multiple groups of pages as a target group page to obtain a signed target group page corresponding to the target group page, and after performing the preset steps on each group of pages in the multiple groups of pages, digitally signing the OFD document to be signed to obtain the signed OFD document; The preset steps include: Stamping the interleaving seal image at a designated position of each page of the target group of pages; The Clip property of StampAnnot of each page of the target group page is set so that each page of the target group page displays part of the interleaving seal image, and the signed target group page is obtained, wherein the part of the interleaving seal image displayed on each page of the target group page is combined in sequence according to the page number order of the target group page to obtain the interleaving seal image.
3. The OFD document saddle seal signing method according to claim 2, characterized in that: The determining the number of groups according to the number of pages in the group of pages comprises: Dividing the number of pages in the group of pages by the preset page threshold to obtain a target ratio; The smallest integer greater than the target ratio is determined as the grouping number.
4. The OFD document saddle-seal signing method according to claim 1, characterized in that: The step of setting the clipping attribute of the stamp appearance StampAnnot of each page so that each page displays a portion of the saddle stamp image includes: Determining an allocation ratio interval according to the number of pages in the group of pages; The Clip property of StampAnnot of each page is set so that each page displays a portion of the interleaved stamp image, wherein the proportion of the portion of the interleaved stamp image displayed on each page in the interleaved stamp image falls within the allocation ratio range.
5. The OFD document saddle seal signing method according to claim 4, characterized in that: The step of determining the allocation ratio interval according to the number of pages in the group of pages includes: A value obtained by dividing 1 by the number of pages in the group of pages is determined as an allocation ratio; The value obtained by multiplying the allocation ratio by 0.8 is used as the left endpoint value of the allocation ratio interval, and the value obtained by multiplying the allocation ratio by 1.2 is used as the right endpoint value of the allocation ratio interval.
6. The OFD document saddle-seal signing method according to any one of claims 1 to 5, characterized in that: After setting the clipping attribute of the stamp appearance StampAnnot of each page so that each page displays part of the saddle stamp image, the method further includes: In the case that the OFD document to be signed needs to be stamped with batch seals, obtaining batch seal images that need to be stamped with the OFD document to be signed; Determine a group of batch pages of the OFD document to be signed that need to be stamped with the batch signature image, and a designated position of each batch page that needs to be stamped with the batch signature image; Stamping the batch signature image at a designated location on each batch page; The Clip property of StampAnnot of each batch page is set so that each batch page displays all the batch seal images, and the OFD document to be signed is digitally signed to obtain the signed OFD document.
7. An OFD document saddle-seal signing device, characterized in that: include: An acquisition module is used to acquire the OFD document to be signed and the image of the saddle seal that needs to be stamped on the OFD document to be signed; A determination module is used to determine a group of pages of the OFD document to be signed that need to be stamped with the saddle seal image, and a designated position of each page that needs to be stamped with the saddle seal image; A first execution module is used for stamping the interleaving seal image at a designated position of each page when the number of pages in the group of pages is less than or equal to a preset page threshold; The second execution module is used to set the clipping attribute of the signature appearance StampAnnot of each page so that each page displays part of the saddle seal image, and digitally signs the OFD document to be signed to obtain a signed OFD document, wherein the part of the saddle seal image displayed on each page is combined in sequence according to the page number order of the group of pages to obtain the saddle seal image.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the OFD document saddle-seal signing method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the OFD document saddle-seal signing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the OFD document saddle-seal signing method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
OFD quick signing method
CN111832081A
Method for converting OFD file into PDF file
CN116432609A