CN116402020A - Signature imaging processing method, system and storage medium based on OFD document - Google Patents

Signature imaging processing method, system and storage medium based on OFD document Download PDF

Info

Publication number
CN116402020A
CN116402020A CN202310172351.XA CN202310172351A CN116402020A CN 116402020 A CN116402020 A CN 116402020A CN 202310172351 A CN202310172351 A CN 202310172351A CN 116402020 A CN116402020 A CN 116402020A
Authority
CN
China
Prior art keywords
signature
target
information
ofd document
image
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
CN202310172351.XA
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.)
Fuxin Kunpeng Beijing Information Technology Co ltd
Original Assignee
Fuxin Kunpeng Beijing Information 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 Fuxin Kunpeng Beijing Information Technology Co ltd filed Critical Fuxin Kunpeng Beijing Information Technology Co ltd
Priority to CN202310172351.XA priority Critical patent/CN116402020A/en
Publication of CN116402020A publication Critical patent/CN116402020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Character Input (AREA)

Abstract

The invention discloses a signature imaging processing method, a signature imaging processing system and a storage medium based on an OFD document, wherein a target area containing user signature information is extracted from a target OFD document, and image conversion processing is carried out on the target area to obtain a target signature image; acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format; and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form. According to the invention, the original writing style of the signature can be reserved by carrying out imaging processing on the OFD document signature, and the problem that the handwritten font cannot be correctly identified and cannot be restored is solved.

Description

Signature imaging processing method, system and storage medium based on OFD document
Technical Field
The invention relates to the technical field of OFD document processing, in particular to a signature imaging processing method, a signature imaging processing system and a storage medium based on an OFD document.
Background
At present, a great deal of handwriting approval work for OFD documents appears in the market, and even cursive or similar character substitution occurs due to different handwriting strokes of each user. However, these fonts cannot be associated with the system fonts, which results in a problem that the fonts cannot be restored to handwriting fonts after being extracted and displayed.
Therefore, it is needed to provide a technical solution to solve the above technical problems.
Disclosure of Invention
In order to solve the technical problems, the invention provides a signature imaging processing method, a signature imaging processing system and a storage medium based on an OFD document.
The signature imaging processing method based on the OFD document provided by the invention has the following technical scheme that:
extracting a target area containing user signature information from a target OFD document, and performing image conversion processing on the target area to obtain a target signature image;
acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format;
and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
The signature imaging processing method based on the OFD document has the following beneficial effects:
the method provided by the invention can keep the original writing style of the signature by carrying out imaging processing on the OFD document signature, and solves the problem that the handwritten font cannot be correctly identified and cannot be restored.
On the basis of the scheme, the signature imaging processing method based on the OFD document can be improved as follows.
Further, the step of extracting the target area containing the user signature information from the target OFD document includes:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
Further, the target area is: and a minimum rectangular area containing the user signature information.
Further, the image attribute information includes: and the length and width information of the target signature image.
The technical scheme of the signature imaging processing system based on the OFD document provided by the invention is as follows:
comprising the following steps: the system comprises a processing module, an integrating module and an operating module;
the processing module is used for: extracting a target area containing user signature information from a target OFD document, and performing image conversion processing on the target area to obtain a target signature image;
the integration module is used for: acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format;
the operation module is used for: and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
The signature imaging processing system based on the OFD document has the following beneficial effects:
the system provided by the invention can keep the original writing style of the signature by carrying out imaging processing on the OFD document signature, and solves the problem that the handwritten font cannot be correctly identified and cannot be restored.
On the basis of the scheme, the signature imaging processing system based on the OFD document can be improved as follows.
Further, the processing module is specifically configured to:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
Further, the target area is: and a minimum rectangular area containing the user signature information.
Further, the image attribute information includes: and the length and width information of the target signature image.
The technical scheme of the storage medium provided by the invention is as follows:
the storage medium has stored therein instructions which, when read by a computer, cause the computer to perform the steps of the signature imaging processing method based on an OFD document as in the present invention.
The technical scheme of the electronic equipment provided by the invention is as follows:
the signature imaging processing method based on the OFD document comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and is characterized in that the processor executes the computer program to enable the computer to execute the steps of the signature imaging processing method based on the OFD document.
Drawings
FIG. 1 shows a schematic flow chart of an embodiment of a signature imaging processing method based on an OFD document;
fig. 2 shows a schematic structural diagram of an embodiment of the signature imaging processing system based on the OFD document provided by the invention.
Detailed Description
Fig. 1 shows a schematic flow chart of an embodiment of a signature imaging processing method based on an OFD document. As shown in fig. 1, the method comprises the following steps:
step 110: and extracting a target area containing user signature information from the target OFD document, and performing image conversion processing on the target area to obtain a target signature image.
Wherein, (1) the target OFD document is: an OFD document requiring a user to sign, the content of which is not limited. (2) The user signature information is: the signature content obtained by the user signing by writing means (such as pencil means, drawing means, etc.) is not limited to chinese, english, symbols, etc. (3) The target area is: an area containing user signature information. In this embodiment, the target area is: a minimum rectangular area containing the user signature information; other types of regions are possible, and need only contain complete user signature information, without limitation. (4) The manner of image conversion processing includes, but is not limited to: WEB picture-to-picture technology (JavaScript, canvas picture-to-picture, etc.), c++ picture-to-picture, PHP picture-to-picture, etc. (5) The target signature image is: an image containing user signature information.
Step 120: acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format.
Wherein (1) the image attribute information includes, but is not limited to; length and width information. (2) The position information is: and (3) the position coordinates of the target area in the target OFD document. (3) The OFD document standard is: the specific details of the national format document format specification (OFD) standard are not described in detail herein. (4) The process of integrating the formats of the image attribute information and the position information comprises the following steps: the picture element is added to the OFD file in a stamp annotation object, and written into xml in the target OFD file by setting a boundary to which the picture element is added, including coordinates (position information) and width and height (image attribute information) of the picture in the page, and a transformation matrix CTM attribute of the picture object.
In this embodiment, the upper left corner of the preset area is used as the origin (0, 0), the X axis extends rightward, and the Y axis extends downward.
Step 130: and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
The method comprises the steps of (1) storing integrated format information into the animation xml of a corresponding page under Pages of a target OFD document; the target signature image is stored to the target OFD document (in the resource folder Res).
Preferably, the step of extracting the target area containing the user signature information from the target OFD document includes:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
The preset area is as follows: and a preset area for signing by a user in the target OFD document. For example, a text box (container) is reserved at the end of the document content for signing.
Specifically, canvas is taken as an example (canvas itself does not have drawing capabilities, and is a canvas itself, which is a container). The drawing capability is completed based on the canvas renderingcontext2D object returned by html5 getContext ("2D"). canvas is a two-dimensional network with the upper left corner (0, 0) of the canvas as the origin of coordinates, with the X axis extending to the right and the Y axis extending downward. A user performs a signing operation using a pencil tool by first generating a canvas as a container and then generating drawing objects based on the canvas container. When the pencil writing operation is carried out, the drawing object uses a self line method to connect the coordinates to which the pencil moves, and when the line is drawn, the information such as the width, the color and the like of the line is set according to the information such as the width, the color and the like of the pencil selected by a user. And drawing and simultaneously recording an x-axis maximum value time coordinate, an x-axis minimum value time coordinate, a y-axis maximum value time coordinate and a y-axis minimum value time coordinate respectively, and calculating position information by using four point coordinates. And after the drawing is finished, converting the content of the canvas container into an image by using a canvas element picture conversion method. After determining the image attribute information of the image according to the target signature image, the front-end service integrates the format of the target signature image, the image attribute information (image length and width information) and the position information into xml format information conforming to the OFD standard, and finally uniformly packaging and storing the integrated format information of the integrated xml format and the target signature image into a target OFD document.
According to the technical scheme, the original writing style of the signature can be reserved through the imaging processing of the OFD document signature, and the problem that the handwritten font cannot be correctly identified and cannot be restored is solved.
Fig. 2 shows a schematic structural diagram of an embodiment of a signature imaging processing system for an OFD document provided by the invention. As shown in fig. 2, the system 200 includes: a processing module 210, an integration module 220, and a run module 230.
The processing module 210 is configured to: extracting a target area containing user signature information from a target OFD document, and performing image conversion processing on the target area to obtain a target signature image;
the integration module 220 is configured to: acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format;
the operation module 230 is configured to: and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
Preferably, the processing module 210 is specifically configured to:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
Preferably, the target area is: and a minimum rectangular area containing the user signature information.
Preferably, the image attribute information includes: and the length and width information of the target signature image.
According to the technical scheme, the original writing style of the signature can be reserved through the imaging processing of the OFD document signature, and the problem that the handwritten font cannot be correctly identified and cannot be restored is solved.
The steps for implementing the corresponding functions by the parameters and the modules in the signature imaging processing system 200 for the OFD document according to the present embodiment may refer to the parameters and the steps in the embodiments of the signature imaging processing method for the OFD document according to the foregoing, which are not described herein.
The storage medium provided by the embodiment of the invention comprises: the storage medium stores instructions that, when read by a computer, cause the computer to execute steps of the signature imaging processing method of the OFD document, for example, reference may be made to each parameter and step in the embodiment of the signature imaging processing method of the OFD document hereinabove, which is not described herein.
Computer storage media such as: flash disk, mobile hard disk, etc.
The electronic device provided in the embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the steps of the signature image processing method of an OFD document are executed by the processor, and specific reference may be made to each parameter and step in the embodiment of the signature image processing method of an OFD document in the foregoing, and details are not described herein.
Those skilled in the art will appreciate that the present invention may be implemented as a method, system, storage medium, and electronic device.
Thus, the invention may be embodied in the form of: either entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or entirely software, or a combination of hardware and software, referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media, which contain computer-readable program code. Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (10)

1. A signature imaging processing method of an OFD document, comprising:
extracting a target area containing user signature information from a target OFD document, and performing image conversion processing on the target area to obtain a target signature image;
acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format;
and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
2. The signature imaging processing method of an OFD document according to claim 1, wherein the step of extracting a target area containing user signature information from a target OFD document comprises:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
3. The signature imaging processing method of an OFD document according to claim 1 or 2, wherein the target area is: and a minimum rectangular area containing the user signature information.
4. The signature imaging processing method of an OFD document according to claim 1, wherein the image attribute information includes: and the length and width information of the target signature image.
5. A signature imaging processing system of an OFD document, comprising: the system comprises a processing module, an integrating module and an operating module;
the processing module is used for: extracting a target area containing user signature information from a target OFD document, and performing image conversion processing on the target area to obtain a target signature image;
the integration module is used for: acquiring image attribute information of the target signature image, acquiring position information of the target area in the target OFD document, and carrying out format integration on the image attribute information and the position information based on OFD document standards to obtain integrated format information in an xml format;
the operation module is used for: and storing the integrated format information and the target signature image into the target OFD document to display the user signature information in the OFD document in an image form.
6. The OFD document signature imaging processing system according to claim 1, wherein the processing module is specifically configured to:
when a user signs in a preset area of the target OFD document, extracting the user signature information in the preset area, and determining the target area in the preset area.
7. The OFD document signature imaging processing system according to claim 5 or 6, wherein the target area is: and a minimum rectangular area containing the user signature information.
8. The signature imaging processing system of an OFD document according to claim 5, wherein the image attribute information includes: and the length and width information of the target signature image.
9. A storage medium having stored therein instructions which, when read by a computer, cause the computer to execute the signature imaging processing method of an OFD document according to any one of claims 1 to 4.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, causes the computer to perform the signature imaging processing method of the OFD document according to any one of claims 1 to 4.
CN202310172351.XA 2023-02-16 2023-02-16 Signature imaging processing method, system and storage medium based on OFD document Pending CN116402020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310172351.XA CN116402020A (en) 2023-02-16 2023-02-16 Signature imaging processing method, system and storage medium based on OFD document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310172351.XA CN116402020A (en) 2023-02-16 2023-02-16 Signature imaging processing method, system and storage medium based on OFD document

Publications (1)

Publication Number Publication Date
CN116402020A true CN116402020A (en) 2023-07-07

Family

ID=87006463

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310172351.XA Pending CN116402020A (en) 2023-02-16 2023-02-16 Signature imaging processing method, system and storage medium based on OFD document

Country Status (1)

Country Link
CN (1) CN116402020A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883548A (en) * 2023-09-08 2023-10-13 福昕鲲鹏(北京)信息科技有限公司 Method and device for conveniently adding and modifying electronic image in electronic document
CN117521605A (en) * 2024-01-04 2024-02-06 北京点聚信息技术有限公司 Electronic signature method and system for OFD format file

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883548A (en) * 2023-09-08 2023-10-13 福昕鲲鹏(北京)信息科技有限公司 Method and device for conveniently adding and modifying electronic image in electronic document
CN116883548B (en) * 2023-09-08 2023-12-19 福昕鲲鹏(北京)信息科技有限公司 Method and device for conveniently adding and modifying electronic image in electronic document
CN117521605A (en) * 2024-01-04 2024-02-06 北京点聚信息技术有限公司 Electronic signature method and system for OFD format file
CN117521605B (en) * 2024-01-04 2024-03-15 北京点聚信息技术有限公司 Electronic signature method and system for OFD format file

Similar Documents

Publication Publication Date Title
CN109933756B (en) Image file transferring method, device and equipment based on OCR (optical character recognition), and readable storage medium
EP2343670B1 (en) Apparatus and method for digitizing documents
CN116402020A (en) Signature imaging processing method, system and storage medium based on OFD document
US20130181995A1 (en) Handwritten character font library
CN111857893B (en) Method and device for generating annotation graph
CN107689070B (en) Chart data structured extraction method, electronic device and computer-readable storage medium
CN104111922A (en) Processing method and device of streaming document
CN112069991A (en) PDF table information extraction method and related device
CN114663897A (en) Table extraction method and table extraction system
CN110990010A (en) Software interface code generation method and device
CN112926421A (en) Image processing method and apparatus, electronic device, and storage medium
WO2022166707A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN109656652B (en) Webpage chart drawing method, device, computer equipment and storage medium
CN104111913A (en) Processing method and device of streaming document
CN102467490B (en) Font data processing method and device
CN113297425B (en) Document conversion method, device, server and storage medium
CN116245052A (en) Drawing migration method, device, equipment and storage medium
CN115130437A (en) Intelligent document filling method and device and storage medium
CN113378526A (en) PDF paragraph processing method, device, storage medium and equipment
CN113936187A (en) Text image synthesis method and device, storage medium and electronic equipment
CN111401365A (en) OCR image automatic generation method and device
US20240202428A1 (en) Method, device, computer equipment and storage medium for processing pdf files
CN117648914B (en) File generation method and device and terminal equipment
KR102598210B1 (en) Drawing information recognition method of engineering drawings, drawing information recognition system, computer program therefor
CN117391045B (en) Method for outputting file with portable file format capable of copying Mongolian

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