PDF file-based comment separation processing method and device

文档序号:1363074 发布日期:2020-08-11 浏览:6次 中文

阅读说明:本技术 基于pdf文件的批注分离的处理方法及装置 (PDF file-based comment separation processing method and device ) 是由 浦坚坚 贲锋 徐海洋 孙国生 周美江 宋蕊 于 2020-04-23 设计创作,主要内容包括:本发明提供了一种基于PDF文件的批注分离的处理方法及装置,该方法包括:在PDF文件的目标位置上添加目标批注;将所述目标批注保存为独立于所述PDF文件的批注文件,其中,所述批注文件包括所述目标批注的批注内容、所述目标位置以及所述PDF文件与所述目标批注的对应关系;当所述PDF文件被重新打开时,根据所述批注文件将所述批注内容加载在所述PDF文件的对应位置上。在本发明中,批注内容并不写入PDF文件中,而是单独生成批注文件,因此,PDF文件不会因添加批注而发生改变,从而保持了该PDF文件的可靠性。(The invention provides a PDF file-based comment separation processing method and a PDF file-based comment separation processing device, wherein the method comprises the following steps: adding a target annotation at a target position of the PDF file; saving the target annotation as an annotation file independent of the PDF file, wherein the annotation file comprises annotation content of the target annotation, the target position and a corresponding relation between the PDF file and the target annotation; and when the PDF file is reopened, loading the annotation content on the corresponding position of the PDF file according to the annotation file. In the invention, the annotation content is not written into the PDF file, but the annotation file is independently generated, so that the PDF file is not changed due to the addition of the annotation, thereby maintaining the reliability of the PDF file.)

1. A processing method of batch note information is characterized by comprising the following steps:

adding a target annotation at a target position of the PDF file;

saving the target annotation as an annotation file independent of the PDF file, wherein the annotation file comprises annotation content of the target annotation, the target position and a corresponding relation between the PDF file and the target annotation;

and when the PDF file is reopened, loading the annotation content on the corresponding position of the PDF file according to the annotation file.

2. The method of claim 1, wherein adding a target annotation to a target location of a PDF file comprises:

acquiring a first interactive operation when the cursor stays at the target position;

and responding to the first interactive operation, and adding the target annotation on the target position.

3. The method of claim 2, wherein adding a target annotation to a target location of a PDF file comprises:

pre-stored information is selected from a knowledge base as or as part of the annotation content.

4. The method of claim 1, wherein when adding a target annotation at a target location of a PDF file, the method further comprises:

displaying an identifier of the target annotation on the target position;

displaying an annotation list on a second display area outside the first display area for displaying the PDF file, wherein the annotation list comprises the annotation content corresponding to the mark of the target annotation.

5. The method of claim 1, wherein saving the target annotation as an annotation file separate from the PDF file comprises:

uploading the annotation content of the target annotation and the target position to a database, and establishing a corresponding relation between the PDF file and the target annotation, wherein the corresponding relation is a matching relation between the file name of the PDF file under the relative path and the target annotation.

6. The method according to claim 1, wherein when the PDF file is reopened, loading the annotation content on the corresponding position of the PDF file according to the annotation file comprises:

when the PDF file is reopened on a first terminal or a second terminal, matching a corresponding target annotation for the PDF file in the database according to the corresponding relation, wherein the first terminal is a terminal for adding the target annotation, and the second terminal is other terminals except the first terminal;

and when the matching is successful, generating and displaying the annotation list in the second display area according to the annotation content of the target annotation stored in the database and the target position.

7. The method of claim 1, further comprising:

when the PDF file is transmitted, the PDF file and the target annotation are transmitted separately.

8. The method of claim 4, further comprising:

editing and modifying the annotation content in the annotation list, and synchronizing the edited and modified annotation content to the database.

9. An apparatus for processing comment information, comprising:

the adding module is used for adding a target annotation at the target position of the PDF file;

the storage module is configured to store the target annotation as an annotation file independent of the PDF file, where the annotation file includes annotation content of the target annotation, the target location, and a corresponding relationship between the PDF file and the target annotation;

and the loading module is used for loading the annotation content on the corresponding position of the PDF file according to the annotation file when the PDF file is reopened.

10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 8 when executed.

11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 8.

Technical Field

The invention relates to the field of file processing, in particular to a PDF file-based comment separation processing method and device.

Background

Currently, paperless office has become a necessary trend, and PDF has become an important delivery format for digital examination as the most common printing format. When an engineer processes a file in a PDF format, annotation information needs to be added to the PDF file, however, in the existing annotation adding manner, annotation content needs to be written into the PDF file, which actually changes the original PDF file, for example, the MD5 value of the original PDF file is changed, thereby reducing the reliability of the original PDF file.

Disclosure of Invention

The embodiment of the invention provides a method and a device for processing annotation information, which are used for at least solving the problem that in the related art, when annotations are added to a PDF (portable document format) file, the annotation content needs to be written into the PDF file, so that the reliability of the PDF file is reduced.

According to an embodiment of the present invention, there is provided a method for processing batch annotation information, including: adding a target annotation at a target position of the PDF file; saving the target annotation as an annotation file independent of the PDF file, wherein the annotation file comprises annotation content of the target annotation, the target position and a corresponding relation between the PDF file and the target annotation; and when the PDF file is reopened, loading the annotation content on the corresponding position of the PDF file according to the annotation file.

Optionally, adding a target annotation to the target location of the PDF file includes: acquiring a first interactive operation when the cursor stays at the target position; and responding to the first interactive operation, and adding the target annotation on the target position.

Optionally, adding a target annotation to the target location of the PDF file includes: pre-stored information is selected from a knowledge base as or as part of the annotation content.

Optionally, when adding a target annotation to a target location of the PDF file, the method further includes: displaying an identifier of the target annotation on the target position; displaying an annotation list on a second display area outside the first display area for displaying the PDF file, wherein the annotation list comprises the annotation content corresponding to the mark of the target annotation.

Optionally, saving the target annotation as an annotation file independent of the PDF file comprises: uploading the annotation content of the target annotation and the target position to a database, and establishing a corresponding relation between the PDF file and the target annotation, wherein the corresponding relation is a matching relation between the file name of the PDF file under the relative path and the target annotation.

Optionally, when the PDF file is reopened, loading the annotation content on the corresponding location of the PDF file according to the annotation file, including: when the PDF file is reopened on a first terminal or a second terminal, matching a corresponding target annotation for the PDF file in the database according to the corresponding relation, wherein the first terminal is a terminal for adding the target annotation, and the second terminal is other terminals except the first terminal; and when the matching is successful, generating and displaying the annotation list in the second display area according to the annotation content of the target annotation stored in the database and the target position.

Optionally, the method further comprises: when the PDF file is transmitted, the PDF file and the target annotation are transmitted separately.

Optionally, the method further comprises: editing and modifying the annotation content in the annotation list, and synchronizing the edited and modified annotation content to the database.

According to another embodiment of the present invention, there is provided an apparatus for processing batch annotation information, including: the adding module is used for adding a target annotation at the target position of the PDF file; the storage module is configured to store the target annotation as an annotation file independent of the PDF file, where the annotation file includes annotation content of the target annotation, the target location, and a corresponding relationship between the PDF file and the target annotation; and the loading module is used for loading the annotation content on the corresponding position of the PDF file according to the annotation file when the PDF file is reopened.

According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.

According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.

In the above embodiment of the present invention, the annotation content is not written in the PDF file, but the annotation file is generated separately, and therefore, the PDF file is not changed by adding the annotation, thereby maintaining the reliability of the PDF file.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

FIG. 1 is a flow chart of a method of processing annotation information according to an embodiment of the invention;

FIG. 2 is a flow chart of a method of processing annotation information according to another embodiment of the invention;

FIG. 3 is a schematic illustration of an annotation addition interface according to an embodiment of the invention;

FIG. 4 is a schematic diagram of an annotation list editing interface according to an embodiment of the invention;

fig. 5 is a schematic structural diagram of a device for processing annotation information according to an embodiment of the invention.

Detailed Description

The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据渲染方法、装置、介质及电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!