Method for stamping paging seal, storage medium, electronic equipment and product
By determining the coordinates of the annotated rectangles and composite external boxes in PDF documents and obtaining the translation matrix, efficient stamping of the seam stamp is achieved, solving the problems of low stamping efficiency and increased file size in the existing technology, and improving business performance .
Patent Information
- Application Number
- CN202411536931.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is inefficient when stamping a stitch, especially when processing multi-page files, the operation is cumbersome and the file size increases.
By determining the marked rectangular coordinates of the stamped seal in the PDF document, calculating the coordinates of the composite external frame, and obtaining the translation matrix of the non-home page, efficient stamping of the stamped seal is achieved, and image segmentation processing is avoided.
Improves the efficiency of stamping the seam seal, reduces file size, and improves business signing and archive performance.
Smart Images

Figure CN119478133A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic signatures, and in particular to a method for stamping a saddle stamp, a storage medium, an electronic device and a product. Background Art
[0002] The interleaving seal is mainly used for multi-page contracts, archives and other documents. The interleaving seal should cover all pages of the current document. After the interleaving seal is applied, each page of the document has a partial seal and no page should be missed. If all the pages of this document are unfolded and lined up, the interleaving seal can be pieced together into one or more complete seals.
[0003] At present, when stamping the interleaving seal, a segmentation module and a loading module are designed; the segmentation module is used to segment the complete seal once or multiple times according to the layout of the electronic file; the loading module is used to load the segmented interleaving seal into the set position of each page of the electronic file, thus completing the stamping of the interleaving seal. However, the interleaving seal of each page must be obtained by the segmentation module after the seal is processed by the image. If the number of pages in the file is large, the operation of stamping the interleaving seal is very cumbersome and the stamping efficiency is very low.
[0004] Therefore, how to provide a technical solution for an efficient method of adding a saddle seal becomes a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of some embodiments of the present application is to provide a method, storage medium, electronic device and product for stamping a saddle seal. Through the technical solutions of the embodiments of the present application, the stamping efficiency can be improved while ensuring the accuracy of stamping a saddle seal.
[0006] In a first aspect, some embodiments of the present application provide a method for stamping a perm seal, comprising: determining the coordinates of a marked rectangle in a PDF document on which a perm seal is stamped, wherein the marked rectangles include: a first page marked rectangle and a non-first page marked rectangle; based on the marked rectangles, calculating the coordinates of a composite bounding box of the perm seal, wherein the composite bounding box includes: a first page composite bounding box and a non-first page composite bounding box, and the composite bounding box has the same size as the marked rectangle; obtaining a translation matrix of the perm seal in the non-first page of the PDF document; translating the perm seal in the non-first page composite bounding box according to the translation matrix to obtain a display result of the perm seal.
[0007] Some embodiments of the present application determine the coordinates of the marked rectangle of the interleaving seal in the PDF document, and then determine the coordinates of the composite external frame of the same size; then obtain the translation matrix of the interleaving seal in the non-first page; finally, translate the interleaving seal in the composite external frame of the non-first page according to the translation matrix to obtain the display result of the interleaving seal on each page. Some embodiments of the present application implement the interleaving seal by calculating the relevant coordinates and translating the interleaving seal, which can ensure the accuracy of the interleaving seal and improve the efficiency of the sealing.
[0008] In some embodiments, before determining the coordinates of the annotated rectangle of the saddle seal in the PDF document, the method further includes: obtaining page parameters of the PDF document and seal parameters of the saddle seal; wherein the page parameters include: the number of document pages, page width, and page height; the seal parameters include: the seal height of the saddle seal, the proportion of the saddle seal on the first page of the PDF document, and the image width and image height of the seal image corresponding to the saddle seal.
[0009] Some embodiments of the present application provide data support for the accuracy and efficiency of subsequent interleaving stamping by acquiring page parameters and seal parameters.
[0010] In some embodiments, the coordinates of the marked rectangle are related to the page parameters and the stamp parameters, and the coordinates include: the coordinates of the lower left corner and the upper right corner of the marked rectangle.
[0011] Some embodiments of the present application determine the coordinates of the annotation rectangle through page parameters and seal parameters, providing accurate data support for the stamping of the interline seal.
[0012] In some embodiments, the coordinates of the composite circumscribed frame include: the coordinates of the lower left corner and the upper right corner of the composite circumscribed frame; wherein the lower left corner is the origin of the composite coordinate system where the composite circumscribed frame is located, and the coordinates of the upper right corner are related to the seal parameters.
[0013] Some embodiments of the present application determine the coordinates of the composite external frame through seal parameters, providing accurate data support for the stamping of the interline seal.
[0014] In some embodiments, obtaining the translation matrix of the saddle seal in the non-first page of the PDF document includes: determining the translation parameter of the saddle seal on the i-th page in the PDF document, where i is a positive integer, and when i=1, the i-th page is the next page of the PDF document; and determining the translation matrix of the i-th page based on the translation parameter.
[0015] Some embodiments of the present application determine the corresponding translation matrix by determining the translation parameters of the i-th page, so as to ensure the accuracy of the interline stamping.
[0016] In some embodiments, translating the interleaving seal in the non-first page composite external frame according to the translation matrix to obtain the display result of the interleaving seal includes: performing a translation operation on the interleaving seal in the composite external frame of the i-th page according to the translation matrix of the i-th page to obtain the display result of the interleaving seal on the i-th page.
[0017] Some embodiments of the present application translate the interleaving seal through a translation matrix on each page to obtain a display result of the interleaving seal on each page, which can improve the efficiency of adding the interleaving seal.
[0018] In some embodiments, the method further includes: determining a display result of marking a rectangle of the interline seal on the first page according to the proportion of the first page.
[0019] Some embodiments of the present application display the results of the interleaving seal of the home page by the proportion of the home page to ensure the accuracy of the displayed results.
[0020] In a second aspect, some embodiments of the present application provide a device for stamping a perm seal, comprising: a marking module, used to determine the coordinates of a marking rectangle in a PDF document on which a perm seal is stamped, wherein the marking rectangle includes: a first page marking rectangle and a non-first page marking rectangle; a composite processing module, used to calculate the coordinates of a composite external frame of the perm seal based on the marking rectangle, wherein the composite external frame includes: a first page composite external frame and a non-first page composite external frame, and the composite external frame has the same size as the marking rectangle; an acquisition module, used to acquire a translation matrix of the perm seal in the non-first page of the PDF document; a translation module, used to translate the perm seal in the non-first page composite external frame according to the translation matrix to obtain a display result of the perm seal.
[0021] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0022] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.
[0023] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product comprises a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 A system diagram for adding a saddle seal to some embodiments of the present application;
[0026] Figure 2 One of the flow charts of the method for stamping the perforation provided in some embodiments of the present application;
[0027] Figure 3 A schematic diagram of seal image parameters provided for some embodiments of the present application;
[0028] Figure 4 Schematic diagram of page and stamp parameters provided for some embodiments of the present application;
[0029] Figure 5 A schematic diagram of the proportion of interline seals provided for some embodiments of the present application;
[0030] Figure 6 A schematic diagram of translation of a saddle seal on a second page provided in some embodiments of the present application;
[0031] Figure 7 A schematic diagram of the display ratio of the first page interlineation seal provided in some embodiments of the present application;
[0032] Figure 8 Flow chart 2 of the method for affixing a saddle seal provided for some embodiments of the present application;
[0033] Fig. 9 A block diagram of the device for stamping a saddle seal provided in some embodiments of the present application;
[0034] Fig.10 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0035] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0036] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0037] In the related technology, three types of saddle seals are currently commonly used: right saddle seal, left saddle seal and center saddle seal. The saddle seal should cover all pages of the current document, so as to prevent the contract from being replaced, deleted or added during the signing process or binding process, proving the authenticity, validity and integrity of the contract, thereby avoiding unnecessary troubles, disputes and losses caused by changing or denying the content of the contract.
[0038] Although the existing technology has solved the problem of seal segmentation and stamping each page, the stamp on each page must be obtained by the segmentation module after image processing of the seal. If a document with hundreds of pages is to be stamped with a stamp, the seal must be processed hundreds of times. However, the segmentation operation of the seal image must first parse the image data, and then the RGB and Alpha data must be processed accordingly during each segmentation process, which is quite cumbersome and greatly affects the efficiency of stamping the seal. In addition, the image data after each segmentation and the appearance description stream data information must be saved in the signed PDF document, resulting in the file byte size after stamping the seal being much larger than the original file.
[0039] It can be seen from the above-mentioned related technologies that the efficiency of the existing solution for stamping the perforated seal needs to be improved, and the memory size occupied by the PDF document stamped with the perforated seal needs to be improved.
[0040] In view of this, some embodiments of the present application provide a method for stamping a perforated seal, which first calculates the coordinates of the marked rectangle of the position where the perforated seal is stamped in the PDF document, and then calculates the coordinates of the composite external frame BBox based on the size of the marked rectangle to ensure that the width and height of the perforated seal on each page are displayed correctly. The appearance dictionary AP of the perforated seal is described using a composite XObject; wherein the composite XObject uses BBox to define the rectangular frame range of the appearance. Only one resource object of a complete seal image is created in the entire PDF document, and this resource object is referenced in the Resource in the composite XObject of all perforated seals. Finally, through the translation matrix, the seal image is subjected to a matrix translation operation in the composite rectangular frame set by BBox to obtain the display effect of the perforated seal. The embodiments of the present application achieve the effect of stamping a perforated seal without segmenting the image, thereby improving the stamping efficiency of the perforated seal and reducing the byte size of the PDF document.
[0041] The following is combined with Figure 1 The overall composition structure of the system for stamping a saddle seal provided in some embodiments of the present application is exemplified.
[0042] like Figure 1As shown, some embodiments of the present application provide a system for stamping a perforated seal, and the method for stamping a perforated seal may include: a terminal 100 and a server 200. Among them, the terminal 100 can send the PDF document that needs to be stamped to the server 200. The server 200 calculates the coordinates of the marked rectangle for stamping the perforated seal, and then calculates the BBox value of the same size (as a specific example of the coordinates of the composite external frame). After that, the PDF document displays the stamping effect of the first page according to the proportion of the seal on its first page; by obtaining the translation matrix of the non-first page, the seal image is translated on the corresponding page according to the translation distance to obtain the stamping effect of the perforated seal of the non-first page.
[0043] In some embodiments of the present application, the terminal 100 may be a mobile terminal or a non-portable computer terminal, which is not specifically limited in the embodiments of the present application.
[0044] In other embodiments of the present application, if the terminal 100 has the function of calculating the coordinates of the marked rectangle and the composite bounding box by the server 200, and determining the translation matrix and moving the seal image corresponding to the saddle seal according to the translation matrix, the server 200 may not be set. Specifically, it can be selected according to the actual application scenario, and the embodiment of the present application is not specifically limited here.
[0045] The following is combined with Figure 2 The implementation process of affixing a saddle seal performed by the server 200 provided in some embodiments of the present application is exemplified.
[0046] Please see attached Figure 2 , Figure 2 A flow chart of a method for affixing a saddle stamp is provided for some embodiments of the present application.
[0047] It should be noted that in actual business scenarios, the calculation of the process of stamping multiple pages is quite complicated. In order to facilitate the description of the principle of efficient stamping of the saddle seal proposed in the embodiment of the present application, a relatively simple scenario that can clearly illustrate the present solution is used as an example, that is, the saddle seal of the subsequent pages (that is, non-first page) does not need to be segmented from a complete seal image, and the remaining part of the seal image of the first page can be used to stamp it, and each page is an evenly segmented image; in addition, there is no need to leave blank space on the left or right side of the saddle seal, and it can be directly stamped to the edge of the page.
[0048] In some embodiments of the present application, before executing S210, the method of stamping a saddle seal may include: obtaining page parameters of the PDF document and seal parameters of the saddle seal; wherein the page parameters include: the number of document pages, page width, and page height; the seal parameters include: the seal height of the saddle seal, the proportion of the saddle seal on the first page of the PDF document, and the image width and image height of the seal image corresponding to the saddle seal.
[0049] For example, in one embodiment, the number of pages of a PDF document is n, and the page width and page height are Px and Py respectively. The height of the interline seal is h, the first page accounts for a%, and the width and height of the complete seal image displayed on the page are x and y respectively (such as Figure 3 As shown in the stamp image). Figure 4 The schematic diagram of page parameters and stamp parameters of a PDF document is shown, where n = 4. The specific value of a% can be selected according to the actual application scenario of stamping, and is not specifically limited in the embodiment of the present application.
[0050] The above process is explained below as an example.
[0051] In some embodiments of the present application, the method of stamping the perforation seal may include:
[0052] S210, determining the coordinates of the annotation rectangles with the saddle stamp in the PDF document, wherein the annotation rectangles include: the first page annotation rectangle and the non-first page annotation rectangle. The coordinates of the annotation rectangles are related to the page parameters and the stamp parameters, and the coordinates include: the coordinates of the lower left corner and the upper right corner of the annotation rectangle.
[0053] It should be understood that in the PDF specification, the annotation rectangle Rect belongs to rectangle: it is a specific array object used to describe the position on the page and the borders of various objects. It can be written as an array containing 4 numbers, which specify the coordinates of the two diagonal vertices, usually in the form of [llx lly urx ury] to specify the lower left corner horizontal coordinate, lower left corner vertical coordinate, upper right corner horizontal coordinate and upper right corner vertical coordinate of the annotation rectangle in sequence.
[0054] For example, in some embodiments of the present application, the values of the parameters in the first page marking rectangle Rect of the first page saddle seal are: llx1=Px-(x*a%), lly1=hy / 2, urx1=Px, ury1=h+y / 2.
[0055] The calculation of the non-first page annotation rectangle Rect of the interleaving seal of the subsequent pages is as follows: First, calculate the proportion of the interleaving seal on each subsequent page b%, b% = (1-a%) / (n-1). Since the interleaving seals of the subsequent pages are all proportionally cut to remove the seal images remaining after the first page seal is removed, the Rect of each subsequent page is the same. The values of the various parameters in the Rect of the subsequent pages are: llx2 = Px-(x*(1-a%) / (n-1)), lly2 = hy / 2, urx2 = Px, ury2 = h+y / 2.
[0056] It is understandable that in practical applications, the internal algorithm strategy can be flexibly adjusted, for example, by adjusting the proportion of the home page to a%, so as to ensure that the proportion of the interleaving seal on each page is b%, so as to achieve equal-proportion segmentation of the seal image. The values of a and b can be flexibly adjusted, and the embodiments of the present application are not specifically limited here.
[0057] In order to avoid the need for the segmentation module to process the seal image before obtaining the interleaving seal on each page, the Resource of the composite XObject of the interleaving seal on each page in the embodiment of the present application references the same complete seal image, so it is necessary to perform specific calculations on the BBox value and CTM (as a specific example of the translation matrix).
[0058] It should be understood that in the PDF specification, the BBox of a composite XObject is an array of four values in a composite coordinate system, which provide the coordinates of the left, bottom, right, and top edges of the composite XObject's bounding box. These boundaries are used to clip the composite XObject and determine its apparent size. This BBox has a certain relationship with the annotation rectangle Rect, that is, the width and height of the annotation rectangle Rect must be in the same ratio as the width and height of the BBox, so as to ensure that the effect of the saddle seal is displayed correctly on the page. The CTM of a composite XObject is a transformation matrix (that is, a translation matrix) used to translate the image in the composite coordinate system.
[0059] S220, based on the marked rectangle, calculate the coordinates of the composite external frame of the interleaved seal, wherein the composite external frame includes: a composite external frame of the first page and a composite external frame of the non-first page, and the composite external frame has the same size as the marked rectangle. The coordinates of the composite external frame include: the coordinates of the lower left corner and the upper right corner of the composite external frame; wherein the lower left corner is the origin of the composite coordinate system where the composite external frame is located, and the coordinates of the upper right corner are related to the seal parameters.
[0060] For example, in some embodiments of the present application, since the value of BBox is a value in a composite coordinate system, its lower left corner is the origin. At this time, the values of the parameters in the value of the homepage BBox are: 11x B1 =0,lly B1=0,urx B1 =x*a%,ury B1 =y.
[0061] The calculation of the non-first page BBox value of the interleaving seal of the subsequent pages is as follows: Since it is a value in a composite coordinate system, the lower left corner of the BBox is the origin of the coordinate system. Except for the interleaving seal of the first page, the interleaving seals of the subsequent pages are proportionally cut into the remaining seal images, so their BBox values are the same. From the above, it can be seen that the proportion of the interleaving seals of the subsequent pages is b%, so the specific parameters of the BBox value are: llx B2 =0,lly B2 =0,urx B2 =x*(1-a%) / (n-1),ury B2 =y.
[0062] S230, obtaining a translation matrix of the interleaving seal in a non-first page of the PDF document.
[0063] For example, in some embodiments of the present application, Figure 5 Schematic diagram of seal translation shown. Figure 5 The left rectangular box with a width of a% is the proportion of the first page of the interline seal; the right rectangular box, its width occupies b% of the width of the entire seal, this rectangular box is the actual rectangular range of the appearance of the interline seal, and the seal images outside this range are hidden and cannot be displayed. Among them, the left rectangular box is the content that cannot be displayed after the seal is translated to the left by a% of the entire seal width. Through translation, the translation matrix [1 0 0 1tx ty] of the non-first page can be obtained.
[0064] In some embodiments of the present application, S230 may include: determining a translation parameter of the saddle seal of the i-th page in the PDF document, where i is a positive integer, and when i=1, the i-th page is the next page of the PDF document; and determining the translation matrix of the i-th page based on the translation parameter.
[0065] For example, in some embodiments of the present application, since the first page does not need to be translated, the encoding starts from the second page, that is, when the page is the second page, i=1, at this time, tx=-x*a%, ty=0 of the second page saddle seal, and the translation matrix is [1 0 01-x*a%0], and the display effect after translation is as follows: Figure 6 As shown. Thus, the translation parameter tx=-x*(a%+(i-1)b%) of the i-th page can be calculated. The translation matrix of the i-th page is [1 0 0 1-x*(a%+(i-1)b%)0].
[0066] S240, translating the interline seal in the non-homepage composite external frame according to the translation matrix to obtain a display result of the interline seal.
[0067] For example, in some embodiments of the present application, since the BBox of the interleaving seal on the first page only accounts for a% of the full seal width and is calculated from the left, there is no need for CTM to perform additional translation matrix operations, and the correct interleaving seal effect can be displayed on the first page. That is, the display result of the interleaving seal in the rectangle marked on the first page is determined according to the proportion of the first page. For example, Figure 7 The display result of the first page's interline seal is shown. The subsequent pages translate the seal according to the translation matrix to obtain the final interline seal stamping effect. It can be seen that the lower left corner of the BBox is always the origin of the composite coordinate system.
[0068] In some embodiments of the present application, S240 may include: performing a translation operation on the interline seal in the composite external frame of the i-th page according to the translation matrix of the i-th page to obtain a display result of the interline seal on the i-th page.
[0069] For example, in some embodiments of the present application, according to the translation matrix [1 0 0 1-x*(a%+(i-1)b%)0] of the i-th page, the corresponding seal image of the interleaving seal of each page is translated, and finally the following can be obtained: Figure 4 The display effect of the interleaving seal on each page is shown.
[0070] In addition, it should be noted that the PDF document mentioned above is not rotated, so the seal image can be translated within the appearance rectangular frame. However, for a PDF document with a rotation angle, the seal image is first rotated within the appearance rectangular frame, and then the above translation matrix operation is performed. The rotation matrix can be determined according to the rotation angle of the PDF document, and the rotation angle can be read from the rotation parameter Rotate of the PDF document.
[0071] The following is combined with Figure 8 The specific process of affixing a saddle stamp provided in some embodiments of the present application is exemplified.
[0072] Please see attached Figure 8 , Figure 8 A flow chart of a method for affixing a saddle stamp is provided for some embodiments of the present application.
[0073] The above process is explained below as an example.
[0074] S810, obtaining page parameters of the PDF document and seal parameters of the interline seal.
[0075] S820, based on the page parameters and the stamp parameters, determine the coordinates of the first page annotation rectangle and the non-first page annotation rectangle with the saddle stamp in the PDF document.
[0076] S830, based on the marked rectangle and the stamp parameters, calculate the coordinates of the first page BBox and the non-first page BBox of the interleaving stamp.
[0077] S840, determining the translation matrix of the saddle seal on the i-th page of the PDF document that is not the first page.
[0078] S850, determining a display result of a rectangle marked by the interline seal on the first page according to the proportion of the first page.
[0079] S860, performing a translation operation on the interline seal in the non-first page BBox according to the translation matrix of the i-th page, and obtaining a display result of the interline seal in the non-first page marked rectangle.
[0080] It should be noted that the specific implementation process of S810 to S860 may refer to the method embodiment provided above, and in order to avoid repetition, the detailed description is appropriately omitted here.
[0081] Through some of the embodiments of the present application described above, it can be known that the present application optimizes the implementation scheme of the interleaving seal, and all interleaving seals use the same seal image to avoid multiple segmentation and processing of the image, and then through the accurate calculation of the cross-seal rectangle Rect, the cross-seal appearance AP composite XObject BBox and the control of the CTM translation matrix, the display effect of stamping the interleaving seal on all pages can be achieved without segmenting the image. Through the technical solution of the present application, the stamping speed of the interleaving seal is firstly improved, and the signing performance of the business is greatly improved; and the byte size of the PDF file after stamping the interleaving seal is greatly reduced, which is convenient for the transmission of the document on the network, improves the performance of subsequent archiving, and also reduces the requirement for physical storage space during archiving. In addition, since there is no need to parse the seal image multiple times, the performance in the interleaving seal verification business link has also been greatly improved.
[0082] Please refer to Fig. 9 , Fig. 9 The block diagram of the device for stamping the perforated seal provided by some embodiments of the present application is shown. It should be understood that the device for stamping the perforated seal corresponds to the above method embodiment and can perform each step involved in the above method embodiment. The specific functions of the device for stamping the perforated seal can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.
[0083] Fig. 9The device for stamping the perforated pages of the PDF document comprises at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for stamping the perforated pages of the PDF document. The device for stamping the perforated pages of the PDF document comprises: a marking module 910, used to determine the coordinates of a marking rectangle for stamping the perforated pages of the PDF document, wherein the marking rectangle comprises: a first page marking rectangle and a non-first page marking rectangle; a composite processing module 920, used to calculate the coordinates of a composite external frame of the perforated pages of the PDF document based on the marking rectangle, wherein the composite external frame comprises: a first page composite external frame and a non-first page composite external frame, and the composite external frame has the same size as the marking rectangle; an acquisition module 930, used to acquire a translation matrix of the perforated pages of the PDF document in the non-first page; and a translation module 940, used to translate the perforated pages of the PDF document in the non-first page composite external frame according to the translation matrix to obtain a display result of the perforated pages of the PDF document.
[0084] In some embodiments of the present application, the annotation module 910 is used to obtain the page parameters of the PDF document and the seal parameters of the interleaving seal; wherein the page parameters include: the number of document pages, page width, and page height; the seal parameters include: the seal height of the interleaving seal, the proportion of the interleaving seal on the first page of the PDF document, and the image width and image height of the seal image corresponding to the interleaving seal.
[0085] In some embodiments of the present application, the acquisition module 930 is used to determine the translation parameters of the saddle seal on the i-th page in the PDF document, where i is a positive integer, and when i=1, the i-th page is the next page of the PDF document; based on the translation parameters, the translation matrix of the i-th page is determined.
[0086] In some embodiments of the present application, the translation module 940 is used to perform a translation operation on the interleaving seal in the composite external frame of the i-th page according to the translation matrix of the i-th page to obtain the display result of the interleaving seal on the i-th page.
[0087] In some embodiments of the present application, the translation module 940 is used to determine the display result of the rectangle marked by the interleaving seal on the first page according to the proportion of the first page.
[0088] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0089] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations of the method corresponding to any of the above methods provided in the above embodiments.
[0090] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0091] like Fig.10 As shown, some embodiments of the present application provide an electronic device 1000, which includes: a memory 1010, a processor 1020, and a computer program stored in the memory 1010 and executable on the processor 1020, wherein the processor 1020 can implement a method as described in any of the above embodiments when reading the program from the memory 1010 through a bus 1030 and executing the program.
[0092] Processor 1020 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 1020 can be a microprocessor.
[0093] The memory 1010 may be used to store instructions executed by the processor 1020 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 1020 of the disclosed embodiment may be used to execute instructions in the memory 1010 to implement the method shown above. The memory 1010 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0094] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0095] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0096] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for stamping a saddle seal, characterized in that: include: Determine the coordinates of the annotation rectangles affixed with the saddle stamp in the PDF document, wherein the annotation rectangles include: the first page annotation rectangle and the non-first page annotation rectangle; Based on the marked rectangle, the coordinates of the composite external frame of the interline seal are calculated, wherein the composite external frame includes: a composite external frame of the first page and a composite external frame of the non-first page, and the composite external frame has the same size as the marked rectangle; Obtain the translation matrix of the interleaving seal in the non-first page of the PDF document; The interleaving seal is translated in the non-homepage composite external frame according to the translation matrix to obtain a display result of the interleaving seal.
2. The method according to claim 1, characterized in that Before determining the coordinates of the marked rectangle with the saddle seal in the PDF document, the method further includes: Obtaining page parameters of the PDF document and seal parameters of the interleaved seal; Among them, the page parameters include: the number of document pages, page width, and page height; the seal parameters include: the seal height of the saddle seal, the proportion of the saddle seal on the first page of the PDF document, and the image width and image height of the seal image corresponding to the saddle seal.
3. The method according to claim 2, characterized in that The coordinates of the marked rectangle are related to the page parameters and the seal parameters, and the coordinates include: the coordinates of the lower left corner and the upper right corner of the marked rectangle.
4. The method according to claim 2 or 3, characterized in that The coordinates of the composite circumscribed frame include: the coordinates of the lower left corner and the upper right corner of the composite circumscribed frame; wherein the lower left corner is the origin of the composite coordinate system where the composite circumscribed frame is located, and the coordinates of the upper right corner are related to the seal parameters.
5. The method according to any one of claims 1 to 3, characterized in that The step of obtaining the translation matrix of the interleaving seal in the non-first page of the PDF document includes: Determine the translation parameter of the saddle seal on the i-th page in the PDF document, where i is a positive integer, and when i=1, the i-th page is the next page of the PDF document; Based on the translation parameters, the translation matrix of the i-th page is determined.
6. The method according to claim 5, characterized in that The step of translating the interleaving seal in the non-homepage composite external frame according to the translation matrix to obtain a display result of the interleaving seal includes: The interlineation seal is translated in the composite external frame of the i-th page according to the translation matrix of the i-th page to obtain the display result of the interlineation seal on the i-th page.
7. The method according to any one of claims 2 to 3, characterized in that: The method further includes: determining a display result of marking a rectangle of the interline seal on the first page according to the proportion of the first page.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program executes the method according to any one of claims 1 to 7 when executed by a processor.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 7 when being run by the processor.
10. A computer program product, characterized in that The computer program product comprises a computer program, wherein the computer program executes the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Cited By
Visualization implementation method for electronic rotary perforation seal
CN121582382A
Electronic rotary sewing stamp visual implementation method
CN121582382B