CN111881653A - Method for positioning impressions in batch PDF (Portable document Format) documents - Google Patents

Method for positioning impressions in batch PDF (Portable document Format) documents Download PDF

Info

Publication number
CN111881653A
CN111881653A CN202010696214.2A CN202010696214A CN111881653A CN 111881653 A CN111881653 A CN 111881653A CN 202010696214 A CN202010696214 A CN 202010696214A CN 111881653 A CN111881653 A CN 111881653A
Authority
CN
China
Prior art keywords
vertex
stamp
base point
stamping
stamping base
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
CN202010696214.2A
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.)
Jiangxi Kinggrid Technology Co ltd
Original Assignee
Jiangxi Kinggrid 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 Jiangxi Kinggrid Technology Co ltd filed Critical Jiangxi Kinggrid Technology Co ltd
Priority to CN202010696214.2A priority Critical patent/CN111881653A/en
Publication of CN111881653A publication Critical patent/CN111881653A/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/166Editing, e.g. inserting or deleting
    • 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/186Templates

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)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for positioning stamps in batch PDF documents, which comprises the steps of obtaining the vertex of a stamp corner, calculating the position distance between the vertex of the stamp corner and the vertex of a page, determining the coordinates of stamping base points of the stamps, and determining the stamping position of a stamp according to the position combination of the coordinates of a first stamping base point and the coordinates of a second stamping base point. The invention realizes that the user signs the file in a WYSIWYG mode without considering the rotation and the size of the file, and realizes the convenient, quick, efficient and accurate signing of the multi-PDF document.

Description

Method for positioning impressions in batch PDF (Portable document Format) documents
Technical Field
The invention relates to an electronic document processing technology, in particular to a method for positioning impressions in batch PDF documents.
Background
Audit hospitals and examination centers often need to carry out approval, seal and signing operations on batch PDF files. The PDF files are dozens of less files and thousands of files, are converted from CAD drawing files, have different sizes and different rotation angles, but have fixed stamping positions. If the operation is carried out manually one by one, the operation is time-consuming and labor-consuming. If batch signing is carried out, a large number of PDF documents with different angles and sizes need to be signed and stamped, and because the coordinate positions of the documents with different angles and sizes are changed and an accurate positioning mode does not exist, the stamping position cannot be determined, so that the situation that the signature positions are not correct and even cannot be seen outside the documents always occurs during batch signing.
Disclosure of Invention
In order to solve the problem of difficult positioning of batch PDF document signing, the invention provides a method for positioning the stamping position of batch PDF documents. The template file and the files needing to be stamped in batches may have different sizes and different angles so as to ensure the accuracy of stamping positions.
The object of the invention is thus achieved. A method for positioning impressions in batch PDF documents comprises the following operation steps:
1) taking the impression angular vertex: acquiring four corner vertexes of the impression in the template file, namely four corner vertexes of a rectangular area where the impression is located;
2) calculating the position distance between the vertex of the impression angle and the vertex of the page: respectively calculating the sum of the horizontal distance and the vertical distance between the four corner vertexes of the stamp and the page vertex in the corresponding direction of the stamp as the position distance between the corner vertexes of the stamp and the page vertex;
3) determining the coordinates of a stamping base point: selecting a position distance point, closest to the vertex of the page, of the vertex of the angle in the step 2) as a default first stamping base point coordinate;
4) determining second stamping base point coordinates: calculating a second stamping base point coordinate of the stamp by respectively adding the height and the width of the stamp to the first stamping base point coordinate in the step 3);
5) and determining the stamping position of the stamp according to the position combination of the first stamping base point coordinate and the second stamping base point coordinate.
Further, the first stamping base point is designated by the user.
The invention realizes that the user signs the file in a WYSIWYG mode without considering the rotation and the size of the file; the speed of stamping is improved by about 18 times compared with manual stamping, the positioning accuracy is 100%, and the multi-PDF document is conveniently, quickly, efficiently and accurately signed.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a schematic view of an impression positioning according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a stamp insertion according to an embodiment of the present invention;
fig. 4 is a schematic diagram of stamp position calculation according to an embodiment of the present invention.
Detailed Description
The invention is further illustrated below with reference to the figures and examples. Referring to fig. 1 to 4, a method for positioning impressions in a batch PDF document includes the following specific operation steps (as shown in fig. 1):
1) opening the PDF document, and acquiring impression information: obtaining four corner points of the impression in the template file, namely: pA, pB, pC, pD (as shown in FIG. 2), i.e., the four corner vertices of the rectangular region where the stamp is located;
2) and respectively calculating the position distances between the four vertex points of the impression and the four vertex points of the page, namely: dA = Adx + Ady, dB = Bdx + Bdy, dC = Cdx + Cdy, dD = Ddx + Ddy (see fig. 2);
3) obtaining the coordinates of a stamping base point: selecting the point closest to the top point of the page (i.e. the minimum position distance) as the default stamping base point coordinate (i.e. the minimum value dMin in dA, dB, dC, and dD, and pC point in fig. 1) for stamping, or the user can designate the stamping base point by himself;
4) taking the width dWith, height dHeight of the impression (see fig. 2);
5) acquiring the page number nPageIndex of the impression (namely the number of pages covered on the document by the impression is shown in figure 3);
6) fixed reference origin: the upper left corner of the default page is taken as the origin of reference (fourth quadrant) poorg (see fig. 2 and 3);
7) obtaining the rotation angle pRoacate of the page where the impression is located (see FIG. 2);
8) determining the original vertex coordinates of the stamp picture: calculating the vertex coordinates pTop of the stamp picture according to pOrg, pRoace and dMin (dMin = minX + minY), and keeping consistent with the quadrant of the reference origin (see figure 3);
9) determining the coordinates of the diagonal vertices: obtaining coordinates pBottom of the diagonal vertex of the pTop according to the pTop, dWidth and dHeight (see figure 3);
10) completing the insertion of the stamp picture: inserting the seal picture data is completed according to the page number PageIndex and the coordinates pTop and pBottomn of the two fixed points (see figure 3).
The actual operation flow of the user is as follows:
1. and taking any one document from the documents needing to be stamped in batches as a TFile (template file).
2. A stamp is added to the template document as TSeal.
3. From step 1) to step 10) according to a specific operation method, obtaining SealPos (seal position), which comprises: page number, vertex, and bottom.
Four points of TSeal (impression) were taken at different rotation angles of the page, the positions from the four vertices of the page (see table 1) are as follows:
table 1:
Figure RE-DEST_PATH_IMAGE001
(Note: the coordinate transformation in Table 1 is shown in FIG. 4)
4. And stamping according to SealPos (stamping position).
Comparison of performance for the three signing modalities (see table 2):
table 2:
Figure RE-623573DEST_PATH_IMAGE002
as can be seen from table 2:
A. and (3) manual stamping: because the documents are manually stamped after being opened one by one, the time consumption is 9700S, the accuracy rate is 100%, but the time consumption, the labor consumption and the positioning are difficult, and the position is easily stamped in a wrong way.
B. Traditional seal in batches: the stamping position is fixed, the documents with multiple rotation angles and different sizes cannot be adapted, the time consumption is 480S, the accuracy rate is 35%, and the error rate is high.
C. Accurate stamp in batches: and (3) dynamically calculating the position, adapting to various documents (different angles and sizes), wherein the time consumption is 560S, and the accuracy is 100%.
According to the positioning method of the printing die in the batch PDF document, the speed of stamping and stamping is improved by about 18 times compared with the speed of manual stamping, and the accuracy rate of stamping positioning is 100%.

Claims (2)

1. A method for positioning impressions in batch PDF documents is characterized by comprising the following operation steps:
1) taking the impression angular vertex: acquiring four corner vertexes of the impression in the template file, namely four corner vertexes of a rectangular area where the impression is located;
2) calculating the position distance between the vertex of the impression angle and the vertex of the page: respectively calculating the sum of the horizontal distance and the vertical distance between the four corner vertexes of the stamp and the page vertex in the corresponding direction of the stamp as the position distance between the corner vertexes of the stamp and the page vertex;
3) determining the coordinates of a stamping base point: selecting a position distance point, closest to the vertex of the page, of the vertex of the angle in the step 2) as a default first stamping base point coordinate;
4) determining second stamping base point coordinates: calculating a second stamping base point coordinate of the stamp by respectively adding the height and the width of the stamp to the first stamping base point coordinate in the step 3);
5) and determining the stamping position of the stamp according to the position combination of the first stamping base point coordinate and the second stamping base point coordinate.
2. The method of claim 1, wherein the first stamping base point is designated by a user.
CN202010696214.2A 2020-07-20 2020-07-20 Method for positioning impressions in batch PDF (Portable document Format) documents Pending CN111881653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010696214.2A CN111881653A (en) 2020-07-20 2020-07-20 Method for positioning impressions in batch PDF (Portable document Format) documents

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010696214.2A CN111881653A (en) 2020-07-20 2020-07-20 Method for positioning impressions in batch PDF (Portable document Format) documents

Publications (1)

Publication Number Publication Date
CN111881653A true CN111881653A (en) 2020-11-03

Family

ID=73154755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010696214.2A Pending CN111881653A (en) 2020-07-20 2020-07-20 Method for positioning impressions in batch PDF (Portable document Format) documents

Country Status (1)

Country Link
CN (1) CN111881653A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116341499A (en) * 2023-03-27 2023-06-27 北京安证通信息科技股份有限公司 Method for realizing batch stamping of PDF and OFD documents

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09186850A (en) * 1995-12-29 1997-07-15 Ricoh Co Ltd Stamp printer
JP2008271445A (en) * 2007-04-24 2008-11-06 Kyocera Mita Corp Image forming apparatus and image forming program
CN106779590A (en) * 2016-12-01 2017-05-31 百望电子发票数据服务有限公司 The generation method and system of a kind of E-seal
CN108280371A (en) * 2018-01-28 2018-07-13 丁超 Generate method, computer readable storage medium and the computing device of electronic document
CN108363779A (en) * 2018-02-08 2018-08-03 上海炬元机器人有限公司 A kind of method of batch autocad file intelligence inserting block
CN108805926A (en) * 2017-04-27 2018-11-13 珠海汇金科技股份有限公司 A kind of batch printing control method based on image recognition
CN109101150A (en) * 2018-07-20 2018-12-28 广州视源电子科技股份有限公司 Element insertion method, device, electronic equipment and computer readable storage medium
CN109446760A (en) * 2018-09-17 2019-03-08 江苏敏行信息技术有限公司 Electronic Signature localization method in a kind of webpage PDF
CN109687968A (en) * 2018-11-28 2019-04-26 航天信息股份有限公司 A kind of method and system for realizing Electronic Signature
CN109934003A (en) * 2019-03-13 2019-06-25 中国建设银行股份有限公司 A kind of E-seal covers method, apparatus and electronic equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09186850A (en) * 1995-12-29 1997-07-15 Ricoh Co Ltd Stamp printer
JP2008271445A (en) * 2007-04-24 2008-11-06 Kyocera Mita Corp Image forming apparatus and image forming program
CN106779590A (en) * 2016-12-01 2017-05-31 百望电子发票数据服务有限公司 The generation method and system of a kind of E-seal
CN108805926A (en) * 2017-04-27 2018-11-13 珠海汇金科技股份有限公司 A kind of batch printing control method based on image recognition
CN108280371A (en) * 2018-01-28 2018-07-13 丁超 Generate method, computer readable storage medium and the computing device of electronic document
CN108363779A (en) * 2018-02-08 2018-08-03 上海炬元机器人有限公司 A kind of method of batch autocad file intelligence inserting block
CN109101150A (en) * 2018-07-20 2018-12-28 广州视源电子科技股份有限公司 Element insertion method, device, electronic equipment and computer readable storage medium
CN109446760A (en) * 2018-09-17 2019-03-08 江苏敏行信息技术有限公司 Electronic Signature localization method in a kind of webpage PDF
CN109687968A (en) * 2018-11-28 2019-04-26 航天信息股份有限公司 A kind of method and system for realizing Electronic Signature
CN109934003A (en) * 2019-03-13 2019-06-25 中国建设银行股份有限公司 A kind of E-seal covers method, apparatus and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116341499A (en) * 2023-03-27 2023-06-27 北京安证通信息科技股份有限公司 Method for realizing batch stamping of PDF and OFD documents

Similar Documents

Publication Publication Date Title
WO2021072879A1 (en) Method and apparatus for extracting target text in certificate, device, and readable storage medium
CN105009170B (en) Object identification equipment, method and storage medium
WO2021184578A1 (en) Ocr-based target field recognition method and apparatus, electronic device, and storage medium
JP5387193B2 (en) Image processing system, image processing apparatus, and program
CN110674815A (en) Invoice image distortion correction method based on deep learning key point detection
WO2018233055A1 (en) Method and apparatus for entering policy information, computer device and storage medium
CN108805519B (en) Electronic generation method and device for paper schedule and electronic schedule generation method
WO2021017272A1 (en) Pathology image annotation method and device, computer apparatus, and storage medium
CN110727747A (en) Paper map rapid vectorization method and system based on longitude and latitude recognition
WO2021051527A1 (en) Image segmentation-based text positioning method, apparatus and device, and storage medium
CN111881653A (en) Method for positioning impressions in batch PDF (Portable document Format) documents
CN109447019A (en) Document electronic method is scanned based on image recognition and the papery of database purchase
US11023770B2 (en) Systems and methods for obtaining templates for tessellated images
CN104881641B (en) Mobile device-based questionnaire and table Digital identification method and system
CN113657377A (en) Structured recognition method for airplane ticket printing data image
CN116994269A (en) Seal similarity comparison method and seal similarity comparison system in image document
JP2004188201A (en) Method to automatically construct two-dimensional statistical form model for lung area
JP7209161B2 (en) Character reader and program for character reader
CN110717060A (en) Image mask filtering method and device and storage medium
CN114399623B (en) Universal answer identification method, system, storage medium and computing device
US11829194B2 (en) Method and system for deriving a digital representation of an unfolded blank and for cost estimation based upon the same
CN115035032A (en) Neural network training method, related method, device, terminal and storage medium
CN109214266A (en) Method, computer readable recording medium and system for image procossing
CN112163552A (en) Labeling method and device for key points of nose, electronic equipment and storage medium
CN110598751A (en) Anchor point generating method based on geometric attributes

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201103