CN115270198A - Signature method, device and storage medium of PDF document - Google Patents

Signature method, device and storage medium of PDF document Download PDF

Info

Publication number
CN115270198A
CN115270198A CN202210887926.1A CN202210887926A CN115270198A CN 115270198 A CN115270198 A CN 115270198A CN 202210887926 A CN202210887926 A CN 202210887926A CN 115270198 A CN115270198 A CN 115270198A
Authority
CN
China
Prior art keywords
signature
target
pdf document
annotation
picture
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210887926.1A
Other languages
Chinese (zh)
Inventor
郭晋
韦利东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Genyan Network Technology Co ltd
Original Assignee
Shanghai Genyan Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Genyan Network Technology Co ltd filed Critical Shanghai Genyan Network Technology Co ltd
Priority to CN202210887926.1A priority Critical patent/CN115270198A/en
Publication of CN115270198A publication Critical patent/CN115270198A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/169Annotation, e.g. comment data or footnotes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application provides a signature method of a PDF document and related equipment, a plurality of seal pictures can be added in one signature, and the signature efficiency is improved. The method comprises the following steps: determining a PDF document specification corresponding to a target PDF document; respectively writing a pre-signature structural body corresponding to each signature in the N signatures into the target PDF document according to the PDF document specification; writing a signature annotation structural body corresponding to a target signature into the target PDF document; creating a picture structure of the seal picture corresponding to the target signature; writing the picture structure into the signature annotation structure; setting a target structure in the signature annotation structure as the pre-signature structure; and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure.

Description

Signature method, device and storage medium of PDF document
[ technical field ] A method for producing a semiconductor device
The application belongs to the field of software development, and particularly relates to a signature method and device for a PDF document and a storage medium.
[ background ] A method for producing a semiconductor device
According to PDF document format specification, the signature of PDF document in the field of electronic signature can only add one appearance picture (seal picture) at most in one signature process of the existing PDF document.
With the rapid popularization of electronic signatures in China, electronic contracts are used in various industries under the condition that the Saas electronic signature platform is more and more popular, the characteristics of traditional paper contracts are kept in the domestic electronic contracts, for example, the traditional paper contracts are generally stamped on each page, the electronic contracts with legal effectiveness are electronic signatures in documents, the signatures cover the whole documents and non-appearance pictures (stamp pictures), but clients are still used to stamp on each page of pdf documents in the electronic contract signing process.
In the existing scheme, for example, an ITEXT electronic signature class library is used, each page of a document is stamped by adding signatures for multiple times, and each appearance picture is added by adding a signature once, so that the signature process is long in time consumption and high in performance loss.
[ summary of the invention ]
The application provides a signature method, a signature device and a storage medium of a PDF document, wherein a plurality of seal pictures can be added in one signature, and the signature efficiency is improved.
A first aspect of the present application provides a signature method for a PDF document, including:
determining a PDF document specification corresponding to a target PDF document;
respectively writing a pre-signature structural body corresponding to each signature in N signatures into the target PDF document according to the PDF document specification, wherein N is an integer greater than or equal to 1;
writing a signature annotation structural body corresponding to a target signature into the target PDF document, wherein the target label name is any one signature in the N signatures;
creating a picture structure of the seal picture corresponding to the target signature;
writing the picture structure into the signature annotation structure;
setting a target structure in the signature annotation structure as the pre-signature structure;
and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
A second aspect of the present application provides a signature apparatus for a PDF document, including:
a first determining unit, configured to determine a PDF document specification corresponding to the target PDF document;
a first writing unit, configured to write a pre-signature structure corresponding to each of N signatures into the target PDF document according to the PDF document specification, where N is an integer greater than or equal to 1;
a second writing unit, configured to write a signature annotation structure corresponding to a target signature into the target PDF document, where the target tag name is any one of the N signatures;
the creating unit is used for creating a picture structure body of the seal picture corresponding to the target signature;
a third writing unit configured to write the picture structure into the signature comment structure;
a first setting unit configured to set a target structure in the signature annotation structural body as the pre-signature structural body;
and the second setting unit is used for setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
In one possible design, the second setting unit is specifically configured to:
determining a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structural body, the signature annotation structural body and the picture structural body;
determining a signature structure of the target signature according to the target hash value;
and setting the signature structure into the pre-signature structure.
In one possible design, the determining, by the second setting unit, a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structural body, the signature annotation structural body, and the picture structural body includes:
determining a document hash value corresponding to the target PDF document, a pre-signature hash value corresponding to the pre-signature structural body, a comment hash value corresponding to the signature comment structural body and a picture hash value corresponding to the picture structural body;
determining a sum of the document hash value, the pre-signature hash value, the annotation hash value, and the picture hash value as the target hash value.
In one possible design, the first write unit is specifically configured to:
determining a pre-signature structure corresponding to each signature in the N signatures according to the PDF document specification, wherein the pre-signature structure comprises an adding date structure, a preferred signature processing program structure, a signature reason structure, a signature area structure and a signature information structure;
and writing the adding date structure, the preferred signature processing program structure, the signature reason structure, the signature area structure and the signature information structure into the target PDF document.
In one possible design, the second write unit is specifically configured to:
determining a signature annotation structure corresponding to the target signature, wherein the signature annotation structure comprises a signature name structure and a permission mask structure;
and writing the signature name structure and the authority mask structure into the target PDF document.
In a possible design, the third writing unit is specifically configured to:
determining the target page number of the seal picture in the target document;
setting a first structure in the signature annotation structure to the target number of pages;
and setting a second structure in the signature annotation structure body as the picture structure body.
A third aspect of the embodiments of the present application provides a computer device, which includes at least one connected processor, a memory and a transceiver, wherein the memory is used for storing program codes, and the processor is used for calling the program codes in the memory to execute the steps of the vehicle diagnosis method according to the first aspect.
A fourth aspect of embodiments of the present application provides a computer storage medium including instructions that, when executed on a computer, cause the computer to perform the steps of the vehicle diagnostic method described above in the first aspect.
In summary, it can be seen that, in the embodiments provided in the present application, a PDF document specification corresponding to a target PDF document is determined; respectively writing a pre-signature structural body corresponding to each signature in N signatures into a target PDF document according to a PDF document specification, wherein N is an integer greater than or equal to 1; writing a signature annotation structural body corresponding to a target signature into a target PDF document, wherein the target signature is any one signature in the N signatures; creating a picture structure of a stamp picture corresponding to the target signature; writing the picture structure into the signature annotation structure; setting a target structure in the signature annotation structural body as a pre-signature structural body; and setting each signature in the N signatures into a pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document. Therefore, the signature can be prevented from being added to the PDF document page by page in the prior art, a plurality of seal pictures can be added to the PDF document by signature once, and the signature efficiency is improved.
[ description of the drawings ]
Fig. 1 is a schematic diagram of an embodiment of a signature method of a PDF document provided by an embodiment of the present application;
fig. 2 is a schematic diagram of another embodiment of a signature method of a PDF document provided by an embodiment of the present application;
fig. 3 is a schematic virtual structure diagram of a signature apparatus of a PDF document according to an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of a signature apparatus for a PDF document according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of an electronic device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an embodiment of a computer-readable storage medium according to an embodiment of the present invention.
[ detailed description ] embodiments
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The terms "first," "second," and the like in the description and claims of this application and in the foregoing drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Furthermore, the terms "comprise," "include," and "have," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, wherein the division of modules presented herein is merely a logical division and may be implemented in a practical application in a different manner, such that a plurality of modules may be combined or integrated into another system or some feature vectors may be omitted or not implemented, and wherein shown or discussed as coupled or directly coupled or communicatively coupled to each other may be through some interfaces and indirectly coupled or communicatively coupled to each other module may be electrically or otherwise similarly situated, all without limitation. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
The signature device of the PDF document provided in the embodiment of the present application is described below from the perspective of a signature device of a PDF document, which may be a server or a service unit in the server, and is not particularly limited.
Referring to fig. 1, fig. 1 is a schematic flow chart of a signature apparatus of a PDF document according to an embodiment of the present application, including:
101. and determining the PDF document specification corresponding to the target PDF document.
In this embodiment, the signature apparatus of the PDF document may determine the PDF document specification corresponding to the target PDF document, where the PDF document specification is a specification performed on functions such as syntax, graphics, text, rendering, transparency, interactive functions, multimedia, and document exchange corresponding to the target PDF document, for example, the specification corresponding to the syntax includes vocabulary rules, objects, filters, file structures, encryption, document structures, content streams and resources, common data structures, functions, and so on, the specification corresponding to the graphics includes graphics objects, coordinate systems, graphics states, path construction and drawing, color space, low temperature, external objects, images, X0bjects root expression, and so on, and the specification corresponding to the text includes organization and applicability of fonts, text state parameters and u, font objects, font data structures, and descriptions, and so on.
102. And respectively writing the pre-signature structural body corresponding to each signature in the N signatures into the target PDF document according to the PDF document specification.
In this embodiment, the signature apparatus of the PDF document may determine, according to a PDF document specification corresponding to the target PDF document, a pre-signature structure corresponding to each signature in N signatures, where N is an integer greater than or equal to 1, and the N signatures are signatures written in the target PDF document, where the pre-signature structure includes an addition date structure, a preferred signature processing program structure, a signature reason structure, a signature area structure, and a signature information structure, and writes the addition date structure, the preferred signature processing program structure, the signature reason structure, the signature area structure, and the signature information structure in the target PDF document. Namely, the signature device of the PDF document adds a pre-signature structure body (signature dictionary/Sig) corresponding to each signature in the N signatures according to the PDF document specification, sets a related structure for the pre-signature structure body, and writes the pre-signature structure body corresponding to each signature in the N signatures in the target PDF document, wherein the pre-signature structure body comprises a Type of/Sig, a Type of/M (an added date structure), a Type of/Filter (a preferred signature processing program structure), a Type of/Reason (a signature Reason structure), a Type of/ByteRange (a signature area structure), a Type of/Contents (signature information, and the content of the signature which is not signed is empty) and other related structures related to the signature.
103. And writing the signature annotation structural body corresponding to the target signature into the target PDF document.
In this embodiment, the signature apparatus of the PDF document may determine a signature annotation structure corresponding to a target signature, where the target signature is any one of N signatures, and the signature annotation structure includes a signature name structure and an authority mask structure, and writes the signature name structure and the authority mask structure into the target PDF document. That is, the signature device of the PDF document may create a signature annotation (annotation dictionary/Annot) corresponding to the target signature, set an annotation structure corresponding to the target signature, and write the annotation structure to the target PDF document, the annotation structure including/FT:/Sig,/Type:/Annot,/Subtype:/Widget,/T (signature name structure, unique within document),/F (authority mask structure), and the like.
104. And creating a picture structure of the stamp picture corresponding to the target signature.
In this embodiment, the signature apparatus for the PDF document may create a picture structure of the stamp picture corresponding to the target signature, and the manner of creating the picture structure of the stamp picture corresponding to the target signature is not limited herein.
It should be noted that, the signature apparatus of the PDF document may write the pre-signature structural body corresponding to each signature in the N signatures into the target PDF document through step 102, may write the signature annotation structural body corresponding to the target signature into the target PDF document through step 103, and may create the image structural body of the stamp image corresponding to the target signature through step 104, however, there is no sequential execution order limitation between these three steps, which may limit step 102, may execute step 103 first, may execute step 104 first, or execute step 104 at the same time, and is not particularly limited.
105. The picture structure is written into the signature annotation structure.
In this embodiment, the signature apparatus of the PDF document may write the picture structure into the signature annotation structure, that is, the signature apparatus of the PDF document may set the picture structure of the created stamp picture into the signature annotation structure, and set the number of pages of the document where the stamp picture is located. Specifically, the signature device of the PDF document can determine the target page number of the stamp picture in the target document; setting a first structure in the signature annotation structure as a target page number; and setting a second structure in the signature annotation structure as a picture structure. That is, "/P" (i.e. the first structure) in the annotation structure points to the number of pages of the stamp picture in the target PDF document, and "/AR and/DR" (i.e. the second structure) in the annotation structure points to the picture structure corresponding to the stamp picture.
106. And setting a target structure in the signature comment structure body as a pre-signature structure body.
In this embodiment, the signature apparatus of the PDF document may set the target structure in the signature annotation structure as a pre-signature structure, that is, point the "/v" structure (target structure) in the signature structure to the pre-signature structure.
It should be noted that, the signature apparatus of the PDF document may write the picture structure into the signature annotation structure in step 105, and may set the target structure in the signature annotation structure as a pre-signature structure in step 106, however, there is no sequential execution order limitation between these two steps, and step 105 may be executed first, or step 106 may be executed first, or executed at the same time, which is not limited specifically.
107. And setting each signature in the N signatures into a pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
In this embodiment, the signature apparatus of the PDF document may first determine a hash value corresponding to the target signature according to the target PDF document, the pre-signature structural body, the signature annotation structural body, and the picture structural body, specifically, may determine a document hash value corresponding to the target PDF document, a pre-signature hash value corresponding to the pre-signature structural body, an annotation hash value corresponding to the signature annotation structural body, and a picture hash value corresponding to the picture structural body, respectively, and determine a sum of the document hash value, the pre-signature hash value, the annotation hash value, and the picture hash value as the target hash value, where the target hash value does not include a hash value of contents in the "pre-signature structural body"; and then, determining a signature structure of the target signature according to the target hash value, and setting the signature structure into contents of a pre-signature structure body so as to finish the signature process of the PDF document.
For convenience of understanding, the following description is made with reference to fig. 2, please refer to fig. 2, where fig. 2 is a schematic diagram of an embodiment of a signature method for a PDF document provided in this embodiment of the present application, where PDF content is composed of obj (objects), obj may include various data types, 204 is a pre-signature structure corresponding to each signature in N signatures, and the initially created pre-signature structure includes various attributes (for example, an adding date structure, a preferred signature processing program structure, a signature reason structure, a signature region structure, a signature information structure, and the like);
201, creating a signature annotation structure, wherein a structure "/V" in the signature annotation structure points to a pre-signature structure, a structure "/P" points to the number of pages of a stamp picture corresponding to each signature in N signatures in a target PDF document, and "/AR and/DR" are picture structures of the stamp pictures corresponding to each signature in N signatures;
202 is a picture structure for creating a picture of a stamp corresponding to each of the N signatures, the picture appearance (expressed using/AR,/DR)
203 is the page number pointing to the signature annotation structure;
and then, acquiring the hash value of all contents in the target PDF document except the contents in the pre-signature structure body, signing the hash value, and putting the signature structure in the contents (205) to finish signing.
In summary, it can be seen that, in the embodiments provided in the present application, a PDF document specification corresponding to a target PDF document is determined; respectively writing a pre-signature structural body corresponding to each signature in N signatures into a target PDF document according to a PDF document specification, wherein N is an integer greater than or equal to 1; writing a signature annotation structural body corresponding to a target signature into a target PDF document, wherein the target signature is any one signature in the N signatures; creating a picture structure of a stamp picture corresponding to the target signature; writing the picture structure into the signature comment structure; setting a target structure in the signature annotation structural body as a pre-signature structural body; and setting each signature in the N signatures into a pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document. Therefore, the signature can be prevented from being added to the PDF document page by page in the prior art, a plurality of seal pictures can be added to the PDF document by signature once, and the signature efficiency is improved.
Referring to fig. 3, fig. 3 is a virtual structure intention of a signature apparatus of a PDF document provided by the present application, where the signature apparatus 300 of the PDF document includes:
a first determining unit 301, configured to determine a PDF document specification corresponding to a target PDF document;
a first writing unit 302, configured to write a pre-signature structure corresponding to each of N signatures into the target PDF document according to the PDF document specification, where N is an integer greater than or equal to 1;
a second writing unit 303, configured to write a signature annotation structure corresponding to a target signature into the target PDF document, where the target tag name is any one signature of the N signatures;
a creating unit 304, configured to create a picture structure of a stamp picture corresponding to the target signature;
a third writing unit 305 for writing the picture structure into the signature comment structure;
a first setting unit 306, configured to set a target structure in the signature annotation structure as the pre-signature structure;
a second setting unit 307, configured to set each signature of the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure, and the picture structure, so as to complete a signature process on the target PDF document.
In one possible design, the second setting unit 307 is specifically configured to:
determining a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure;
determining a signature structure of the target signature according to the target hash value;
and setting the signature structure into the pre-signature structure.
In one possible design, the determining, by the second setting unit 307, the target hash value corresponding to the target signature according to the target PDF document, the pre-signature structure, the signature annotation structure, and the picture structure includes:
determining a document hash value corresponding to the target PDF document, a pre-signature hash value corresponding to the pre-signature structural body, an annotation hash value corresponding to the signature annotation structural body and a picture hash value corresponding to the picture structural body;
determining a sum of the document hash value, the pre-signed hash value, the annotation hash value, and the picture hash value as the target hash value.
In one possible design, the first writing unit 302 is specifically configured to:
determining a pre-signature structure corresponding to each signature in the N signatures according to the PDF document specification, wherein the pre-signature structure comprises an adding date structure, a preferred signature processing program structure, a signature reason structure, a signature area structure and a signature information structure;
and writing the adding date structure, the preferred signature processing program structure, the signature reason structure, the signature area structure and the signature information structure into the target PDF document.
In one possible design, the second writing unit 303 is specifically configured to:
determining a signature annotation structure corresponding to the target signature, wherein the signature annotation structure comprises a signature name structure and a permission mask structure;
and writing the signature name structure and the authority mask structure into the target PDF document.
In one possible design, the third writing unit 305 is specifically configured to:
determining the target page number of the seal picture in the target document;
setting a first structure in the signature annotation structure to the target number of pages;
and setting a second structure in the signature annotation structure body as the picture structure body.
Fig. 3 describes the signature apparatus of a PDF document in the embodiment of the present application from the perspective of a modular functional entity, and the following describes the signature apparatus of a PDF document in the embodiment of the present application in detail from the perspective of hardware processing, referring to fig. 4, an embodiment of a signature apparatus 400 of a PDF document in the embodiment of the present application includes:
an input device 401, an output device 402, a processor 403 and a memory 404 (wherein the number of the processor 403 may be one or more, and one processor 403 is taken as an example in fig. 4). In some embodiments of the present application, the input device 401, the output device 402, the processor 403 and the memory 404 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 4.
Wherein, by calling the operation instruction stored in the memory 404, the processor 403 is configured to execute the following steps:
determining a PDF document specification corresponding to a target PDF document;
respectively writing a pre-signature structure corresponding to each signature in N signatures into the target PDF document according to the PDF document specification, wherein N is an integer greater than or equal to 1;
writing a signature annotation structural body corresponding to a target signature into the target PDF document, wherein the target label name is any one signature in the N signatures;
creating a picture structure of the stamp picture corresponding to the target signature;
writing the picture structure into the signature annotation structure;
setting a target structure in the signature annotation structure as the pre-signature structure;
and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
The processor 403 is also configured to execute any of the manners in the corresponding embodiments of fig. 1 by calling the operation instructions stored in the memory 404.
Referring to fig. 5, fig. 5 is a schematic view of an embodiment of an electronic device according to an embodiment of the application.
As shown in fig. 5, an electronic device according to an embodiment of the present application includes a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520, where the processor 520 executes the computer program 511 to implement the following steps:
determining a PDF document specification corresponding to a target PDF document;
respectively writing a pre-signature structural body corresponding to each signature in N signatures into the target PDF document according to the PDF document specification, wherein N is an integer greater than or equal to 1;
writing a signature annotation structural body corresponding to a target signature into the target PDF document, wherein the target label name is any one signature in the N signatures;
creating a picture structure of the stamp picture corresponding to the target signature;
writing the picture structure into the signature annotation structure;
setting a target structure in the signature annotation structure as the pre-signature structure;
and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
In a specific implementation, when the processor 520 executes the computer program 511, any of the embodiments corresponding to fig. 1 may be implemented.
Since the electronic device described in this embodiment is a device used for implementing a signature apparatus of a PDF document in this embodiment, based on the method described in this embodiment, those skilled in the art can understand a specific implementation manner of the electronic device of this embodiment and various modifications thereof, so that how to implement the method in this embodiment by the electronic device is not described in detail herein, and as long as the device used for implementing the method in this embodiment by the skilled in the art belongs to the scope of protection of this application.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present application.
As shown in fig. 6, the present embodiment provides a computer-readable storage medium 600 on which a computer program 611 is stored, the computer program 611 implementing the following steps when executed by a processor:
determining a PDF document specification corresponding to a target PDF document;
respectively writing a pre-signature structural body corresponding to each signature in N signatures into the target PDF document according to the PDF document specification, wherein N is an integer greater than or equal to 1;
writing a signature annotation structural body corresponding to a target signature into the target PDF document, wherein the target label name is any one signature in the N signatures;
creating a picture structure of the stamp picture corresponding to the target signature;
writing the picture structure into the signature annotation structure;
setting a target structure in the signature annotation structure as the pre-signature structure;
and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
In a specific implementation, the computer program 611 may implement any of the embodiments corresponding to fig. 1 when executed by a processor.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Embodiments of the present application further provide a computer program product, where the computer program product includes computer software instructions, and when the computer software instructions are run on a processing device, the processing device is caused to execute the flow in the PDF keyword positioning method in the embodiment corresponding to fig. 1.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; however, such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A signature method of a PDF document is characterized by comprising the following steps:
determining a PDF document specification corresponding to the target PDF document;
respectively writing a pre-signature structure corresponding to each signature in N signatures into the target PDF document according to the PDF document specification, wherein N is an integer greater than or equal to 1;
writing a signature annotation structural body corresponding to a target signature into the target PDF document, wherein the target label name is any one signature in the N signatures;
creating a picture structure of the seal picture corresponding to the target signature;
writing the picture structure into the signature annotation structure;
setting a target structure in the signature annotation structure as the pre-signature structure;
and setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
2. The method of claim 1, wherein setting each of the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure, and the picture structure comprises:
determining a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structural body, the signature annotation structural body and the picture structural body;
determining a signature structure of the target signature according to the target hash value;
and setting the signature structure into the pre-signature structure.
3. The method according to claim 2, wherein the determining a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structure, the signature annotation structure, and the picture structure comprises:
determining a document hash value corresponding to the target PDF document, a pre-signature hash value corresponding to the pre-signature structural body, an annotation hash value corresponding to the signature annotation structural body and a picture hash value corresponding to the picture structural body;
determining a sum of the document hash value, the pre-signature hash value, the annotation hash value, and the picture hash value as the target hash value.
4. The method according to claim 2, wherein writing the pre-signature structure corresponding to each of the N signatures in the target PDF document according to the PDF document specification comprises:
determining a pre-signature structure corresponding to each signature in the N signatures according to the PDF document specification, wherein the pre-signature structure comprises an adding date structure, a preferred signature processing program structure, a signature reason structure, a signature area structure and a signature information structure;
and writing the adding date structure, the preferred signature processing program structure, the signature reason structure, the signature area structure and the signature information structure into the target PDF document.
5. The method according to any one of claims 1 to 4, wherein writing a signature annotation structure corresponding to a target signature into the target PDF document comprises:
determining a signature annotation structure corresponding to the target signature, wherein the signature annotation structure comprises a signature name structure and a permission mask structure;
and writing the signature name structure and the authority mask structure into the target PDF document.
6. The method according to any one of claims 1 to 4, wherein said writing the picture structure to the signature annotation structure comprises:
determining the target page number of the seal picture in the target document;
setting a first structure in the signature annotation structure to the target number of pages;
and setting a second structure in the signature annotation structure body as the picture structure body.
7. A signature apparatus of a PDF document, comprising:
a first determining unit, configured to determine a PDF document specification corresponding to the target PDF document;
a first writing unit, configured to write a pre-signature structure corresponding to each of N signatures into the target PDF document according to the PDF document specification, where N is an integer greater than or equal to 1;
a second writing unit, configured to write a signature annotation structure corresponding to a target signature into the target PDF document, where the target tag name is any one of the N signatures;
the creating unit is used for creating a picture structure body of the seal picture corresponding to the target signature;
a third writing unit configured to write the picture structure into the signature comment structure;
a first setting unit configured to set a target structure in the signature annotation structural body as the pre-signature structural body;
and the second setting unit is used for setting each signature in the N signatures into the pre-signature structure according to the target PDF document, the pre-signature structure, the signature annotation structure and the picture structure so as to complete the signature process of the target PDF document.
8. The apparatus according to claim 7, wherein the second setting unit is specifically configured to:
determining a target hash value corresponding to the target signature according to the target PDF document, the pre-signature structural body, the signature annotation structural body and the picture structural body;
determining a signature structure of the target signature according to the target hash value;
and setting the signature structure into the pre-signature structure.
9. A computer device, comprising:
at least one connected processor, a memory and a transceiver, wherein the memory is for storing program code and the processor is for calling the program code in the memory to perform the steps of the signature method of a PDF document according to any one of claims 1 to 6.
10. A computer storage medium, comprising:
instructions which, when run on a computer, cause the computer to perform the steps of the method of signing a PDF document according to any one of claims 1 to 6.
CN202210887926.1A 2022-07-26 2022-07-26 Signature method, device and storage medium of PDF document Pending CN115270198A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210887926.1A CN115270198A (en) 2022-07-26 2022-07-26 Signature method, device and storage medium of PDF document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210887926.1A CN115270198A (en) 2022-07-26 2022-07-26 Signature method, device and storage medium of PDF document

Publications (1)

Publication Number Publication Date
CN115270198A true CN115270198A (en) 2022-11-01

Family

ID=83770217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210887926.1A Pending CN115270198A (en) 2022-07-26 2022-07-26 Signature method, device and storage medium of PDF document

Country Status (1)

Country Link
CN (1) CN115270198A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236297A (en) * 2023-11-13 2023-12-15 深圳市上融科技有限公司 PDF (Portable document Format) -based page crossing signature realization method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117236297A (en) * 2023-11-13 2023-12-15 深圳市上融科技有限公司 PDF (Portable document Format) -based page crossing signature realization method
CN117236297B (en) * 2023-11-13 2024-02-27 深圳市上融科技有限公司 PDF (Portable document Format) -based page crossing signature realization method

Similar Documents

Publication Publication Date Title
US9407284B2 (en) Improvements for Base64 encoding and decoding
CN111985202A (en) Method, equipment and storage medium for generating PDF electronic signature based on template
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
CN111736922B (en) Plug-in calling method and device, electronic equipment and storage medium
CN111159329A (en) Sensitive word detection method and device, terminal equipment and computer-readable storage medium
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN104881298A (en) Method and device for displaying documents on line
CN115270198A (en) Signature method, device and storage medium of PDF document
CN109542398B (en) Business system generation method and device and computer readable storage medium
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN109408191A (en) Method for updating pages, device, equipment and storage medium
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN113032275A (en) Method and device for testing field, electronic equipment and storage medium
CN111324645B (en) Block chain data processing method and device
CN116089535A (en) Data synchronization method, device, equipment and storage medium
CN115618838A (en) Report generation method and equipment
CN111381905A (en) Program processing method, device and equipment
CN113703753B (en) Method and device for product development and product development system
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN113360155A (en) Front-end interface background color matching method, device, equipment and storage medium
CN113342647A (en) Test data generation method and device
CN113010129A (en) Virtual studio full-flow multi-terminal blackboard writing extraction method and device
CN111897612A (en) Page updating method and device, electronic equipment and storage medium
CN113268230B (en) Feedback information generation method and device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination