CN110110291B - Document display control method, device, equipment and medium - Google Patents

Document display control method, device, equipment and medium Download PDF

Info

Publication number
CN110110291B
CN110110291B CN201910393647.8A CN201910393647A CN110110291B CN 110110291 B CN110110291 B CN 110110291B CN 201910393647 A CN201910393647 A CN 201910393647A CN 110110291 B CN110110291 B CN 110110291B
Authority
CN
China
Prior art keywords
document
page
target
document element
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910393647.8A
Other languages
Chinese (zh)
Other versions
CN110110291A (en
Inventor
梁锦全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910393647.8A priority Critical patent/CN110110291B/en
Publication of CN110110291A publication Critical patent/CN110110291A/en
Application granted granted Critical
Publication of CN110110291B publication Critical patent/CN110110291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Abstract

The document display control method comprises the steps of determining document contents to be displayed on a document page according to an adjusting instruction for adjusting a document page display mode in a mode of keeping a target document element at a specified position in the document page, and displaying the document contents to be displayed on the adjusted document page in a mode of keeping the target document element at the specified position. Therefore, when the document page display mode is adjusted, the target document element at the designated position is used as a reference to adjust the document content in the document page, so that the positioning display accuracy of the document content is improved, the current reading position of a user is kept as much as possible in the adjusted content displayed on the document page, and the user can conveniently continue to read.

Description

Document display control method, device, equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for controlling document display.
Background
When a user reads or processes a document, the document page display mode of the document is usually switched, for example, the font size is adjusted or the page turning direction is adjusted according to the document display interface direction. Particularly, when a user uses various document processing applications and the user can adjust the document page display mode according to needs, an adjustment instruction is input according to an interface of the document processing application, and the document processing application adjusts the document page according to the adjustment instruction and displays the corresponding document page.
How to adjust the document page according to the adjustment instruction of the document page display mode is a problem to be considered.
Disclosure of Invention
The embodiment of the application provides a document display control method, a document display control device, document display control equipment and a document display control medium, which are used for improving the accuracy of positioning and displaying document contents when a document page display mode is adjusted.
In one aspect, a document display control method is provided, including:
responding to an adjusting instruction for adjusting the display mode of the document page, and acquiring a target document element for determining a specified position in the current document page;
determining document content to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document element at the designated position, wherein the document content comprises at least one document element; and are
And displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position.
In one aspect, there is provided a document display control apparatus including:
the acquisition unit is used for responding to an adjustment instruction for adjusting the display mode of the document page and acquiring a target document element for determining a specified position in the current document page;
the determining unit is used for determining document content to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document element at the designated position, and the document content comprises at least one document element; and are
And displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position.
In one aspect, a control device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to perform the steps of any of the above-described document display control methods.
In one aspect, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the document display control methods described above.
In a document display control method, apparatus, device, and medium provided in an embodiment of the present application, a target document element for determining a specified position in a current document page is obtained in response to an adjustment instruction for adjusting a document page display mode; determining document contents to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document elements at the designated positions; and displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position. Therefore, the page layout is carried out on the document by taking the designated position of the target document element as a reference, and the adjusted document page is displayed in a mode of keeping the target document element at the designated position, so that the accuracy of positioning and displaying the document content is improved when the document page display mode is adjusted, the current reading position of a user is kept in the content displayed by the adjusted document page as much as possible, and the user can conveniently continue to read.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may 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, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1a is an exemplary diagram of a terminal application interface before font scaling in an embodiment of the present application;
fig. 1b is an exemplary diagram of a terminal application interface after a font is enlarged in an embodiment of the present application;
FIG. 1c is a diagram illustrating an example of a computer interface before font size reduction according to an embodiment of the present disclosure;
FIG. 1d is a diagram illustrating an example of a computer interface with a reduced font size according to an embodiment of the present disclosure;
fig. 1e is an exemplary diagram of an application interface of a reader capable of turning pages up and down according to an embodiment of the present disclosure;
fig. 1f is an exemplary diagram of a left-right page turning application interface of a reader in an embodiment of the present application;
FIG. 2a is a diagram illustrating an application scenario of document display control according to an embodiment of the present application;
FIG. 2b is a diagram illustrating an example of an application interface for setting a designated location according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a document display control method according to an embodiment of the present disclosure;
fig. 4a is an exemplary diagram of a terminal application interface before font adjustment according to an embodiment of the present application;
fig. 4b is an exemplary diagram of a terminal application interface after font adjustment according to an embodiment of the present application;
FIG. 4c is a diagram illustrating an example of a reader application interface before adjusting a direction of a document display interface according to an embodiment of the present disclosure;
FIG. 4d is an exemplary diagram of a reader application interface with an adjusted document display interface direction according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of a document display control apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a control device in an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solution and beneficial effects of the present application more clear and more obvious, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
First, some terms referred to in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
A terminal: various applications may be installed, and a device capable of displaying an object provided in an installed application may be mobile or fixed. For example, a mobile phone, a reader computer, various wearable devices, a vehicle-mounted device, a Personal Digital Assistant (PDA), a point of sale (POS), or other electronic devices capable of implementing the above functions.
The application comprises the following steps: the application interface of the computer program can be generally provided with a display interface and an interactive interface, wherein the display interface is used for displaying the content of a document page and can edit the document page. The interactive interface is used for receiving instructions of a user, such as page display mode adjustment instructions, applications such as electronic maps and WeChat, and the like, and in this application, applications for processing documents are referred to as document processing applications, such as document processing applications for office use, or common document reading applications. Some applications require a user to install them on the device being used to use them, such as an office document processing application or a reader, and some do not require application installation, such as individual applets in a WeChat. The applet can be used without downloading or installing, and the user can open the application by scanning or searching.
Page layout: the content displayed on the document display interface in the document processing application is used as a typesetting scheme of a page of document.
Document elements: various elements contained in the document, such as words, symbols, pictures, and the like.
Document element display size: the size of the elements displayed on the document display interface, such as the word size of the characters, the length and the width of the pictures and the like.
Display capacity: the size of the page that can be displayed on the display interface of the document page.
The design concept of the embodiment of the present application is described below.
When a user reads or processes a document, the document page display mode of the document is often switched. The document processing application needs to perform page updating and typesetting according to the adjustment instruction of the user, and performs page typesetting adjustment on the document according to the adjustment instruction, so as to display the corresponding document page according to the reading record.
However, in this way, if the reading position of the user is not considered and the specific reading position is adopted for positioning, the content displayed on the document display interface may be shifted too much, which causes difficulty in positioning the position to be read continuously by the user, and even requires the user to turn pages to find the reading position before switching, which reduces the efficiency of processing the document by the user and causes inconvenience to the user.
For example, refer to fig. 1a, which is a diagram illustrating an example of a terminal application interface before font scaling. Fig. 1b is a diagram illustrating an example of a terminal application interface with a font enlarged. The font size is 16 in fig. 1a and 20 in fig. 1 b. After the document processing application has resized the font in the document from 16 to 20, the top line character "… … anyway" in FIG. 1a shifts to the middle of the page in FIG. 1 b. The user needs to look for "… … anyway" in fig. 1b in order to continue reading.
For another example, refer to fig. 1c, which is a diagram illustrating an example of a computer interface before font size reduction. FIG. 1d is a diagram of an example of a computer interface with a reduced font size. After the document processing application has resized the font size in the document from the four-size word shown in FIG. 1c to the five-size word shown in FIG. 1d, the top line character "… … anyway" in FIG. 1c has shifted to the upper side in the page in FIG. 1 d. The user needs to look for "… … anyway" in fig. 1d in order to continue reading.
For another example, refer to fig. 1e, which is a diagram illustrating an example of a reader application interface that pages up and down. FIG. 1f is a diagram illustrating an example of a left-right page turning reader application interface. The document processing application switches the document page in the page up and down direction shown in FIG. 1e to the document page in the page left and right direction shown in FIG. 1 f. The left side of the top row in FIG. 1e, "those bank flowers … …," has shifted to the right side of the top row in FIG. 1f, and the user needs to look for "those bank flowers … …" in FIG. 1f in order to continue reading.
Therefore, a technical solution for controlling document display is urgently needed, which improves the accuracy of positioning and displaying the document content and facilitates the reading of the user when the adjustment instruction of the document page display mode is given.
In view of this, the applicant considers that the document can be page-laid out with the designated position of the target document element as the reference, and the adjusted document page is displayed in a manner of keeping the target document element at the designated position, so as to improve the accuracy of reading position positioning and keep the reading position of the user.
In view of the above analysis and consideration, an embodiment of the present application provides a technical solution for controlling document display, in which a target document element for determining a specified position in a current document page is obtained in response to an adjustment instruction for adjusting a document page display mode; determining document contents to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document elements at the designated positions; and displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position.
To further illustrate the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide method steps as shown in the following embodiments or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed in sequence or in parallel according to the method shown in the embodiment or the figure when the method is executed in an actual processing procedure or a device.
Referring to fig. 2a, a schematic view of an application scenario of document display control is shown. In the application scenario shown in fig. 2a, the user processes the document through the document processing application of the terminal shown in fig. 2a and inputs an adjustment instruction of the page display mode of the document. And the document processing application typesets the page of the document according to the adjusting instruction by taking the target document element and the designated position where the target document element is located as a reference, and displays the adjusted page of the document.
The adjusting instruction is an instruction for page layout of the document. For example, the adjustment instruction is document element display size adjustment, document page turning direction adjustment, and the like. The adjustment instruction can be input through a key, a touch screen and the like, and can be obtained through the induction of a sensor in the terminal, for example, a user switches the terminal from a horizontal screen to a vertical screen for reading. The terminal obtains an adjusting instruction for switching horizontal screen reading to vertical screen reading through a built-in sensor.
The specified position and the document page currently presented by the document processing application have a specified relative position relationship determination. For example, the designated location is the first character of the document page. The designated position may be a default position or may be set by a user instruction. For example, referring to fig. 2b, which is an exemplary diagram of an application interface for setting a designated location, a user sets the designated location through a key of the application interface for setting the designated location.
In the embodiments of the present application, an application that processes a document is referred to as a document processing application. Alternatively, the document processing may include document reading, document editing, and the like. The document page display mode includes: a document element display size of the document page display and a page turning direction of the document page. The document elements can be characters, symbols, pictures and the like. The page turning direction can be left and right page turning, up and down page turning and the like.
In the embodiment of the application, the designated position and the target document element are used as references, and paging typesetting is performed on all document elements in the document according to the adjusting instruction, so that when the document page display mode is switched, corresponding document content is displayed according to the target document element and the designated position, and a user can directly continue reading the document without turning pages and searching for the reading position after page adjustment.
Referring to fig. 3, a flowchart of an implementation of a document display control method provided in the present application is shown. The method comprises the following specific processes:
step 300: the document processing application responds to an adjusting instruction for adjusting the document page display mode, and obtains a target document element for determining a specified position in the current document page.
Specifically, when step 300 is executed, the user may input an adjustment instruction through a button of the terminal and the touch screen. The terminal can also sense the adjustment instruction of the user according to the arranged sensor. If the sensor of the terminal senses that the terminal is placed on the transverse screen, the adjusting instruction is determined to be the transverse screen display document page, and when the sensor senses that the terminal is placed on the vertical screen, the adjusting instruction is determined to be the vertical screen display document page. The adjusting instruction is used for switching the document page display mode, and is usually an instruction of the document page display mode in which page layout needs to be performed on the document in the switching process, and includes a document element display size adjusting instruction, a document page turning direction adjusting instruction, and the like. The target document element may be one or more characters.
Preferably, the target document element of the specified position includes: setting a first document element of a line in a current document page; or a document element adjacent to a first document element of the current document page; or a document element adjacent to the last document element of the current document page.
In practical application, the designated position may be set correspondingly according to a practical application scene, or may be set to any other position, which is not described herein again. In one embodiment, the document processing application records the set designated location in response to a designated location setting operation entered through an application interface of the document processing.
In one embodiment, when a user performs document processing through a document processing application of a terminal, an adjustment instruction for adjusting a document page display mode is input through an application interface of the document processing application, and the document processing application responds to the adjustment instruction to acquire a target document element for determining a specified position in a current document page.
The document processing may be document reading, document editing, and the like. For example, a user writes a paper through a document processing application. The document is composed of at least one document element, and the document elements in the document are divided in at least one page according to a set display capacity and a corresponding document element display size. The document elements may be text or pictures. The display capacity indicates the size (i.e., dimension) of a document page, which is a page of the content presented in the document display interface, and may be represented by pixels.
Thus, a target document element in the document having a specified relative positional relationship with the displayed document page can be acquired.
Step 301: the document processing application determines a document element display size according to the adjustment instruction.
Specifically, when step 301 is executed, the following two ways may be adopted:
the first mode is as follows: and if the adjusting instruction is an instruction for adjusting the display size of the document element, determining the adjusted display size of the document element of the document page according to the adjusting instruction for the display size of the document element.
Optionally, the document element display size of the document element may be a font size of a text or a size of a picture.
For example, if the font size of the currently displayed text of the document processing application is a four-size character and the adjustment instruction is to adjust the font size of the text to a five-size character, the document processing application determines that the display size of the document element is a five-size character.
The second way is: and if the adjusting instruction is an instruction for adjusting the page turning direction of the document, the document processing application directly acquires the current display size of the document element.
This is because the display size of the document element does not need to be adjusted when the page turning direction is switched, and therefore, the current document element is directly acquired.
For example, the currently displayed font of the document processing application is a four-number character, and the adjustment instruction is to switch the page up and down direction to the page left and right direction, then the document processing application directly determines that the display size of the document element is the four-number character.
Alternatively, the document element display size of the document element may be represented by a specific size value (e.g., the font size of a font) or may be represented by a scale (1.5 times the image magnification). The document element display sizes may also be different for different document elements. For example, the document element display sizes of text and image are different.
Thus, the adjusted display size of the document element can be determined respectively according to different adjusting instructions.
Step 302: and the document processing application determines the document content to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document element at the specified position according to the acquired target index of the target document element, the display capacity of the document page and the display size of the document element.
Specifically, when step 302 is executed, the document processing application may adopt the following steps:
s3021: a target index of a target document element and a display capacity of a document page are obtained.
It should be noted that each document element included in the document is provided with a corresponding index.
For example, the document elements in the document are, in order: a is1,a2,a3……am-1,am,am+1……an. The document processing application determines that the target document element is the first document element a of the first line of the document pagemThe target index of the target document element is m.
Thus, the target document element in the document having the specified relative positional relationship with the displayed document page can be acquired, and the target document element is uniquely positioned in the document through the target index.
S3022: according to the target index, the display capacity and the document element display size, a head end index of a first document element and a tail end index of a last document element of the document page are determined while the target document element is still at the designated position.
In one embodiment, if the target document element at the designated position is the first document element of the set row in the current document page, the document processing application directly determines the target index as the head-end index, and sequentially adds the document elements indexed after the target index to the document page according to the display sizes of the document elements until the product of the display sizes of the document elements and the corresponding document elements in the document page is the display capacity, that is, the document page is full, or all the document elements indexed after the target index in the document are added to the document page, that is, the document page is not full, but the document is finished. Finally, the document processing application determines the index of the added last document element as the end index of the last document element of the document page.
In one embodiment, if the target document element at the specified position is the last document element of a page previous to the current document page, the document processing application determines the head end index as the target index plus 1. Then, the document processing application adds the document elements indexed after the head-end index to the document page in sequence until the product of the added document elements and the corresponding document element display size is the display capacity, or all document elements indexed after the head-end index in the document have been added to the document page. Finally, the document processing application determines the index of the added last document element as the end index of the last document element of the document page.
Based on the principle that the head end index and the tail end index are determined for the first document element of the set row in the current document page or the target document element of the designated position is the last document element of the previous page of the current document page according to the target document element of the designated position, the head end index and the tail end index of the document page can be determined when the designated position is any other position, and the description is omitted.
It should be noted that, the document may further include a special character, such as a line feed character, and since the special character is not generally indexed, if the special character exists, the end index and the head index are determined according to the special character, in addition to the target index, the display size of the document element, and the display capacity.
For example, if the target document element at the specified position is the first character of the set line in the current document page, the first line x x a of the document pagem……And x represents a space, the document processing application determines that the target document element is am
S3023: and determining the document content to be displayed in the document page after the document page display mode is adjusted according to the head index of the first document element and the tail index of the last document element of the document page.
Specifically, the document processing application determines document elements indexed between the head end index and the tail end index and document elements indexed as the head end index and the tail end index as document contents to be displayed in the document page after the document page display mode is adjusted. Wherein, the document content comprises at least one document element.
Further, the document processing application performs page layout on the whole document according to the head end index and the tail end index, and the specific steps are as follows:
and page layout is carried out on each document element in the document, which is indexed before the index at the head end, according to the display capacity and the corresponding display size of the target document element, and page layout is carried out on each document element in the document, which is indexed after the index at the tail end, according to the display capacity and the corresponding display size of the document element.
When page layout is performed on each document element in the document, which is indexed before the head index, according to the display capacity and the display size of the corresponding target document element, the following method can be adopted:
the first mode is as follows: and sequentially typesetting the document elements of the document before the index of the head end according to the display capacity and the display size of the corresponding target document elements and the sequence of the indexes from high to low.
For example, the document elements in the document are, in order: a is1,a2,a3……am-1,am,am+1……an. Index for m as head end. The document processing application will a1,a2,a3……am-1And typesetting from back to front. For example, a1,a2,a3……am-1The composed document has a capacity of 6500px (pixels) and a display capacity of 600px, document elements of the portion from 5900px to 6500px are added to the 11 th page, document elements between 5300px to 5900px are added to the 10 th page, and so on, and finally document elements between 0px to 500px are added to the first page.
Thus, each document element is page-laid from back to front, and a blank may exist in the first page of the laid-out document.
The second way is: and sequentially typesetting the document elements of the document before the index of the head end according to the display capacity and the display size of the corresponding target document elements and the sequence of the indexes from low to high.
For example, the document elements in the document are, in order: a is1,a2,a3……am-1,am,am+1……an. Index for m as head end. The document processing application will a1,a2,a3……am-1Typesetting from front to back. For example, a1,a2,a3……am-1The composed document has a capacity of 6500px (pixels) and a display capacity of 600 px. The document processing application adds document elements between 0px and 600px to the first page, adds document elements of 600px and 1200px parts to page 2, and so on, and finally adds document elements between 6000px and 6500px to page 11.
In this way, each document element is page-laid from front to back, and a margin may exist in the last page after layout.
Step 303: the document processing application displays the document content to be displayed in the adjusted document page in a manner that maintains the target document element in the specified position.
Specifically, when step 303 is executed, the positional relationship between the displayed document page and the target document element is not changed, but remains in the specified relative positional relationship.
For example, referring to fig. 4a, an exemplary diagram of a terminal application interface before font adjustment is shown. Fig. 4b is a diagram illustrating an example of a font-adjusted terminal application interface. The adjustment instruction is to adjust the font size, namely, the font size is adjusted from 16 to 20, and the specified position is the first 4 characters of the first line of the document page. The document processing application determines from figure 4a that the target document element is "anyhow" and, based on "anyhow", resizes the font in the document page to 20, resulting in the document page shown in figure 4b, the first 4 characters of the document page in figure 4b still not being "anyhow".
For another example, refer to fig. 4c, which is a diagram illustrating an example of a reader application interface before the document display interface is adjusted. FIG. 4d is a diagram of an example of a reader application interface with an adjusted document display interface direction. And the adjustment instruction is to switch horizontal screen reading into vertical screen reading, and the specified positions are three characters at the tail of the document page. In FIG. 4c, the document processing application landscape displays the document page with the target document element "pilgrimage". The document processing application updates the document contents of the document page to the document page shown in fig. 4d according to the adjustment instruction. The last three characters of the document page in fig. 4d are still "pilgrimage".
The adjusting instruction is to switch from the up-down page turning direction to the left-right page turning direction. If the first 4 characters of the first line of the corresponding 10 th page are also determined to be 'any character', the document page is not adjusted, and the document page shown in fig. 4d is directly displayed.
Further, if the adjustment instruction is to switch from the left-right page turning direction to the up-down page turning direction, and the page layout does not need to be performed again, step 301 and step 302 may not be executed, and the container of the target document element is directly scrolled to the designated position after switching from the left-right page turning direction to the up-down page turning direction, so that other document elements of the document also sequentially perform corresponding movements.
This is because the document processing application will typically jump to the first page of the presentation document after switching from the left-to-right page-turning direction to the up-to-down page-turning direction. In the embodiment of the application, after the document processing application is switched from the left-right page turning direction to the up-down page turning direction, the container of the target document element is directly rolled to the specified position, so that the reading position of a user is kept.
Further, if the adjustment instruction is to switch from the up-down page turning direction to the left-right page turning direction, and the position relationship between the target document element and the corresponding page of the document page layout is also the specified relative position relationship, the document page is not adjusted, that is, the document page does not need to be page-rearranged.
For example, amFor the first line character of the document page, i.e. the first character of the document display interface, and amIs the first character of page 9 of the document, am-1On page 8, after the page is switched from the up-down page turning direction to the left-right page turning direction, the reading position can be kept unchanged without updating the document page.
In the embodiment of the application, the designated position of the target document element is taken as a reference, page typesetting is carried out on the document, and the adjusted document page is displayed in a mode of keeping the target document element at the designated position, so that when the document page display mode is adjusted, the accuracy of positioning and displaying the document content is improved, the current reading position of a user is kept as much as possible in the content displayed by the adjusted document page, and the user can conveniently continue reading.
Based on the same inventive concept, the embodiment of the application also provides a document display control device, and as the principle of solving the problems of the device and the equipment is similar to that of a document display control method, the implementation of the device can be referred to the implementation of the method, and repeated details are not repeated.
Fig. 5 is a schematic structural diagram of a document display control apparatus according to an embodiment of the present application. A document display control apparatus includes:
an obtaining unit 501, configured to, in response to an adjustment instruction for adjusting a document page display mode, obtain a target document element for determining a specified position in a current document page;
a determining unit 502, configured to determine, in a manner that a target document element is kept at a specified position, document content that needs to be displayed in a document page after the document page display mode is adjusted, where the document content includes at least one document element; and are
And displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position.
Preferably, the obtaining unit 501 is further configured to:
the set designated position is recorded in response to a designated position setting operation input through an application interface of document processing.
Preferably, the target document element of the specified position includes: setting a first document element of a line in a current document page; or a document element adjacent to a first document element of the current document page; or a document element adjacent to the last document element of the current document page.
Preferably, the adjustment instruction is an instruction for adjusting a display size of the document element, and the determining unit 502 is configured to:
determining the display size of the document elements after the document page is adjusted according to the adjustment instruction of the display size of the document elements;
and determining the document elements contained in the adjusted document content to be displayed by taking the specified positions of the target document elements as reference according to the display size of the document elements and the display capacity of the document pages.
Preferably, the adjusting instruction is an instruction for adjusting a page turning direction of the document, and the determining unit 502 is configured to:
and determining the document elements contained in the adjusted document content to be displayed by taking the specified positions of the target document elements as reference according to the display size of the current document elements and the display capacity of the document page.
In a document display control method, apparatus, device, and medium provided in an embodiment of the present application, a target document element for determining a specified position in a current document page is obtained in response to an adjustment instruction for adjusting a document page display mode; determining document content to be displayed in the document page after the document page display mode is adjusted in a mode of keeping the target document element at the designated position, wherein the document content comprises at least one document element; and displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position. Therefore, the page layout is carried out on the document by taking the designated position of the target document element as a reference, and the adjusted document page is displayed in a mode of keeping the target document element at the designated position, so that the accuracy of positioning and displaying the document content is improved when the document page display mode is adjusted, the current reading position of a user is kept as much as possible in the content displayed by the adjusted document page, and the user can conveniently continue to read.
Fig. 6 is a schematic structural diagram of a control device. Based on the same technical concept, the embodiment of the present application further provides a control device, which may include a memory 601 and a processor 602.
The memory 601 is used for storing computer programs executed by the processor 602. The memory 601 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like. The processor 602 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The specific connection medium between the memory 601 and the processor 602 is not limited in the embodiments of the present application. In the embodiment of the present application, the memory 601 and the processor 602 are connected by a bus 603 in fig. 6, the bus 603 is represented by a thick line in fig. 6, and the connection manner between other components is merely for illustrative purposes and is not limited thereto. The bus 603 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The memory 601 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 601 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. The memory 601 may be a combination of the above memories.
A processor 602, configured to execute the document display control method provided by the embodiment shown in fig. 3 when calling the computer program stored in the memory 601.
Embodiments of the present application further provide a computer-readable storage medium on which a computer program is stored, where the computer program, when executed by a processor, implements the document display control method in any of the above method embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the technical solutions mentioned above substantially or otherwise contributing to the related art may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a control device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (8)

1. A document display control method, comprising:
in response to an adjustment instruction for adjusting a document page display mode, acquiring a target document element for determining a specified position in a current document page, wherein the specified position is acquired in response to a specified position setting operation input through a specified position setting key of an application interface, and the target document element at the specified position comprises: a document element adjacent to a first document element of a current document page; or the document element adjacent to the last document element of the current document page is a character, a symbol or a picture;
determining the display size of the target document element according to the adjusting instruction;
acquiring a target index of the target document element, the display capacity of the current document page and the display size;
determining a head end index of a first document element and a tail end index of a last document element of the current document page when the target document element is kept at the designated position according to the target index, the display capacity and the display size;
determining document content to be displayed in the document page after the document page display mode is adjusted according to the head index of the first document element and the tail index of the last document element of the current document page, wherein the document content comprises at least one document element;
displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position, wherein the specified position is determined according to the relative position relation with the currently displayed document page;
if the adjusting instruction is the adjustment of the document page turning direction from the left and right page turning direction to the up and down page turning direction, after the left and right page turning direction is switched to the up and down page turning direction, the container of the target document element is rolled to the specified position to keep the target document element at the specified position, and other document elements of the document are correspondingly moved in sequence, wherein the adjusting instruction is obtained through key input, touch screen input or sensor induction;
and if the adjusting instruction is to switch from the up-down page turning direction to the left-right page turning direction and the position relation between the target document element and the corresponding page of the document page typesetting is the specified relative position relation, not adjusting the document page.
2. The method of claim 1, wherein the adjustment instruction is an instruction to adjust a display size of a document element;
the determining the display size of the target document element according to the adjustment instruction comprises:
and determining the display size of the document elements after the document page is adjusted according to the adjustment instruction of the display size of the document elements.
3. The method of claim 1, wherein the adjustment instruction is an instruction to adjust a page turning direction of a document;
the determining the display size of the target document element according to the adjustment instruction comprises:
and taking the display size of the current document element as the display size of the target document element.
4. A document display control apparatus, comprising:
an obtaining unit, configured to, in response to an adjustment instruction for adjusting a document page display mode, obtain a target document element for determining a specified position in a current document page, where the specified position is obtained in response to a specified position setting operation input through a specified position setting key of an application interface, and the target document element at the specified position includes: a document element adjacent to a first document element of a current document page; or the document element adjacent to the last document element of the current document page is a character, a symbol or a picture;
the determining unit is used for determining the display size of the target document element according to the adjusting instruction; acquiring a target index of the target document element, the display capacity of the current document page and the display size; determining a head end index of a first document element and a tail end index of a last document element of the current document page when the target document element is kept at the designated position according to the target index, the display capacity and the display size; determining document content to be displayed in the document page after the document page display mode is adjusted according to the head index of the first document element and the tail index of the last document element of the current document page, wherein the document content comprises at least one document element; displaying the document content to be displayed in the adjusted document page in a mode of keeping the target document element at the specified position, wherein the specified position is determined according to the relative position relation between the specified position and the document page which is currently displayed;
the determination unit is configured to: if the adjusting instruction is the adjustment of the document page turning direction from the left and right page turning directions to the up and down page turning directions, the container of the target document element is rolled to the specified position after the left and right page turning directions are switched to the up and down page turning directions so as to keep the target document element at the specified position, and other document elements of the document are correspondingly moved in sequence, wherein the adjusting instruction is obtained through key input, touch screen input or sensor induction, and if the adjusting instruction is the switching from the up and down page turning directions to the left and right page turning directions and the position relationship between the target document element and the corresponding page of the document page typesetting is the specified relative position relationship, the document page is not adjusted.
5. The apparatus of claim 4, wherein the adjustment instruction is an instruction to adjust a display size of a document element, and wherein the determination unit is to:
and determining the display size of the document elements after the document page is adjusted according to the adjustment instruction of the display size of the document elements.
6. The apparatus of claim 4, wherein the adjustment instruction is an instruction to adjust a page turning direction of the document, and the determining unit is configured to:
and taking the display size of the current document element as the display size of the target document element.
7. A control device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-3 are implemented when the program is executed by the processor.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
CN201910393647.8A 2019-05-13 2019-05-13 Document display control method, device, equipment and medium Active CN110110291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910393647.8A CN110110291B (en) 2019-05-13 2019-05-13 Document display control method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910393647.8A CN110110291B (en) 2019-05-13 2019-05-13 Document display control method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN110110291A CN110110291A (en) 2019-08-09
CN110110291B true CN110110291B (en) 2021-12-14

Family

ID=67489649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910393647.8A Active CN110110291B (en) 2019-05-13 2019-05-13 Document display control method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110110291B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238706B (en) * 2021-05-10 2023-06-20 北京字跳网络技术有限公司 View display method, device, equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916246A (en) * 2010-07-30 2010-12-15 汉王科技股份有限公司 Method and device for typesetting electronic document
CN107301161A (en) * 2016-04-14 2017-10-27 珠海金山办公软件有限公司 A kind of reading model switching position localization method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9767076B2 (en) * 2013-03-15 2017-09-19 Google Inc. Document scale and position optimization
CN105808519A (en) * 2016-02-29 2016-07-27 北京当当科文电子商务有限公司 Document display method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916246A (en) * 2010-07-30 2010-12-15 汉王科技股份有限公司 Method and device for typesetting electronic document
CN107301161A (en) * 2016-04-14 2017-10-27 珠海金山办公软件有限公司 A kind of reading model switching position localization method and device

Also Published As

Publication number Publication date
CN110110291A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
US7791589B2 (en) Method and apparatus for displaying electronic document including handwritten data
US6937254B2 (en) Graphical user interface for searches
JP4776995B2 (en) Computer apparatus and control method and program thereof
JP2001175386A (en) Display, display method and storage medium
JP2007256529A (en) Document image display device, information processor, document image display method, information processing method, document image display program, recording medium, and data structure
EP2874054B1 (en) Application text adjusting method, device, and terminal
JP2004118477A (en) Information processor and information processing method, recording medium and its program
KR20140053002A (en) Method and device for determining a display mode of electronic documents
JP4508745B2 (en) Information processing apparatus, image editing apparatus, control method therefor, computer program, and computer-readable storage medium
CN110110291B (en) Document display control method, device, equipment and medium
US20100033505A1 (en) Method for partially zooming a screen of a display, and electronic device applying the method
JP2008234147A (en) Document image display device, document image display method, and document image display program
JP2006251275A (en) Image display device
JP5376685B2 (en) CONTENT DATA DISPLAY DEVICE, CONTENT DATA DISPLAY METHOD, AND PROGRAM
JP4177325B2 (en) Image processing apparatus, image processing program, and image processing method
US20040044964A1 (en) Behavior of anchored frames
US20210073458A1 (en) Comic data display system, method, and program
JP3741587B2 (en) Document image display apparatus and method, and computer-readable recording medium storing a document image display program
JP4631261B2 (en) Captured image projection apparatus, image processing method thereof, and program
JP2013097626A (en) Mobile information terminal and book image display method
JP2004258724A (en) Document creation support device and method, program and recording medium
JP4090784B2 (en) Scroll bar display control method, scroll bar display control device, scroll bar display control program, and recording medium
JP4435879B2 (en) Image zooming method, apparatus and recording medium therefor
US11609732B2 (en) Information processing device displaying database image in first display region and partial enlarged image in second display region
JP2014021694A (en) Portable information terminal, table display method for portable information terminal and table display program for portable information 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40008882

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant