CN111581921B - Text editing method and device, computer storage medium and terminal - Google Patents
Text editing method and device, computer storage medium and terminal Download PDFInfo
- Publication number
- CN111581921B CN111581921B CN201910120293.XA CN201910120293A CN111581921B CN 111581921 B CN111581921 B CN 111581921B CN 201910120293 A CN201910120293 A CN 201910120293A CN 111581921 B CN111581921 B CN 111581921B
- Authority
- CN
- China
- Prior art keywords
- text
- characters
- editing
- path data
- determined path
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000005516 engineering process Methods 0.000 description 7
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 5
- 239000010931 gold Substances 0.000 description 5
- 229910052737 gold Inorganic materials 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Document Processing Apparatus (AREA)
Abstract
A method, a device, a computer storage medium and a terminal for text editing comprise: determining path data of the text according to the graphic index of the text for the text to be edited; and editing the text according to the determined path data. The embodiment of the invention avoids messy codes in the text editing process and improves the efficiency and quality of text editing.
Description
Technical Field
The present disclosure relates to, but is not limited to, office application technologies, and in particular, to a method, an apparatus, a computer storage medium, and a terminal for text editing.
Background
When editing a document including portable text format (PDF) text, a user may reduce text input time by copying operations, thereby improving text editing efficiency.
When copying the content in the document, if the same code (Unicode) of the text cannot be found, messy codes can appear in the text copying, and a user needs to determine the text content for the messy codes; taking a text editing process containing gold words as an example, using Unicode as a character identifier, wherein the Unicode of the gold words is 0x91d1; 0x91d1 is placed into a container (e.g., inside an array) during text editing; deleting Unicode corresponding to gold in the container if the gold word is to be deleted; if the Unicode corresponding to gold is not found in the document, the random code appears during editing. When the messy codes are more in the text editing process, the user may need to manually extract the content in the PDF text again, so that the editing quality of the text 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 text, which can avoid messy codes in the text editing process and improve the efficiency and quality of text editing.
The embodiment of the invention provides a text editing method, which comprises the following steps:
determining path data of the text according to the graphic index of the text for the text to be edited;
and editing the text according to the determined path data.
Optionally, the editing process of the text according to the determined path data includes:
according to the determined path data, performing character drawing in the cache;
and adding the drawn characters into a preset editing page to perform text editing processing.
Optionally, the editing page includes any one of the following pages:
a clipboard and a text editor.
Optionally, the text to be edited includes:
portable text format PDF text that needs editing.
On the other hand, the embodiment of the invention also provides a text editing device, which comprises: a determination unit and a processing unit; wherein,
the determining unit is used for: determining path data of the text according to the graphic index of the text for the text to be edited;
the processing unit is used for: and editing the text according to the determined path data.
Optionally, the processing unit is specifically configured to:
according to the determined path data, performing character drawing in the cache;
and adding the drawn characters into a preset editing page to perform text editing processing.
Optionally, the editing page includes any one of the following pages:
a clipboard and a text editor.
Optionally, the text to be edited includes:
portable text format PDF text that needs editing.
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 text editing method.
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:
determining path data of the text according to the graphic index of the text for the text to be edited;
and editing the text according to the determined path data.
Compared with the related art, the technical scheme of the application comprises the following steps: determining path data of the text according to the graphic index of the text for the text to be edited; and editing the text according to the determined path data. The embodiment of the invention avoids messy codes in the text editing process and improves the efficiency and quality of text editing.
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 flow chart of a method of text editing according to an embodiment of the present invention;
fig. 2 is a block diagram of a text 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 text editing method according to an embodiment of the present invention, as shown in FIG. 1, including:
step 101, determining path data of the text according to the graphic index of the text for the text to be edited;
it should be noted that, the path data in the embodiment of the present invention may include: data describing the stroke track of the text. The method for determining the path data of the characters can be realized by referring to the existing analysis processing method in the related technology, and the embodiment of the invention can determine the path data of the characters theoretically only if the characters can be normally displayed in the text to be edited.
And 102, editing the text according to the determined path data.
It should be noted that, the text editing process according to the embodiment of the present invention includes, but is not limited to: and copying the content in the PDF text.
Optionally, according to the determined path data, the editing processing of the text according to the embodiment of the present invention includes:
according to the determined path data, performing character drawing in the cache;
it should be noted that, the processing of text drawing according to the path data in the embodiment of the present invention may be understood as writing text in a cache according to text strokes, and the specific implementation may be designed and implemented by referring to the related theory in the related technology. The embodiment of the invention can realize character drawing only by determining the path data, so that the problem of messy codes in the editing process is avoided, and the text editing quality is improved.
And adding the drawn characters into a preset editing page to perform text editing processing.
Optionally, the editing page in the embodiment of the present invention includes any one of the following editing pages:
a clipboard and a text editor.
It should be noted that, the editing page in the embodiment of the present invention may further include other types of office application editors, to which editing page the drawn text is added, may be set in association with the purpose of text editing processing by a person skilled in the art, may also be set manually by a user according to editing habits, and how to set may be designed and implemented by referring to related technologies, which is not described herein.
Optionally, the text to be edited according to the embodiment of the invention includes:
portable text format PDF text that needs editing.
Compared with the related art, the technical scheme of the application comprises the following steps: determining path data of the text according to the graphic index of the text for the text to be edited; and editing the text according to the determined path data. The embodiment of the invention avoids messy codes in the text editing process and improves the efficiency and quality of text editing.
Fig. 2 is a block diagram of a text editing apparatus according to an embodiment of the present invention, as shown in fig. 2, including: a determination unit and a processing unit; wherein,
the determining unit is used for: determining path data of the text according to the graphic index of the text for the text to be edited;
it should be noted that, the path data in the embodiment of the present invention may include: data describing the stroke track of the text. The method for determining the path data of the characters can be realized by referring to the existing analysis processing method in the related technology, and the embodiment of the invention can determine the path data of the characters theoretically only if the characters can be normally displayed in the text to be edited.
The processing unit is used for: and editing the text according to the determined path data.
It should be noted that, the text editing process according to the embodiment of the present invention includes, but is not limited to: and copying the content in the PDF text.
Optionally, the processing unit in the embodiment of the present invention is specifically configured to:
according to the determined path data, performing character drawing in the cache;
it should be noted that, the processing of text drawing according to the path data in the embodiment of the present invention may be understood as writing text in a cache according to text strokes, and the specific implementation may be designed and implemented by referring to the related theory in the related technology. The embodiment of the invention can realize character drawing only by determining the path data, so that the problem of messy codes in the editing process is avoided, and the text editing quality is improved.
And adding the drawn characters into a preset editing page to perform text editing processing.
Optionally, the editing page in the embodiment of the present invention includes any one of the following editing pages:
a clipboard and a text editor.
It should be noted that, the editing page in the embodiment of the present invention may further include other types of office application editors, to which editing page the drawn text is added, may be set in association with the purpose of text editing processing by a person skilled in the art, may also be set manually by a user according to editing habits, and how to set may be designed and implemented by referring to related technologies, which is not described herein.
Optionally, the text to be edited according to the embodiment of the invention includes:
portable text format PDF text that needs editing.
Compared with the related art, the technical scheme of the application comprises the following steps: determining path data of the text according to the graphic index of the text for the text to be edited; and editing the text according to the determined path data. The embodiment of the invention avoids messy codes in the text editing process and improves the efficiency and quality of text editing.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions for executing the text editing method.
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:
determining path data of the text according to the graphic index of the text for the text to be edited;
and editing the text according to the determined path data.
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 (8)
1. A method of text editing comprising:
determining path data of characters according to graphic indexes of the characters under the condition that the unified code Unicode of the characters is not found in the document for the text in the document to be edited, wherein the path data comprises data for describing stroke tracks of the characters;
editing the text according to the determined path data;
the text editing process according to the determined path data comprises the following steps:
according to the determined path data, performing character drawing in the cache;
adding the drawn characters into a preset editing page to perform text editing processing;
the text drawing in the cache according to the determined path data comprises the following steps: writing the characters into the cache according to strokes of the characters.
2. The method of claim 1, wherein the edit page comprises any one of the following pages:
a clipboard and a text editor.
3. The method according to any one of claims 1-2, wherein the text to be edited comprises:
portable text format PDF text that needs editing.
4. An apparatus for text editing, comprising: a determination unit and a processing unit; wherein,
the determining unit is used for: determining path data of characters according to graphic indexes of the characters under the condition that the unified code Unicode of the characters is not found in the document for the text in the document to be edited, wherein the path data comprises data for describing stroke tracks of the characters;
the processing unit is used for: editing the text according to the determined path data;
wherein, the processing unit is specifically configured to:
according to the determined path data, performing character drawing in the cache;
adding the drawn characters into a preset editing page to perform text editing processing;
the text drawing in the cache according to the determined path data comprises the following steps: writing the characters into the cache according to strokes of the characters.
5. The apparatus of claim 4, wherein the edit page comprises any one of the following pages:
a clipboard and a text editor.
6. The apparatus according to any one of claims 4 to 5, wherein the text to be edited includes:
portable text format PDF text that needs editing.
7. A computer storage medium having stored therein computer executable instructions for performing the method of text editing of any of claims 1 to 3.
8. 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:
determining path data of characters according to graphic indexes of the characters under the condition that the unified code Unicode of the characters is not found in the document for the text in the document to be edited, wherein the path data comprises data for describing stroke tracks of the characters;
editing the text according to the determined path data;
the text editing process according to the determined path data comprises the following steps:
according to the determined path data, performing character drawing in the cache;
adding the drawn characters into a preset editing page to perform text editing processing;
the text drawing in the cache according to the determined path data comprises the following steps: writing the characters into the cache according to strokes of the characters.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910120293.XA CN111581921B (en) | 2019-02-18 | 2019-02-18 | Text editing method and device, computer storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910120293.XA CN111581921B (en) | 2019-02-18 | 2019-02-18 | Text editing method and device, computer storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111581921A CN111581921A (en) | 2020-08-25 |
CN111581921B true CN111581921B (en) | 2024-01-26 |
Family
ID=72116736
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910120293.XA Active CN111581921B (en) | 2019-02-18 | 2019-02-18 | Text editing method and device, computer storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111581921B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001282776A (en) * | 2000-03-30 | 2001-10-12 | Canon Inc | Device and method for processing document, and storage medium |
CN101183355A (en) * | 2006-11-15 | 2008-05-21 | 富士通株式会社 | Program, copy and paste processing method, apparatus, and storage medium |
CN102262619A (en) * | 2010-05-31 | 2011-11-30 | 汉王科技股份有限公司 | Method and device for extracting characters of document |
CN104636322A (en) * | 2015-03-03 | 2015-05-20 | 广东欧珀移动通信有限公司 | Text copying method and text copying device |
CN104834392A (en) * | 2015-06-05 | 2015-08-12 | 庄建楼 | Chinese character input method for dynamic Chinese character combination of strokes |
CN107066438A (en) * | 2017-03-15 | 2017-08-18 | 北京三快在线科技有限公司 | A kind of method for editing text and device, electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9275019B2 (en) * | 2007-12-21 | 2016-03-01 | Sap Se | System and method for performing Unicode matching |
-
2019
- 2019-02-18 CN CN201910120293.XA patent/CN111581921B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001282776A (en) * | 2000-03-30 | 2001-10-12 | Canon Inc | Device and method for processing document, and storage medium |
CN101183355A (en) * | 2006-11-15 | 2008-05-21 | 富士通株式会社 | Program, copy and paste processing method, apparatus, and storage medium |
CN102262619A (en) * | 2010-05-31 | 2011-11-30 | 汉王科技股份有限公司 | Method and device for extracting characters of document |
CN104636322A (en) * | 2015-03-03 | 2015-05-20 | 广东欧珀移动通信有限公司 | Text copying method and text copying device |
CN107797754A (en) * | 2015-03-03 | 2018-03-13 | 广东欧珀移动通信有限公司 | The method and device and medium product that a kind of text replicates |
CN104834392A (en) * | 2015-06-05 | 2015-08-12 | 庄建楼 | Chinese character input method for dynamic Chinese character combination of strokes |
CN107066438A (en) * | 2017-03-15 | 2017-08-18 | 北京三快在线科技有限公司 | A kind of method for editing text and device, electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111581921A (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108108342B (en) | Structured text generation method, search method and device | |
CN111126019B (en) | Report generation method and device based on mode customization and electronic equipment | |
CN104111922A (en) | Processing method and device of streaming document | |
CN111143551A (en) | Text preprocessing method, classification method, device and equipment | |
CN116702723A (en) | Training method, device and equipment for contract paragraph annotation model | |
CN106970758B (en) | Electronic document operation processing method and device and electronic equipment | |
US8930808B2 (en) | Processing rich text data for storing as legacy data records in a data storage system | |
CN115268904A (en) | User interface design file generation method, device, equipment and medium | |
CN102346771B (en) | Information expression method and device | |
CN111581921B (en) | Text editing method and device, computer storage medium and terminal | |
CN111104777A (en) | Document editing method and device, computer storage medium and terminal | |
CN111104805A (en) | Translation processing method and device, computer storage medium and terminal | |
CN112765110B (en) | PDF annotation data generation method, device, equipment and storage medium | |
CN110929472A (en) | Document editing method and device, computer storage medium and terminal | |
CN110941947A (en) | Document editing method and device, computer storage medium and terminal | |
CN108228179A (en) | The international processing method of the page, device, computer and storage medium | |
CN110362790B (en) | Font file processing method and device, electronic equipment and readable storage medium | |
CN113778820A (en) | Application program data export method, device, electronic device and storage medium | |
CN102567460B (en) | Method for image asynchronous decoding in document loading | |
CN102426581A (en) | Method and device for generating file preview | |
CN111476001A (en) | Method and device for exporting document, computer storage medium and terminal | |
CN111079375A (en) | Information sorting method and device, computer storage medium and terminal | |
CN111310415A (en) | Document conversion method and device, computer storage medium and terminal | |
CN111198858A (en) | File processing method and device, computer storage medium and terminal | |
CN112001150B (en) | Method and device for converting document format, computer storage medium and terminal |
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 |