CN110807301B - Method and device for editing document, computer storage medium and terminal - Google Patents

Method and device for editing document, computer storage medium and terminal Download PDF

Info

Publication number
CN110807301B
CN110807301B CN201810871717.1A CN201810871717A CN110807301B CN 110807301 B CN110807301 B CN 110807301B CN 201810871717 A CN201810871717 A CN 201810871717A CN 110807301 B CN110807301 B CN 110807301B
Authority
CN
China
Prior art keywords
check box
editing instruction
editing
determined
preset
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.)
Active
Application number
CN201810871717.1A
Other languages
Chinese (zh)
Other versions
CN110807301A (en
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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile 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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201810871717.1A priority Critical patent/CN110807301B/en
Publication of CN110807301A publication Critical patent/CN110807301A/en
Application granted granted Critical
Publication of CN110807301B publication Critical patent/CN110807301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

A method, a device, a computer storage medium and a terminal for editing a document comprise: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction; and adding a preset check box control at the determined position where the first editing instruction is received. The embodiment of the invention realizes the editing processing of the non-standard protocol check box and improves the document editing efficiency of the user.

Description

Method and device for editing document, computer storage medium and terminal
Technical Field
The present disclosure relates to, but is not limited to, information editing technologies, and in particular, to a method, an apparatus, a computer storage medium, and a terminal for editing a document.
Background
The types of check boxes are defined in a standard protocol of a portable document format (PDF, portable Document Format, a file format developed by Adobe Systems for file exchange in a mode irrelevant to an application program, an operating system and hardware), the size and the position of the check boxes can be analyzed when the document is analyzed, whether to check or not and other relevant attributes can be analyzed, and when a user clicks the check boxes, check or cancel check can be performed in the check boxes.
The PDF document also comprises a check box of a non-standard protocol existing in a scanning or other editing mode, wherein the check box of the non-standard protocol is similar to the text content of a picture, and can not carry out checking and cancel checking operations; fig. 1 is a diagram showing a non-standard protocol check box in the related art, and as shown in fig. 1, although the non-standard protocol check box is basically the same as the standard protocol check box in terms of display content, that is, the non-standard protocol check box looks like a form file, the display element inside does not contain the attribute of the check box, and editing operations including checking and unchecking cannot be performed on the non-standard protocol check box.
The non-standard protocol check box cannot carry out editing operation allowed by the standard protocol check box, so that the document editing efficiency of a user is affected.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the invention provides a method, a device, a computer storage medium and a terminal for editing a document, which can improve the document editing efficiency of a user.
The embodiment of the invention provides a method for editing a document, which comprises the following steps:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
and adding a preset check box control at the determined position where the first editing instruction is received.
Optionally, before determining the location of receiving the first editing instruction, the method further includes:
the non-standard protocol check box is identified.
Optionally, the check box control includes some or all of the following attributes:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
Optionally, after the adding the preset check box control, the method further includes:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
On the other hand, the embodiment of the invention also provides a device for editing the document, which comprises: a determination unit and an addition unit; wherein,,
the determining unit is used for: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
the adding unit is used for: and adding a preset check box control at the determined position where the first editing instruction is received.
Optionally, the device further comprises an identification unit for: the non-standard protocol check box is identified.
Optionally, the check box control includes some or all of the following attributes:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
Optionally, the device further includes a deleting unit, configured to:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
In yet another aspect, embodiments of the present invention further provide a computer storage medium having stored therein computer-executable instructions for performing the above-described method of document editing.
In yet another aspect, an embodiment of the present invention further provides a terminal, including: a memory and a processor; wherein,,
the processor is configured to execute the program instructions in the memory;
the program instructions read at the processor:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
and adding a preset check box control at the determined position where the first editing instruction is received.
Compared with the related art, the technical scheme of the application comprises the following steps: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction; and adding a preset check box control at the determined position where the first editing instruction is received. The embodiment of the invention realizes the editing processing of the non-standard protocol check box and improves the document editing efficiency of the user.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate and do not limit the invention.
FIG. 1 is a diagram of a non-standard protocol check box in the related art;
FIG. 2 is a flow chart of a method of document editing according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of adding check box controls according to an embodiment of the present invention;
FIG. 4 is a block diagram showing the structure of a document editing apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail hereinafter with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be arbitrarily combined with each other.
The steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
FIG. 1 is a flowchart of a method for editing a document according to an embodiment of the present invention, as shown in FIG. 1, including:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
and adding a preset check box control at the determined position where the first editing instruction is received.
It should be noted that, the document editing in the embodiment of the present invention includes PDF document editing in a portable document format; the method for adding the check box control in the embodiment of the invention can be performed by referring to the insertion method of the check box control during editing of the PDF document.
In addition, the embodiment of the invention can also determine the accurate position of the added check box control by means of related technology; the method includes, but is not limited to, determining a nearest box for checking in a non-standard protocol check box in a position based on an image recognition method after determining the position for receiving a first editing instruction, and performing covering processing on the determined box by an added check box control based on the determined box position so as to achieve that the check box control and the non-standard protocol check box can obtain a good display effect when displayed.
Optionally, before determining the location of receiving the first editing instruction, the method further includes:
the non-standard protocol check box is identified.
It should be noted that, the non-standard protocol check box may be identified by an existing image identification method in the related art, which is not described herein.
Optionally, the check box control includes some or all of the following attributes:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
It should be noted that, the check box control in the embodiment of the invention may also include a control with other chart category attribute being a non-broken line; for example, filled dots represent selected check box controls; furthermore, the checkbox control may also be used to negate the content of non-standard protocol checkboxes, e.g., checkbox controls for forking; the added check box control can be analyzed according to the current document content by a person skilled in the art, and the attribute of the check box control is determined; modifications are made by those skilled in the art based on the determined attributes.
Optionally, after the adding the preset check box control, the method further includes:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
It should be noted that, after the first editing instruction and the second editing instruction in the embodiment of the present invention may be analyzed by a person skilled in the art in combination with the existing editing instruction in the related art, other instructions designed to distinguish the existing editing instruction may be an instruction generated by a compound key, an instruction generated after a shortcut menu is added through a left key or a right key of a mouse, or an instruction generated by a newly added editing key in a PDF toolbar.
Fig. 3 is a schematic diagram of adding a check box control according to an embodiment of the present invention, and after adding the check box control, the user checks in the PDF document and checks the standard protocol check box have no difference in display. When the user inputs a second editing instruction, the check box control in the schematic diagram is deleted, and fig. 3 is restored to fig. 1.
Compared with the related art, the technical scheme of the application comprises the following steps: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction; and adding a preset check box control at the determined position where the first editing instruction is received. The embodiment of the invention realizes the editing processing of the non-standard protocol check box and improves the document editing efficiency of the user.
FIG. 4 is a block diagram of an apparatus for editing a document according to an embodiment of the present invention, as shown in FIG. 4, including: a determination unit and an addition unit; wherein,,
the determining unit is used for: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
the adding unit is used for: and adding a preset check box control at the determined position where the first editing instruction is received.
It should be noted that, the document editing in the embodiment of the present invention includes PDF document editing in a portable document format; the method for adding the check box control in the embodiment of the invention can be performed by referring to the insertion method of the check box control during editing of the PDF document.
In addition, the embodiment of the invention can also determine the accurate position of the added check box control by means of related technology; the method includes, but is not limited to, determining a nearest box for checking in a non-standard protocol check box in a position based on an image recognition method after determining the position for receiving a first editing instruction, and performing covering processing on the determined box by an added check box control based on the determined box position so as to achieve that the check box control and the non-standard protocol check box can obtain a good display effect when displayed.
Optionally, the device of the embodiment of the present invention further includes an identification unit, configured to: the non-standard protocol check box is identified.
It should be noted that, the non-standard protocol check box may be identified by an existing image identification method in the related art, which is not described herein.
Optionally, the check box control in the embodiment of the present invention includes some or all of the following properties:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
It should be noted that, the check box control in the embodiment of the invention may also include a control with other chart category attribute being a non-broken line; for example, filled dots represent selected check box controls; furthermore, the checkbox control may also be used to negate the content of non-standard protocol checkboxes, e.g., checkbox controls for forking; the added check box control can be analyzed according to the current document content by a person skilled in the art, and the attribute of the check box control is determined; modifications are made by those skilled in the art based on the determined attributes.
Optionally, the device of the embodiment of the present invention further includes a deleting unit, configured to:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
It should be noted that, after the first editing instruction and the second editing instruction in the embodiment of the present invention may be analyzed by a person skilled in the art in combination with the existing editing instruction in the related art, other instructions designed to distinguish the existing editing instruction may be an instruction generated by a compound key, an instruction generated after a shortcut menu is added through a left key or a right key of a mouse, or an instruction generated by a newly added editing key in a PDF toolbar.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions for executing the method for editing the document.
The embodiment of the invention also provides a terminal, which comprises: a memory and a processor; wherein the processor is configured to execute the program instructions in the memory;
the program instructions read at the processor:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
and adding a preset check box control at the determined position where the first editing instruction is received.
It should be noted that, the document editing in the embodiment of the present invention includes PDF document editing in a portable document format; in addition, the method for adding the check box control in the embodiment of the invention can be performed by referring to the insertion method of the check box control during editing the PDF document.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the methods described above may be performed by a program that instructs associated hardware (e.g., a processor) to perform the steps, and that the program may be stored on a computer readable storage medium such as a read only memory, a magnetic or optical disk, etc. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, for example, by an integrated circuit, or may be implemented in the form of a software functional module, for example, by a processor executing programs/instructions stored in a memory to implement their respective functions. The present invention is not limited to any specific form of combination of hardware and software.
Although the embodiments of the present invention are described above, the embodiments are only used for facilitating understanding of the present invention, and are not intended to limit the present invention. Any person skilled in the art can make any modification and variation in form and detail without departing from the spirit and scope of the present disclosure, but the scope of the present disclosure is to be determined by the appended claims.

Claims (10)

1. A method for editing a PDF document in a portable document format, comprising:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
adding a preset check box control at the determined position where the first editing instruction is received;
after the position for receiving the first editing instruction is determined, determining the nearest box for checking in a non-standard protocol check box in the position, and based on the determined box position, performing coverage processing on the determined box by the added check box control.
2. The method of claim 1, wherein prior to determining the location at which the first editing instruction was received, the method further comprises:
the non-standard protocol check box is identified.
3. The method of claim 1, wherein the checkbox control contains some or all of the following attributes:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
4. A method according to any one of claims 1 to 3, wherein after adding a preset check box control, the method further comprises:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
5. An apparatus for editing a PDF document in a portable document format, comprising: a determination unit and an addition unit; wherein,,
the determining unit is used for: when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
the adding unit is used for: adding a preset check box control at the determined position where the first editing instruction is received; after the position for receiving the first editing instruction is determined, determining the nearest box for checking in a non-standard protocol check box in the position, and based on the determined box position, performing coverage processing on the determined box by the added check box control.
6. The apparatus according to claim 5, further comprising an identification unit for: the non-standard protocol check box is identified.
7. The apparatus of claim 5, wherein the checkbox control contains some or all of the following attributes:
the type attribute is annotation Annot and the chart category Subtype attribute is PolyLine.
8. The apparatus according to any one of claims 5 to 7, further comprising a deletion unit configured to:
and deleting the check box control when a preset second editing instruction is received on the added check box control.
9. A computer storage medium having stored therein computer executable instructions for performing the method of document editing of any one of claims 1 to 4.
10. A terminal, comprising: a memory and a processor; wherein,,
the processor is configured to execute the program instructions in the memory;
the program instructions read at the processor:
when a preset first editing instruction is received in a non-standard protocol check box, determining the position for receiving the first editing instruction;
adding a preset check box control at the determined position where the first editing instruction is received;
after the position for receiving the first editing instruction is determined, determining the nearest box for checking in a non-standard protocol check box in the position, and based on the determined box position, performing coverage processing on the determined box by the added check box control.
CN201810871717.1A 2018-08-02 2018-08-02 Method and device for editing document, computer storage medium and terminal Active CN110807301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810871717.1A CN110807301B (en) 2018-08-02 2018-08-02 Method and device for editing document, computer storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810871717.1A CN110807301B (en) 2018-08-02 2018-08-02 Method and device for editing document, computer storage medium and terminal

Publications (2)

Publication Number Publication Date
CN110807301A CN110807301A (en) 2020-02-18
CN110807301B true CN110807301B (en) 2023-06-27

Family

ID=69486865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810871717.1A Active CN110807301B (en) 2018-08-02 2018-08-02 Method and device for editing document, computer storage medium and terminal

Country Status (1)

Country Link
CN (1) CN110807301B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930399A (en) * 2010-08-16 2010-12-29 于秀山 Method for recording software test

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930399A (en) * 2010-08-16 2010-12-29 于秀山 Method for recording software test

Also Published As

Publication number Publication date
CN110807301A (en) 2020-02-18

Similar Documents

Publication Publication Date Title
US20180018512A1 (en) Method, apparatus, system, and storage medium for detecting information card in image
CN108255513A (en) Electronic device, the data-interface based on springmvc and its illustrate automatic generation method and storage medium
CN109558118B (en) Method, apparatus, device and storage medium for creating native components of a smart applet
CN110874216B (en) Complete code generation method, device, equipment and storage medium
US9613288B2 (en) Automatically identifying and healing spots in images
CN111813466A (en) Watermark adding method, device, terminal equipment and computer storage medium
CN107621951B (en) View level optimization method and device
CN111008934B (en) Scene construction method, device, equipment and storage medium
CN110807301B (en) Method and device for editing document, computer storage medium and terminal
CN112598687A (en) Image segmentation method and device, storage medium and electronic equipment
CN106293671B (en) Method and device for generating component template
CN111914517A (en) Document hyperlink creating method and device, electronic equipment and readable storage medium
CN111553172A (en) Translation document display method, device, system and storage medium
CN110647377A (en) Picture processing system, device and medium for human-computer interaction interface
CN111054072B (en) Method, device, equipment and storage medium for role model tailing
CN113590564A (en) Data storage method and device, electronic equipment and storage medium
CN111866065A (en) Rendering image returning method and device
CN111198858A (en) File processing method and device, computer storage medium and terminal
CN112015416A (en) Verification method and device for developing webpage, electronic equipment and computer readable medium
CN111414470A (en) Method and device for processing document, computer storage medium and terminal
CN111104786A (en) Document tracking method and device, computer storage medium and terminal
CN111367898A (en) Data processing method, device, system, electronic equipment and storage medium
CN111222307B (en) Font editing method and device, computer storage medium and terminal
CN110795046B (en) Document printing method and device, computer storage medium and terminal
KR101458155B1 (en) Apparatus and method for generating edited document

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
GR01 Patent grant
GR01 Patent grant