CN112052655A - Page processing method and device, computer storage medium and terminal - Google Patents
Page processing method and device, computer storage medium and terminal Download PDFInfo
- Publication number
- CN112052655A CN112052655A CN201910418903.4A CN201910418903A CN112052655A CN 112052655 A CN112052655 A CN 112052655A CN 201910418903 A CN201910418903 A CN 201910418903A CN 112052655 A CN112052655 A CN 112052655A
- Authority
- CN
- China
- Prior art keywords
- document
- format
- last
- page
- content
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title abstract description 8
- 238000000034 method Methods 0.000 claims description 26
- 238000011084 recovery Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Document Processing Apparatus (AREA)
Abstract
A page processing method, device, computer storage medium and terminal include: judging whether the last content of the document is a table or not; when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table; and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table. According to the embodiment of the invention, through format adjustment, the occurrence of blank pages in the last page of the document is avoided, and the document editing experience of a user is improved.
Description
Technical Field
The present disclosure relates to, but not limited to, document editing technologies, and in particular, to a method, an apparatus, a computer storage medium, and a terminal for page processing.
Background
In the text editing software, when the inserted form is close to the bottom end of the document page and no other text content exists behind the form, a blank page is added to the next page of the form page according to the format setting of the software, and the next page cannot be deleted through a back or delete key. The blank page cannot be deleted, the operation experience of text editing of a user can be influenced, when the edited document needs to be printed, the blank page is printed, waste of power resources can be caused, the blank page is placed back into the printer, and the office experience of the user is reduced.
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 page processing method and device, a computer storage medium and a terminal, which can improve the document editing experience of a user.
The embodiment of the invention provides a page processing method, which comprises the following steps:
judging whether the last content of the document is a table or not;
when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
In an exemplary embodiment, before the formatting the document according to the preset format, the method further includes:
determining whether a preset trigger instruction is received;
and determining whether to perform format adjustment on the document according to a preset format or not according to whether the triggering instruction is received or not.
In an exemplary embodiment, the formatting the document according to the preset format includes:
the row spacing of the first row after the table is adjusted to one pound.
In an exemplary embodiment, the formatting the document according to the preset format includes:
determining the position of a document needing line spacing adjustment;
and loading preset first template information, and carrying out format adjustment on the content of the determined document position according to the loaded first template information.
In an exemplary embodiment, after the formatting the document according to the preset format, the method further includes:
judging whether new content is input after the form;
and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
In an exemplary embodiment, before the formatting the document according to the preset format, the method further includes:
recording the format of the document before format adjustment as second template information;
wherein the second template information is used for format recovery of the table.
On the other hand, an embodiment of the present invention further provides a page processing apparatus, including: the device comprises a judging unit, a determining unit and an adjusting unit; wherein,
the judgment unit is configured to: judging whether the last content of the document is a table or not;
the determination unit is configured to: when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
the adjustment unit is configured to: and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
In an exemplary embodiment, the apparatus further includes a triggering unit configured to:
determining whether a preset trigger instruction is received;
and when receiving the trigger instruction, sending the received trigger instruction to the adjusting unit so that the adjusting unit adjusts the format of the document according to the preset format.
In an exemplary embodiment, the adjusting unit includes a first adjusting module configured to: the row spacing of the first row after the table is adjusted to one pound.
In an exemplary embodiment, the adjusting unit further includes a second adjusting module configured to: judging whether new content is input after the form; and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
In another aspect, an embodiment of the present invention further provides a computer storage medium, where computer-executable instructions are stored in the computer storage medium, and the computer-executable instructions are used to execute the above page processing method.
In 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 program instructions in the memory;
the program instructions read on the processor to perform the following operations:
judging whether the last content of the document is a table or not;
when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
Compared with the related art, the technical scheme of the application comprises the following steps: judging whether the last content of the document is a table or not; when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table; and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table. According to the embodiment of the invention, through format adjustment, the occurrence of blank pages in the last page of the document is avoided, and the document editing experience of a user is improved.
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 embodiments of the invention and together with the example serve to explain the principles of the invention and not to limit the invention.
FIG. 1 is a flow chart of a method of page processing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a document display without format recovery;
FIG. 3 is a block diagram of a page processing apparatus according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method of an exemplary application of the present invention;
fig. 5 is a flowchart of a method of another exemplary application of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Fig. 1 is a flowchart of a page processing method according to an embodiment of the present invention, as shown in fig. 1, including:
102, when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page where the table is positioned;
it should be noted that, whether the last item of the document is a table or not and whether the last line of the table is located in the last line of the page where the table is located can be implemented by referring to related theoretical design, which is not described herein again.
And 103, when the last item of content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
In an exemplary embodiment, before the formatting the document according to the preset format, the method further includes:
determining whether a preset trigger instruction is received;
and determining whether to perform format adjustment on the document according to a preset format or not according to whether the triggering instruction is received or not. Here, determining whether to format-adjust the document according to a preset format according to whether the trigger instruction is received includes: when a trigger instruction is received, format adjustment is carried out on the document according to a preset format; and when the trigger instruction is not received, the format of the document is not adjusted according to the preset format.
In an exemplary embodiment, formatting the document in a preset format includes:
the row spacing of the first row after the table is adjusted to one pound.
It should be noted that the adjustment of the line spacing to 1 lb is only one embodiment, and in other embodiments, the value of the line spacing lb may be increased or decreased as appropriate as long as the blank page deletion can be implemented.
In an exemplary embodiment, formatting the document in a preset format includes:
determining the position of a document needing line spacing adjustment;
and loading preset first template information, and carrying out format adjustment on the content of the determined document position according to the loaded first template information.
It should be noted that the positions where the line spacing needs to be adjusted in the embodiment of the present invention include: the first line after the table; the loading of the first template information may be implemented by referring to the existing Application Programming Interface (API) interface in the related art, which is not described herein again; the first template information includes, for example: the row spacing was adjusted to one pound.
In an exemplary embodiment, after performing format adjustment on a document according to a preset format, the method according to the embodiment of the present invention further includes:
judging whether new content is input after the form;
and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
It should be noted that if the first line after the form is held at one pound, then the new content entered later will be occluded by the form; in addition, the new content is content input again after the format adjustment; fig. 2 is a schematic view of document display when format recovery is not performed, as shown in fig. 2, a new content input later is blocked by a table, and in order to avoid that the new content input later is blocked by the table, the embodiment of the present invention performs recovery processing on the document format.
In an exemplary embodiment, before the formatting the document according to the preset format, the method further includes:
recording the format of the document before format adjustment as second template information;
wherein the second template information is used for format recovery of the table.
Compared with the related art, the technical scheme of the application comprises the following steps: judging whether the last content of the document is a table or not; when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table; and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table. According to the embodiment of the invention, through format adjustment, the occurrence of blank pages in the last page of the document is avoided, and the document editing experience of a user is improved.
Fig. 3 is a block diagram of a page processing apparatus according to an embodiment of the present invention, as shown in fig. 3, including: the device comprises a judging unit, a determining unit and an adjusting unit; wherein,
the judgment unit is configured to: judging whether the last content of the document is a table or not;
the determination unit is configured to: when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
the adjustment unit is configured to: and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
In an exemplary embodiment, the apparatus further includes a triggering unit configured to:
determining whether a preset trigger instruction is received;
and when receiving the trigger instruction, sending the received trigger instruction to the adjusting unit so that the adjusting unit adjusts the format of the document according to the preset format.
In an exemplary embodiment, the adjusting unit includes a first adjusting module configured to: the row spacing of the first row after the table is adjusted to one pound.
In an exemplary embodiment, the first adjustment module is configured to:
determining the position of a document needing line spacing adjustment; and loading preset first template information, and carrying out format adjustment on the content of the determined document position according to the loaded first template information.
In an exemplary embodiment, the adjusting unit further comprises a second adjusting module configured to: judging whether new content is input after the form; and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
In an exemplary embodiment, the adjusting unit is further configured to: recording the format of the document before format adjustment as second template information; wherein the second template information is used for format recovery of the table.
Compared with the related art, the technical scheme of the application comprises the following steps: judging whether the last content of the document is a table or not; when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table; and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table. According to the embodiment of the invention, through format adjustment, the occurrence of blank pages in the last page of the document is avoided, and the document editing experience of a user is improved.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used for executing the page processing method.
An embodiment of the present invention further provides a terminal, including: a memory and a processor; wherein,
the processor is configured to execute program instructions in the memory;
the program instructions read on the processor to perform the following operations:
judging whether the last content of the document is a table or not;
when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
The method of the embodiment of the present invention is described in detail below by using application examples, which are only used for illustrating the present invention and are not used for limiting the protection scope of the present invention.
Application example
Fig. 4 is a flowchart of an exemplary method of the present invention, as shown in fig. 4, including:
After the format of the last line of the table is adjusted, if the text content is newly added behind the table by the application example of the invention, the format of the application example of the invention is adjusted according to the newly added content; fig. 5 is a flowchart of a method according to another application example of the present invention, as shown in fig. 5, including:
When it is judged that new contents are input after the form, step 502 is executed; when the new content is not input after the form is judged, the flow is terminated;
According to the application example of the invention, the blank page behind the form can be automatically deleted, the document content is simplified, and the document editing experience of the user is improved.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by a program instructing associated hardware (e.g., a processor) to perform the steps, and the program may be stored in a computer readable storage medium, such as a read only memory, a magnetic or optical disk, and the like. 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 hardware, for example, by an integrated circuit to implement its corresponding function, or in software, for example, by a processor executing a program/instruction stored in a memory to implement its corresponding function. The present invention is not limited to any specific form of combination of hardware and software.
Although the embodiments of the present invention have been described above, the above description is only for the convenience of understanding the present invention, and is not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (12)
1. A method of page processing, comprising:
judging whether the last content of the document is a table or not;
when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
2. The method of claim 1, wherein prior to formatting the document in the predetermined format, the method further comprises:
determining whether a preset trigger instruction is received;
and determining whether to perform format adjustment on the document according to a preset format or not according to whether the triggering instruction is received or not.
3. The method of claim 1, wherein the formatting the document in the predetermined format comprises:
the row spacing of the first row after the table is adjusted to one pound.
4. The method of claim 1, wherein the formatting the document in the predetermined format comprises:
determining the position of a document needing line spacing adjustment;
and loading preset first template information, and carrying out format adjustment on the content of the determined document position according to the loaded first template information.
5. The method according to any one of claims 1 to 4, wherein after the document is formatted according to the preset format, the method further comprises:
judging whether new content is input after the form;
and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
6. The method of claim 5, wherein prior to formatting the document in the predetermined format, the method further comprises:
recording the format of the document before format adjustment as second template information;
wherein the second template information is used for format recovery of the table.
7. An apparatus for page processing, comprising: the device comprises a judging unit, a determining unit and an adjusting unit; wherein,
the judgment unit is configured to: judging whether the last content of the document is a table or not;
the determination unit is configured to: when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
the adjustment unit is configured to: and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
8. The apparatus of claim 7, further comprising a triggering unit configured to:
determining whether a preset trigger instruction is received;
and when receiving the trigger instruction, sending the received trigger instruction to the adjusting unit so that the adjusting unit adjusts the format of the document according to the preset format.
9. The apparatus of claim 7, wherein the adjustment unit comprises a first adjustment module configured to: the row spacing of the first row after the table is adjusted to one pound.
10. The apparatus of any of claims 7 to 9, wherein the adjustment unit further comprises a second adjustment module configured to:
judging whether new content is input after the form; and when the new content is input after the form is judged, restoring the format of the document to be before format adjustment.
11. A computer storage medium having stored therein computer-executable instructions for performing the method of page processing according to any one of claims 1 to 6.
12. A terminal, comprising: a memory and a processor; wherein,
the processor is configured to execute program instructions in the memory;
the program instructions read on the processor to perform the following operations:
judging whether the last content of the document is a table or not;
when the last item of content of the document is judged to be a table, determining whether the last line of the table is positioned in the last line of the page of the table;
and when the last content of the document is a table and the last line of the table is determined to be positioned in the last line of the page where the table is positioned, carrying out format adjustment on the document according to a preset format so as to delete the blank page positioned behind the table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910418903.4A CN112052655B (en) | 2019-05-20 | 2019-05-20 | Page processing method and device, computer storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910418903.4A CN112052655B (en) | 2019-05-20 | 2019-05-20 | Page processing method and device, computer storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112052655A true CN112052655A (en) | 2020-12-08 |
CN112052655B CN112052655B (en) | 2024-08-13 |
Family
ID=73608755
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910418903.4A Active CN112052655B (en) | 2019-05-20 | 2019-05-20 | Page processing method and device, computer storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112052655B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112597746A (en) * | 2020-12-29 | 2021-04-02 | 维沃移动通信有限公司 | Data display method and device and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5231579A (en) * | 1989-10-20 | 1993-07-27 | Hitachi, Ltd. | Method and system for displaying and processing image of form document |
US20090116057A1 (en) * | 2007-11-01 | 2009-05-07 | Canon Kabushiki Kaisha | Information processing apparatus, control method therefor, and computer readable medium |
CN102929849A (en) * | 2012-11-07 | 2013-02-13 | 中标软件有限公司 | Method and device for loading files |
CN104317782A (en) * | 2014-11-24 | 2015-01-28 | 联想(北京)有限公司 | Text document processing method and device and electronic equipment |
-
2019
- 2019-05-20 CN CN201910418903.4A patent/CN112052655B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5231579A (en) * | 1989-10-20 | 1993-07-27 | Hitachi, Ltd. | Method and system for displaying and processing image of form document |
US20090116057A1 (en) * | 2007-11-01 | 2009-05-07 | Canon Kabushiki Kaisha | Information processing apparatus, control method therefor, and computer readable medium |
CN102929849A (en) * | 2012-11-07 | 2013-02-13 | 中标软件有限公司 | Method and device for loading files |
CN104317782A (en) * | 2014-11-24 | 2015-01-28 | 联想(北京)有限公司 | Text document processing method and device and electronic equipment |
Non-Patent Citations (1)
Title |
---|
月光小男孩: "Word表格后的空白页如何删除?", pages 1, Retrieved from the Internet <URL:知乎,https://www.zhihu.com/question/306061679#> * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112597746A (en) * | 2020-12-29 | 2021-04-02 | 维沃移动通信有限公司 | Data display method and device and electronic equipment |
CN112597746B (en) * | 2020-12-29 | 2024-05-28 | 维沃移动通信有限公司 | Data display method and device and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112052655B (en) | 2024-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080320387A1 (en) | Information displaying device and information displaying method | |
US20110126092A1 (en) | Smart Paste | |
WO2022036927A1 (en) | File storage method and apparatus, device, and medium | |
CN109145272B (en) | Text rendering and layout method, device, equipment and storage medium | |
CN105183184A (en) | Character processing method and terminal | |
CN110109586B (en) | Data processing method and device, computer equipment and storage medium | |
CN107924397A (en) | A kind of file editing method and file editor | |
CN104731500A (en) | Information processing method and electronic equipment | |
CN109033313B (en) | Method and terminal equipment for realizing full-disk scanning function by using USN | |
CN105302786A (en) | Editing method and device for data | |
CN112052655B (en) | Page processing method and device, computer storage medium and terminal | |
US8161023B2 (en) | Inserting a PDF shared resource back into a PDF statement | |
CN104182479B (en) | A kind of method and device handling information | |
CN109324750A (en) | Mobile terminal character edit methods and device | |
CN108563485B (en) | Input panel display method and device | |
CN110866203B (en) | Page jump method, device, equipment and computer readable storage medium | |
CN110619116A (en) | Data processing method, device, terminal and storage medium | |
CN111104777A (en) | Document editing method and device, computer storage medium and terminal | |
CN113378527A (en) | PDF document editing method and device, storage medium and electronic equipment | |
CN110597576B (en) | File remark processing method and system | |
CN113590564A (en) | Data storage method and device, electronic equipment and storage medium | |
CN112016277A (en) | Format adjustment method and device, computer storage medium and terminal | |
CN111522939A (en) | Method and device for processing note, computer storage medium and terminal | |
US11243844B2 (en) | Method for enhancing speed of incremental backup, bridge device, and storage system | |
KR102156193B1 (en) | Apparatus and method for input editing of mobile device |
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 |