CN113506357B - Floating map processing method, device, equipment and storage medium - Google Patents
Floating map processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN113506357B CN113506357B CN202110571581.4A CN202110571581A CN113506357B CN 113506357 B CN113506357 B CN 113506357B CN 202110571581 A CN202110571581 A CN 202110571581A CN 113506357 B CN113506357 B CN 113506357B
- Authority
- CN
- China
- Prior art keywords
- paragraph
- anchor point
- distance
- floating
- format document
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a floating graph processing method, a device, equipment and a storage medium, which are used for calculating a first distance and a second distance of a floating graph in a first format document. If the second distance is not smaller than the first distance, the current paragraph is taken as the target paragraph. And determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document. After the paper manuscript of the first format document is converted into the second format document, the position of the floating diagram in the second format document is consistent with the actual display position of the floating diagram in the paper manuscript of the first format document. Therefore, in the production process, manual intervention and adjustment of the position of the floating map are reduced, the labor cost is saved, and the production efficiency is improved.
Description
Technical Field
The application relates to the field of document conversion, and provides a floating map processing method, a device, equipment and a storage medium.
Background
A float map is a common content in paper manuscripts. When the paper manuscript of the word document is converted into an extensible markup language (eXtensible Markup Language, abbreviated as xml) document, not only the text content in the word document but also the floating diagram in the word document needs to be converted.
Currently, when converting a floating graph in a word document, an existing conversion algorithm obtains anchor point positions of the floating graph in the word document, and converts the floating graph according to the anchor point positions. In the converted xml document, the anchor point position is the display position of the float map.
However, in the word document, the display position of the floating map is not consistent with the anchor point position of the floating map, so that the display position of the floating map in the generated xml document is disordered, and the display position of the floating map needs to be manually adjusted, which is time-consuming and labor-consuming.
Disclosure of Invention
The application provides a floating map processing method, device, equipment and storage medium, which are used for solving the problems that the display position of a floating map in an xml document generated in the prior art is disordered, and the display position of the floating map needs to be manually adjusted, so that time and labor are wasted.
In a first aspect, the present application provides a floating map processing method, including:
Calculating a first distance and a second distance of a floating diagram in a first format document, wherein the first distance is a distance between a first display position and the upper boundary of a page where the floating diagram is located, the first display position is a display position of the floating diagram in the first format document, the second distance is a distance between a current paragraph and the upper boundary of the page, the current paragraph is determined according to a first anchor point position of the floating diagram, and the first anchor point position is a position where an anchor point of the floating diagram in the first format document is located;
If the second distance is not smaller than the first distance, the current paragraph is taken as a target paragraph;
And determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
Optionally, calculating the first distance of the float map in the first format document includes:
Acquiring a first display position and a first anchor point position, wherein the first display position is the display position of the floating map in the first format document, and the first anchor point position is the position of the anchor point of the floating map in the first format document;
And calculating a first distance according to the first display position and the first anchor point position, wherein the first distance is the distance between the first display position and the upper boundary of the page where the floating map is located.
Optionally, calculating the second distance of the float map in the first format document includes:
Acquiring a first anchor point position which is the position of an anchor point of the floating map in the first format document;
Determining a current paragraph according to the first anchor point position;
and calculating a second distance according to the current paragraph, wherein the second distance is the distance between the current paragraph and the upper boundary of the page.
Optionally, determining the current paragraph according to the first anchor point position includes:
taking the next paragraph of the paragraph where the first anchor point is located as the current paragraph;
Calculating a second distance according to the current paragraph;
if the second distance is smaller than the first distance, the next paragraph of the current paragraph is taken as a new current paragraph.
Optionally, determining the second anchor point in the second format document according to the target paragraph includes:
calculating the segment difference according to the segments where the target segment and the first anchor point are located;
and determining a second anchor point position in the second format document according to the segment difference, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
Optionally, determining the second anchor point position in the second format document according to the segment difference includes:
Acquiring a first paragraph node of a floating graph in a second format document, wherein the first paragraph node comprises a floating graph node;
obtaining a second paragraph node according to the paragraph difference and the first paragraph node;
newly creating a third section node, wherein the third section node comprises a floating map node;
inserting the third section node into the second section node, wherein the position of the third section node is the second anchor point position;
And deleting the floating graph node in the first paragraph node.
In a second aspect, the present application provides a floating map processing apparatus, the apparatus comprising:
The computing module is used for computing a first distance and a second distance of the floating graph in the first format document, wherein the first distance is the distance between a first display position and the upper boundary of the page where the floating graph is located, the first display position is the display position of the floating graph in the first format document, the second distance is the distance between the current paragraph and the upper boundary of the page, the current paragraph is determined according to a first anchor point position of the floating graph, and the first anchor point position is the anchor point position of the floating graph in the first format document;
the processing module is used for taking the current paragraph as the target paragraph if the second distance is not smaller than the first distance;
And the processing module is also used for determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
In a third aspect, the present application provides an electronic device comprising: a memory, a processor;
A memory; a memory for storing processor-executable instructions;
A processor, configured to implement the floating map processing method according to the first aspect and the optional aspect according to the executable instructions stored in the memory.
In a fourth aspect, the present application provides a computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the float map processing method as referred to in the first aspect and alternatives.
In a fifth aspect, the present application provides a computer program product comprising instructions which when executed by a processor implement the float map processing method as referred to in the first aspect and alternatives.
The application provides a floating graph processing method, a device, equipment and a storage medium, which are used for calculating a first distance and a second distance of a floating graph in a first format document. If the second distance is not smaller than the first distance, the current paragraph is taken as the target paragraph. And determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document. After the paper manuscript of the first format document is converted into the second format document, the position of the floating diagram in the second format document is consistent with the actual display position of the floating diagram in the paper manuscript of the first format document. Therefore, in the production process, manual intervention and adjustment of the position of the floating map are reduced, the labor cost is saved, and the production efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of a display location of a float in a word document and an anchor location of the float;
FIG. 2 is a flow chart of a floating map processing method according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a floating map processing method according to another exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of a first paragraph node and a floating map node thereof according to the floating map processing method provided in this embodiment;
fig. 5 is a schematic diagram of a second paragraph node obtained by the floating map processing method according to the present embodiment;
FIG. 6 is a schematic diagram of a floating map processing device according to an exemplary embodiment of the present application;
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The technical scheme of the application is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Office is the most commonly used Office software. The writing of the current scientific papers is mostly based on word documents. An extensible markup language (eXtensible Markup Language, abbreviated as xml) document is a markup language used to mark electronic files to be structured. The conversion of word documents into xml documents has become an urgent need in the relevant arts. One of the difficulties in the conversion process is the processing of the float map in the paper contribution. This is because, to achieve a certain display effect, the figures in the paper manuscript will be presented in different types, different text surrounding ways and different combinations. The floating graph does not have the streaming nature of an embedded graph, i.e. its display position is not tied to text, but is determined by the position of the anchor point, the distance between the graph and the anchor point. When the paper manuscript of the word document is converted into the xml document, not only the text content in the word document but also the floating diagram in the word document needs to be converted.
Currently, when converting a floating graph in a word document, an existing conversion algorithm obtains anchor point positions of the floating graph in the word document, and converts the floating graph according to the anchor point positions. In the converted xml document, the anchor point position is the display position of the float map.
However, in the word document, the display position of the floating map is not consistent with the anchor point position of the floating map, so that the display position of the floating map in the generated xml document is disordered, and the display position of the floating map needs to be manually adjusted, which is time-consuming and labor-consuming.
FIG. 1 is a schematic diagram of a display location of a float in a word document and an anchor location of the float. As shown in fig. 1, the display position of the float is before the paragraph where the "float example" is located, and the anchor point position 11 of the float is located at the paragraph where the "2. Large heading" is located. If the paper manuscript in the word document is directly converted into an xml document according to the existing conversion algorithm, the floating map in the converted xml document appears at the anchor point position 11, which is obviously wrong.
In order to solve the problems, the application provides a floating graph processing method, which is used for acquiring relevant data of a floating graph in a word document, calculating the display position of the floating graph in the word document according to the relevant data, and adjusting the position of a floating graph node in the converted xml document according to the display position of the floating graph in the word document. After the paper manuscript of the word document is converted into the xml document, the position of the float map in the xml document is consistent with the actual display position of the float map in the paper manuscript of the word document. Therefore, in the production process, manual intervention and adjustment of the position of the floating map are reduced, the labor cost is saved, and the production efficiency is improved.
FIG. 2 is a flow chart of a floating map processing method according to an exemplary embodiment of the present application. As shown in fig. 2, the floating map processing method provided in this embodiment includes the following steps:
s101, calculating a first distance and a second distance of a floating diagram in a first format document, wherein the first distance is a distance between a first display position and the upper boundary of a page where the floating diagram is located, the first display position is a display position of the floating diagram in the first format document, the second distance is a distance between a current paragraph and the upper boundary of the page, the current paragraph is determined according to a first anchor point position of the floating diagram, and the first anchor point position is a position where an anchor point of the floating diagram in the first format document is located.
More specifically, the first format document is a word document, and the format of the word document is docx format. And acquiring relevant data of the currently processed float map and a float map anchor point. And determining a first display position according to the relevant data of the floating diagram. The first display position may be an upper boundary of the floating map. And calculating the first distance according to the upper boundary of the floating map, the floating map anchor point and the upper boundary of the page where the floating map is located. The next paragraph of the paragraph where the floating map anchor is located is obtained, and the paragraph is taken as the current paragraph. And calculating a second distance according to the upper boundary of the current paragraph and the page where the current paragraph is located. It is determined whether the second distance is less than the first distance. And when the second distance is smaller than the first distance, acquiring a next paragraph of the current paragraph, and taking the paragraph as the current paragraph. And continuing to calculate the second distance and judging whether the second distance is smaller than the first distance or not until the second distance is not smaller than the first distance.
S102, if the second distance is not smaller than the first distance, the current paragraph is taken as the target paragraph.
More specifically, the position adjacent to the target paragraph before the target paragraph is the actual display position of the float map in the word document. And calculating the paragraph difference between the target paragraph and the paragraph where the floating map anchor point is located, wherein the paragraph difference is the paragraph number of the floating map anchor point in the second format document needing to be adjusted backwards.
S103, determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating chart in the second format document.
More specifically, the second format document is an xml document. And adopting openxml analysis technology to analyze paper manuscripts in the word document, and obtaining the xml document after analysis is completed. A float map node currently processed in an xml document is obtained, and a first paragraph node containing the float map node is obtained. From the paragraph difference between the target paragraph and the paragraph where the floating map anchor is located, a corresponding second paragraph node is found backward starting from the first paragraph node. A third paragraph node only comprising the floating graph node is newly established, and the third paragraph node is inserted before the second paragraph node. The position of the third paragraph node is the second anchor point position in the xml document.
In the method provided by the embodiment, a first distance and a second distance of a floating diagram in a first format document are calculated, wherein the first distance is a distance between a first display position and a boundary of a page where the floating diagram is located, the first display position is a display position of the floating diagram in the first format document, the second distance is a distance between a current paragraph and the boundary of the page, the current paragraph is determined according to a first anchor point position of the floating diagram, and the first anchor point position is a position of an anchor point of the floating diagram in the first format document. If the second distance is not smaller than the first distance, the current paragraph is taken as the target paragraph. And determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document. After the paper manuscript of the first format document is converted into the second format document, the position of the floating diagram in the second format document is consistent with the actual display position of the floating diagram in the paper manuscript of the first format document. Therefore, in the production process, manual intervention and adjustment of the position of the floating map are reduced, the labor cost is saved, and the production efficiency is improved.
Fig. 3 is a flow chart illustrating a floating map processing method according to another exemplary embodiment of the present application. As shown in fig. 3, the floating map processing method provided in this embodiment includes the following steps:
s201, acquiring a first display position and a first anchor point position, wherein the first display position is the display position of the floating diagram in the first format document, and the first anchor point position is the position of the anchor point of the floating diagram in the first format document.
More specifically, the first format document is a word document, and the format of the word document is docx format. Relevant data of the currently processed floating graph is acquired. And determining a first display position and a first anchor point position according to the relevant data of the floating diagram. The first display position may be an upper boundary of the floating map.
In fig. 1, the first display position is the upper boundary of "floating picture", and the first anchor position is the position where the anchor position 11 is located.
S202, calculating a first distance according to the first display position and the first anchor point position, wherein the first distance is the distance between the first display position and the upper boundary of the page where the floating map is located.
More specifically, a third distance, denoted d t, between the first display position and the first anchor point position is calculated from the first display position and the first anchor point position. A fourth distance, denoted d a, between the first anchor point location and the page upper boundary is calculated. The third distance and the fourth distance are added to obtain a first distance, denoted d s.
In fig. 1, the third distance is the distance between the upper boundary of the "floating picture" and the anchor point position 11, d t =1.77 cm. The fourth distance is the distance between the anchor point position 11 and the upper boundary of the page, d a =3.89 cm. The first distance is the distance between the upper boundary of the "floating picture" and the upper boundary of the page, d s=da+dt,ds =5.66 cm.
S203, taking the next paragraph of the paragraph where the first anchor point position is as the current paragraph.
More specifically, a next paragraph of the paragraph where the first anchor point is located is acquired, and the paragraph is taken as a current paragraph.
In fig. 1, the next paragraph of the paragraphs in which the anchor point position 11 is located is the "2.1 subtitle", and the "2.1 subtitle" is taken as the current paragraph.
S204, calculating a second distance according to the current paragraph.
More specifically, the second distance is calculated based on the upper boundary of the current paragraph and the page on which it is located.
In fig. 1, the second distance is the distance between the "2.1 subtitle" and the upper boundary of the page on which it is located, denoted as d i =4.76 cm (i=1).
S205, judging whether the second distance is smaller than the first distance.
S206, if the second distance is smaller than the first distance, taking the next paragraph of the current paragraph as a new current paragraph.
More specifically, when the second distance is smaller than the first distance, a next paragraph of the current paragraph is acquired, and the paragraph is taken as the current paragraph. Step S204 and step S205 are continued. When the second distance is not smaller than the first distance, the process proceeds to step S207.
In fig. 1, the second distance d i =4.76 cm (i=1) is smaller than the first distance d s =5.66 cm, and the steps S204 and S205 are continuously performed. The method comprises the following specific steps: taking the next section "floating graphic example" of the current paragraph "2.1 subtitle" as the new current paragraph, where the second distance is the distance between the "floating graphic example" and the upper boundary of the page where it is located, denoted as d i =10.18 cm (i=2); it is determined whether the second distance is less than the first distance. The second distance d i =10.18 cm (i=2) is not smaller than the first distance d s =5.66 cm, and the process advances to step S207.
S207, if the second distance is not smaller than the first distance, the current paragraph is taken as the target paragraph.
In fig. 1, since the second distance d i =10.18 cm (i=2) is not smaller than the first distance d s =5.66 cm, the current paragraph "floating graphic example" is taken as the target paragraph.
S208, calculating the section drop according to the section where the target section and the first anchor point are located.
More specifically, a paragraph difference between the target paragraph and the paragraph where the floating map anchor is located is calculated, where the paragraph difference is the number of paragraphs in the second format document where the floating map anchor needs to be adjusted backwards.
In FIG. 1, the target paragraph is "float icon example", the paragraph where the first anchor point is located is "2. Large heading", the paragraph drop is 2, and the number of paragraphs that the float icon needs to move backward is 2.
S209, determining a second anchor point position in the second format document according to the segment drop, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
Optionally, determining the second anchor point position in the second format document according to the segment difference includes: acquiring a first paragraph node of a floating graph in a second format document, wherein the first paragraph node comprises a floating graph node; obtaining a second paragraph node according to the paragraph difference and the first paragraph node; newly creating a third section node, wherein the third section node comprises a floating map node; inserting the third section node into the second section node, wherein the position of the third section node is the second anchor point position; and deleting the floating graph node in the first paragraph node.
More specifically, the second format document is an xml document. And adopting openxml analysis technology to analyze paper manuscripts in the word document, and obtaining the xml document after analysis is completed.
Fig. 4 is a schematic diagram of a first paragraph node and a floating map node obtained by the floating map processing method according to the present embodiment. As shown in fig. 4, a first paragraph node p 1 of a float map in an xml document is obtained, the first paragraph node p 1 including a float map node.
Fig. 5 is a schematic diagram of a second paragraph node obtained by the floating map processing method according to the present embodiment. As shown in fig. 5, from the first paragraph node p 1, a corresponding second paragraph node p 2 is found backward according to the segment head equal to 2. A third paragraph node p 3 is created that contains only the floating map node, and the third paragraph node p 3 is inserted before the second paragraph node p 2. The position of the third paragraph node p 3 is the second anchor point position in the xml document. The floating map node contained in the first paragraph node p 1 is deleted.
Fig. 6 is a schematic diagram showing the structure of a floating map processing device according to an exemplary embodiment of the present application. As shown in fig. 6, the present application provides a floating map processing device 40, the device 40 comprising:
The calculating module 41 is configured to calculate a first distance and a second distance of a floating map in the first format document, where the first distance is a distance between a first display position and an upper boundary of a page where the floating map is located, the first display position is a display position of the floating map in the first format document, the second distance is a distance between a current paragraph and the upper boundary of the page, the current paragraph is determined according to a first anchor point position of the floating map, and the first anchor point position is a position where an anchor point of the floating map in the first format document is located.
The processing module 42 is configured to take the current paragraph as the target paragraph if the second distance is not smaller than the first distance.
The processing module 42 is further configured to determine a second anchor position in the second format document according to the target paragraph, where the second anchor position is an actual display position of the float map in the second format document.
Specifically, the present embodiment may refer to the above method embodiment, and the principle and technical effects thereof are similar, and are not repeated.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an exemplary embodiment of the present application. As shown in fig. 7, the electronic device 50 of the present embodiment includes: a processor 51 and a memory 52; wherein,
Memory 52, a memory for storing processor-executable instructions.
The processor 51 is configured to implement the floating map processing method in the above embodiment according to executable instructions stored in the memory. Reference may be made in particular to the relevant description of the embodiments of the method described above.
Alternatively, the memory 52 may be separate or integrated with the processor 51.
When the memory 52 is provided separately, the electronic device 50 further comprises a bus 53 for connecting the memory 52 and the processor 51.
The present application also provides a computer readable storage medium having stored therein computer instructions which, when executed by a processor, are adapted to carry out the methods provided by the various embodiments described above.
The computer readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a computer-readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the computer-readable storage medium. In the alternative, the computer-readable storage medium may be integral to the processor. The processor and the computer readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). In addition, the ASIC may reside in a user device. The processor and the computer-readable storage medium may also reside as discrete components in a communication device.
The computer readable storage medium may be implemented by any type or combination of volatile or non-volatile Memory devices, such as Static Random-Access Memory (SRAM), electrically erasable programmable Read-Only Memory (EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The present application also provides a computer program product comprising execution instructions stored in a computer-readable storage medium. The at least one processor of the device may read the execution instructions from the computer-readable storage medium, the execution instructions being executed by the at least one processor to cause the device to implement the methods provided by the various embodiments described above.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.
Claims (8)
1. A float map processing method, comprising:
acquiring a first display position and a first anchor point position, wherein the first display position is the display position of the floating map in a first format document, and the first anchor point position is the position of the anchor point of the floating map in the first format document;
Calculating a first distance according to the first display position and the first anchor point position, wherein the first distance is the distance between the first display position and the boundary of the page where the floating map is located;
Acquiring the first anchor point position, wherein the first anchor point position is the position of the anchor point of the floating map in the first format document;
determining a current paragraph according to the first anchor point position; the current paragraph is the next paragraph of the paragraphs where the first anchor point position is located;
calculating a second distance according to the current paragraph, wherein the second distance is the distance between the current paragraph and the upper boundary of the page;
if the second distance is not smaller than the first distance, the current paragraph is taken as a target paragraph;
And determining a second anchor point position in a second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
2. The method of claim 1, wherein if the second distance is less than the first distance, then a next paragraph of the current paragraph is taken as a new current paragraph.
3. The method of claim 1, wherein determining a second anchor location in a second format document from the target paragraph comprises:
calculating the segment difference according to the segments where the target segment and the first anchor point are located;
and determining the second anchor point position in the second format document according to the paragraph difference, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
4. The method of claim 3, wherein said determining the second anchor point location in the second format document from the paragraph difference comprises:
Acquiring a first paragraph node of the floating map in the second format document, wherein the first paragraph node comprises a floating map node;
obtaining a second paragraph node according to the paragraph difference and the first paragraph node;
creating a third paragraph node, wherein the third paragraph node comprises the floating graph node;
before the third paragraph node is inserted into the second paragraph node, the position of the third paragraph node is the second anchor point position;
Deleting the floating graph node in the first paragraph node.
5. A float map processing apparatus, said apparatus comprising:
The computing module is used for acquiring a first display position and a first anchor point position, wherein the first display position is the display position of the floating map in the first format document, and the first anchor point position is the position of the anchor point of the floating map in the first format document; calculating a first distance according to the first display position and the first anchor point position, wherein the first distance is the distance between the first display position and the boundary of the page where the floating map is located; acquiring the first anchor point position, wherein the first anchor point position is the position of the anchor point of the floating map in the first format document; determining a current paragraph according to the first anchor point position; the current paragraph is the next paragraph of the paragraphs where the first anchor point position is located; calculating a second distance according to the current paragraph, wherein the second distance is the distance between the current paragraph and the upper boundary of the page;
a processing module, configured to take the current paragraph as a target paragraph if the second distance is not less than the first distance;
and the processing module is further used for determining a second anchor point position in the second format document according to the target paragraph, wherein the second anchor point position is the actual display position of the floating graph in the second format document.
6. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
a processor for implementing the floating map processing method according to any one of claims 1 to 4, according to executable instructions stored in the memory.
7. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing the float map processing method of any of claims 1 to 4.
8. A computer program product comprising instructions which, when executed by a processor, implement the float map processing method of any one of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110571581.4A CN113506357B (en) | 2021-05-25 | 2021-05-25 | Floating map processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110571581.4A CN113506357B (en) | 2021-05-25 | 2021-05-25 | Floating map processing method, device, equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113506357A CN113506357A (en) | 2021-10-15 |
| CN113506357B true CN113506357B (en) | 2024-07-12 |
Family
ID=78009255
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110571581.4A Active CN113506357B (en) | 2021-05-25 | 2021-05-25 | Floating map processing method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113506357B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109947996A (en) * | 2019-03-13 | 2019-06-28 | 北大方正集团有限公司 | Document processing method and apparatus |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2002952711A0 (en) * | 2002-11-18 | 2002-11-28 | Typefi Systems Pty Ltd | A method of formatting documents |
| JP4110105B2 (en) * | 2004-01-30 | 2008-07-02 | キヤノン株式会社 | Document processing apparatus, document processing method, and document processing program |
| US7814414B2 (en) * | 2005-09-09 | 2010-10-12 | Microsoft Corporation | Relative attributes of floating objects |
| JP2011034504A (en) * | 2009-08-05 | 2011-02-17 | Canon Inc | Document processing device, document processing method, program, and storage medium |
| CN108197085A (en) * | 2017-12-29 | 2018-06-22 | 北京仁和汇智信息技术有限公司 | A kind of submission reviewing method and device |
-
2021
- 2021-05-25 CN CN202110571581.4A patent/CN113506357B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109947996A (en) * | 2019-03-13 | 2019-06-28 | 北大方正集团有限公司 | Document processing method and apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113506357A (en) | 2021-10-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6073372B2 (en) | Managing script file dependencies and load times | |
| CN108763591B (en) | Webpage text extraction method and device, computer device and computer readable storage medium | |
| CN108647305A (en) | document format conversion method and device | |
| JP2006107435A (en) | Method, system, and computer-readable medium for creating, inserting, and reusing document parts in electronic document | |
| CN104111922A (en) | Processing method and device of streaming document | |
| US20140149854A1 (en) | Server and method for generating object document | |
| CN111753505A (en) | Document processing method, document processing device, server and storage medium | |
| CN109582934B (en) | Format document conversion method and device | |
| US10489490B2 (en) | Controlling pagination of dynamic-length presentations | |
| CN113506357B (en) | Floating map processing method, device, equipment and storage medium | |
| CN101800043A (en) | Method and terminal for displaying vector font | |
| CN113836865B (en) | Text recognition method based on file scanning, terminal and storage device | |
| US20050055636A1 (en) | Dynamic editing of multimedia content for real-time applications | |
| CN107656908B (en) | Method and system for implementing placeholder | |
| CN113268968A (en) | Report file generation method and device, computer equipment and storage medium | |
| CN110110291B (en) | Document display control method, device, equipment and medium | |
| CN111679825A (en) | A method, device, computer equipment and storage medium for generating cascading style sheets | |
| CN112131337B (en) | Unstructured data processing method, device, system and storage medium | |
| US20210142540A1 (en) | Intelligent exporting of images using an image editing application | |
| CN116860747A (en) | Training sample generation method and device, electronic equipment and storage medium | |
| CN114495144B (en) | Method and device for extracting table key-value information in text image | |
| CN109947996B (en) | Document processing method and device | |
| WO2023024376A1 (en) | Text typesetting | |
| CN115017867A (en) | PDF automatic generation method, system, device and storage medium | |
| CN113378526A (en) | PDF paragraph processing method, device, storage medium and equipment |
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 |