CN111199136B - Methods, devices and equipment for displaying document content - Google Patents
Methods, devices and equipment for displaying document content Download PDFInfo
- Publication number
- CN111199136B CN111199136B CN201811273473.3A CN201811273473A CN111199136B CN 111199136 B CN111199136 B CN 111199136B CN 201811273473 A CN201811273473 A CN 201811273473A CN 111199136 B CN111199136 B CN 111199136B
- Authority
- CN
- China
- Prior art keywords
- page
- display
- switching information
- document
- displayed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
According to the method, the device and the equipment for displaying the document content, the document to be displayed is obtained according to the document opening instruction. And determining a first page of the document to be displayed as a first display page, and determining a double page consisting of every two adjacent pages except the first page as a second display page according to the page sequence. And displaying the first display page. When the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information, and displaying the first display page or the second display page corresponding to the page switching information. The method and the device realize the independent display of the cover pages of the document, and the display effect of double-page display of the non-cover pages is the same as the display effect of the document in real reading, so that the document content deletion caused by single-page display is avoided.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for displaying document content.
Background
With the popularization of electronic reading, corresponding electronic documents exist in paper readings such as books, magazines and books, so that readers can read the readings on various applications with document display functions.
In general, when various applications with a document display function display document contents, a single page corresponding to page switching information is displayed according to the page switching information. For example, when the PDF (Portable Document Format ) application presents a 3-page paper, page 1 is presented in the display window corresponding to the current page switching information, page 3 is presented in the display window corresponding to the current page switching information.
However, when books, magazines, books and the like are compiled, some contents may be displayed in a double-page form. If document contents of the electronic documents of the reader are displayed on a single page, the displayed document contents are incomplete, and the reading of users is seriously affected. For example, for the purpose of showing an effect, one photograph in a certain photographic magazine is composed of two pages. When a photo magazine object is read, the two pages forming the photo are respectively the left side page and the right side page of the magazine, so that the photo is completely displayed. However, when reading the electronic document, since a single page of the document is displayed, only half of the contents of the photo in the currently displayed page can be displayed on the next page, and the currently displayed document is incomplete.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device and equipment for displaying document contents, so as to realize displaying the document contents according to the display form of pages in real reading and avoid document content deletion caused by single page display. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for displaying document content, where the method includes:
acquiring a document to be displayed according to a document opening instruction;
determining a first page of a document to be displayed as a first display page, and determining a double page formed by every two adjacent pages except the first page as a second display page according to the page sequence;
displaying a first display page;
when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information;
and displaying a first display page or a second display page corresponding to the page switching information.
In a second aspect, an embodiment of the present invention provides a device for displaying document content, where the device includes:
the document acquisition module is used for acquiring a document to be displayed according to a document opening instruction;
the page acquisition module is used for determining a first page of a document to be displayed as a first display page, and determining a double page formed by every two adjacent pages except the first page as a second display page according to the page sequence;
The page display module is used for displaying a first display page; when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information; and displaying a first display page or a second display page corresponding to the page switching information.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
the device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the bus; a memory for storing a computer program; and the processor is used for executing the program stored in the memory and realizing the steps of the document content display method provided in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the document content presentation method provided in the first aspect.
According to the method, the device and the equipment for displaying the document content, the document to be displayed is obtained according to the document opening instruction. And determining a first page of the document to be displayed as a first display page, and determining a double page consisting of every two adjacent pages except the first page as a second display page according to the page sequence. And displaying the first display page. When the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information, and displaying the first display page or the second display page corresponding to the page switching information. Compared with the traditional document display method for displaying the single page corresponding to the page switching information, the first page of the document is the cover, single page display is carried out, and two adjacent pages except for the first page are displayed in double pages, so that the cover page of the document is independently displayed, the display effect of the double page display of the non-cover page is the same as the display effect of the document in real reading, and further the document content loss caused by single page display is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a method for displaying document content according to an embodiment of the invention;
FIG. 2 is a schematic diagram showing the effect of document content according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for displaying document content according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a document content display device according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a document content display apparatus according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method for displaying document contents according to an embodiment of the present invention will be described first.
The method for displaying the document content provided by the embodiment of the invention can be applied to electronic equipment capable of displaying the document, wherein the equipment can comprise a desktop computer, a portable computer, an internet television, an intelligent mobile terminal, a wearable intelligent terminal, a server and the like, is not limited herein, and any electronic equipment capable of realizing the embodiment of the invention belongs to the protection scope of the embodiment of the invention.
As shown in fig. 1, a method for displaying document content according to an embodiment of the present invention may include:
s101, acquiring a document to be displayed according to a document opening instruction.
For example, if the document opening instruction is to open the document M1 in the storage path P1, the document M1 is acquired from the storage path P1 as the document M1 to be presented.
S102, determining a first page of a document to be displayed as a first display page, and determining a double page formed by every two adjacent pages except the first page as a second display page according to the page sequence.
In practical application, the page queue or the arrangement sequence of the pages of the document to be displayed can be obtained from the obtained document to be displayed, so that the first page of the document to be displayed and the adjacent pages of each page except the first page can be determined. And further determining the first page of the document to be displayed as a first display page. And determining the double page consisting of every two adjacent pages except the first page as a second display page according to the page sequence.
For example, the document M1 to be displayed is composed of page 1, pages 2, … …, page n, where n is the order of the pages, and page 1 is the first page. The method comprises the steps of determining a page 1 as a first display page, determining a double page formed by a page 2 and a page 3 as a second display page according to the page sequence, determining a double page formed by a page 4 and a page 5 as a second display page, … …, and determining a double page formed by a page n-1 and a page n as a second display page.
Of course, if the double page formed by every two adjacent pages except the first page is determined to be a second display page in sequence, the last page has no adjacent page, the page can be determined directly to be a second display page, and the double page formed by the page and the preset blank page can also be determined to be a second display page. For example, the document M2 to be displayed is composed of page 1, page 2, page 3, and page 4. When the double page formed by every two adjacent pages except the first page is determined to be a second display page in sequence, if the page 4 does not have the adjacent pages, the page 4 can be directly determined to be a second display page, and the double page formed by the page 4 and the preset blank page can also be determined to be a second display page.
In practical application, when the pages in the document to be displayed are stored in the form of a queue, optionally, after step S101 and before step S102 in the embodiment of fig. 1 of the present invention, the document displaying method in the embodiment of the present invention may further include:
and obtaining a page queue of the document to be displayed from the document to be displayed.
Accordingly, step S102 of the embodiment of fig. 1 of the present invention may specifically include:
and determining a first page in the page queue as a first display page, and determining every two adjacent pages except the first page in the page queue as a second display page according to the sequence of the pages.
For example, from the document M1 to be presented, the obtained page queues are page 1, page 2, … …, page n, where n is the order of the pages. The first page 1 is determined to be a first display page, the double page formed by the page 2 and the page 3 is determined to be a second display page according to the page sequence, the double page formed by the page 4 and the page 5 is determined to be a second display page, … …, and the double page formed by the page n-1 and the page n is determined to be a second display page.
S103, displaying the first display page.
Specifically, the first presentation page may be displayed in a display window.
S104, when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information.
The identifying of the page switching information may be receiving page switching information of switching to a specified page input by a user, or may be identifying that a position of a currently displayed display page in a display window is a preset switching position. Correspondingly, the page corresponding to the page switching information may be a page corresponding to the page serial number contained in the page switching information, or may be an index of a page corresponding to the determined page switching information based on an index of a currently displayed display page.
The determining the first display page or the second display page corresponding to the page switching information according to the page corresponding to the page switching information may be determining that the display page corresponding to the page switching information is the first display page according to the page sequence number of the first page included in the page switching information, or determining that the display page corresponding to the page switching information is the second display page formed by two adjacent pages according to the page sequence number of any one of two adjacent pages forming the double page included in the page switching information. For example, the page sequence number included in the page switching information is 1, it is determined that the display page corresponding to the page switching information is the first display page, or according to any one of the page sequence numbers included in the page switching information is 2 and 3, it is determined that the display page corresponding to the page switching information is the second display page formed by the page 2 and the page 3.
Or determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information, or determining that the display page corresponding to the page switching information is the first display page based on the index of the display page currently displayed, or determining that the index of the page corresponding to the page switching information is the second display page consisting of two adjacent pages based on the index of the display page currently displayed, wherein the index of the page corresponding to the determined page switching information is one of the two adjacent pages composing the double page, and the index of any one page is determined that the display page corresponding to the page switching information is the second display page consisting of the two adjacent pages. For example, the index of the page corresponding to the page switching information is 1, the display page corresponding to the page switching information is determined to be the first display page, or according to the index of the page corresponding to the page switching information is any one of 2 and 3, the display page corresponding to the page switching information is determined to be the second display page consisting of the page 2 and the page 3.
S105, displaying a first display page or a second display page corresponding to the page switching information.
Specifically, the first display page or the second display page corresponding to the page switching information may be displayed in the display window. For example, when the page switching information corresponds to the first display page, the first display page is displayed in the display window. And when the page switching information corresponds to the second display page, displaying the second display page in the display window.
Compared with the traditional document display method for displaying the single page corresponding to the page switching information, the document display method provided by the embodiment of the invention has the advantages that the first page of the document is the cover, single page display is carried out, and each two adjacent pages except the first page are subjected to double page display, so that the cover page of the document is independently displayed, the display effect of double page display of the non-cover page is the same as the display effect of the document in real reading, and the document content loss caused by single page display is avoided.
When the page switching information is identified that the position of the currently displayed display page in the display window is the preset switching position, the step S104 of the embodiment of the present invention in fig. 1 may include:
and acquiring the display position and the current index of the currently displayed display page in the display window. The current index is the sequence number of the corresponding page of the currently displayed display page in the document to be displayed.
Specifically, the display window can be used as a two-dimensional coordinate system, when a user places a cursor of a mouse on a page and slides a mouse wheel, so that when the page moves in the display window, different position coordinates are corresponding, the position coordinates of the display page in the display window can be obtained and used as the display position of the display page, and whether page switching information is recognized or not can be determined later. Of course, the display position may be acquired according to a preset period, or may be acquired when the movement of the display page is detected. Of course, the page moves in the display window, or the user slides a sliding bar positioned at one side of the page to move the page, or the page can be moved according to an up-movement, a down-movement or a page turning command sent by the user through a keyboard.
Meanwhile, a current index of the display page displayed at present is obtained and is used for subsequently determining a switching index of the display page after switching, so that the display page after switching is determined according to the switching index. The index is the sequence number of the corresponding page of the display page in the document to be displayed and is used for indicating the display sequence of the display page in the page to be displayed.
For example, the currently displayed presentation page is the first presentation page, the current index of the page is 1, the display position in the display window is the lower left corner coordinate (0, 0) of the page, or the lower right corner coordinate (21,0) of the page. The currently displayed presentation page is a second presentation page, which is a double page consisting of page 2 and page 3, the current index of the second presentation page is 2 or 3, and the display position of the display window is the upper left corner coordinates (0, 15) of the page, or the upper right corner coordinates (21, 15) of the page. .
If the display position is the preset switching position, the page switching information is identified.
In practical application, when the moving directions of the currently displayed display pages are different, the preset switching positions are also different.
For example, when the moving direction of the currently displayed display page is downward, the preset switching position is the lower left corner (0, 0) of the page or the lower right corner (21,0) of the page. When the first displayed page currently displayed moves downwards and the lower left corner coordinate of the page is (0, 0), or the lower right corner coordinate of the page is (21,0), page switching information is identified. And when the moving direction of the currently displayed display page moves upwards, presetting the switching position as the left upper corner coordinates (0, 15) of the page or the right lower corners (21, 15) of the page. When the second display page currently displayed moves upwards and the upper left corner coordinate of the page is (0, 15) or the upper right corner coordinate of the page is (21, 15), the page switching information is identified.
And determining the switching index of the page corresponding to the page switching information according to the current index. The switching index is the sequence of the page corresponding to the page switching information in the document to be displayed.
Specifically, if the page switching information is identified, the currently displayed display page moves downward, and the switching index of the page corresponding to the page switching information=the current index+1. If the page switching information is identified, the currently displayed display page moves upwards, and the switching index of the page corresponding to the page switching information=the current index-1, or the switching index of the page corresponding to the page switching information=the current index-2.
When the second display page displayed at present moves upwards, page switching is performed, and when the first page moves upwards, identification of page switching information is not needed. Therefore, when determining the switching index, if it is the index according to the page whose presentation order is the front among the two pages constituting the second presentation page, the switching index=the current index-1. If the index of the page whose presentation order is subsequent is based on the two pages constituting the second presentation page, the index=current index-2 is switched.
For example, when the currently displayed page is the first display page, according to the current index 1, determining a switching index=1+1=2 of the page corresponding to the switching information. When the currently displayed page is a second display page consisting of a page 2 and a page 3, determining a switching index=2-1=1 or a switching index=3-2=1 of the page corresponding to the switching information according to the current index 2 or 3.
And determining a first display page or a second display page corresponding to the page switching information according to the switching index.
For example, if the switching index is 1, it is determined that the display page corresponding to the page switching information is the first display page. If the switching index is 2, determining that the display page corresponding to the page switching information is a double-page second display page consisting of the page 2 and the page 3.
In practical application, the determined display page may be displayed directly, or the processed display page may be displayed after the determined display page is processed. For this purpose, the step S103 in the embodiment of fig. 1 of the present invention may specifically include:
and rendering the first display page into a first display picture.
And displaying the first display picture in the display window.
And processing the determined display page, namely rendering the display page into a display picture, and displaying the display picture in a display window. As shown in fig. 2, when the first presentation page 202 is displayed in the display window 201, a first presentation picture obtained by rendering the first presentation page 202 is displayed.
Accordingly, the step S105 in the embodiment of fig. 1 of the present invention may specifically include:
Rendering a first display page corresponding to the page switching information into a first display picture, or rendering a second display page corresponding to the page switching information into a second display picture.
And displaying the first display picture or the second display picture corresponding to the page switching information in the display window.
The second display picture can be specifically two adjacent pages in the second display page corresponding to the page switching information, and the two adjacent pages are arranged in parallel left and right to obtain a second page to be rendered; and rendering the second page to be rendered into a second display picture. For example, if the second display page corresponding to the page switching information is composed of the page 2 and the page 3, the page 2 and the page 3 are arranged side by side. And taking the two arranged pages as a whole to-be-rendered second page, and rendering the second page with rendering to obtain a second display picture. The second display picture is a picture, and the picture comprises two pages.
In addition, the second display image may also be obtained by rendering two adjacent pages that form the second display page, and for this purpose, optionally, step S105 in the embodiment of fig. 1 of the present invention may specifically include:
and respectively rendering two adjacent pages in the second display page corresponding to the page switching information into a first sub-picture and a second sub-picture.
And arranging the first sub-picture and the second sub-picture in parallel left and right to serve as a second display picture.
For example, the second display page corresponding to the page switching information is composed of a page 2 and a page 3, the page 2 is rendered into a first sub-picture, and the page 3 is rendered into a second sub-picture. As shown in fig. 2, the first sub-picture 2031 and the second sub-picture 2032 are arranged side by side as a second display picture, so that the second display picture is displayed in the display window 201, and the second display page 203 is displayed. Of course, fig. 2 is merely illustrative of the document presentation effect, and the sizes and positions of the first presentation page 202, the second presentation page 203, and the display window 201 in fig. 2 are merely exemplary.
In addition, when the two adjacent pages forming the second display page or the first sub-picture and the second sub-picture obtained by rendering are arranged in parallel left and right, the pages or sub-pictures with the front sequence can be arranged on the left side according to the page arrangement sequence, and the pages or sub-pictures with the rear sequence can be arranged on the right side. Or according to the index of the pages, arranging the pages or sub-images with small indexes on the left side and arranging the pages or sub-images with large indexes on the right side. For example, the page 2 is arranged on the left side, the page 3 is arranged on the right side, the sub-image obtained by rendering the page 2 is arranged on the left side, and the sub-image obtained by rendering the page 3 is arranged on the right side. Of course, the page 3 may be arranged on the left side, the page 2 may be arranged on the right side, the sub-image obtained by rendering the page 3 may be arranged on the left side, and the sub-image obtained by rendering the page 2 may be arranged on the right side.
In practical application, in order to display a document suitable for the reading habit of a user and the size of a display window for display, the document can be displayed according to an instruction input by the user. In this regard, optionally, after step S103 and before step S104 in the above embodiment of fig. 1 of the present invention, the document display method of the embodiment of the present invention may further include:
and outputting prompt information of whether to independently display the cover.
And receiving a display mode instruction input by a user whether to independently display the cover.
In practical application, a prompt window containing prompt information about whether to independently display the cover can be output, and a selection button for displaying a mode can be displayed in a function field of the display window.
If the show mode instruction is to independently show the cover, step S104 is performed in the embodiment of FIG. 1 of the present invention.
When the instruction of the display mode input by the user is to display the cover independently, step S104 may be executed to display the text to be displayed as the effect shown in fig. 2.
If the display mode instruction is that the cover is not displayed independently, displaying the page of the document to be displayed corresponding to the page switching information when the page switching information is identified.
The display mode instruction is to display the cover independently, so that a single page can be displayed on each page according to a traditional display mode. For example, if the page of the document to be displayed corresponding to the page switching information is page 2, page 2 is displayed, and the determined second display page composed of page 2 and page 3 is not displayed according to steps S104 and S105.
In practical application, the document page is displayed according to the page size carried by the document to be displayed, but different devices for displaying the document have different display sizes, and the display window size is also different under different reading requirements of users. When the page size does not match the display window, the display page size may be larger than the display window size and cannot be displayed completely, or the display page size is much smaller than the display window and is inconvenient to read.
In order to match the displayed display page with the size of the display window or meet the size requirement of the page when the user reads, optionally, after step S103 of the embodiment of fig. 1 of the present invention, the document display method of the embodiment of the present invention may further include:
when a page size adjustment instruction is received, rendering the first display page into a first adjusted display picture according to the adjustment size corresponding to the page size adjustment instruction.
Displaying the first adjusted display picture in the display window.
The adjustment size corresponding to the adjustment instruction may be a size determined according to an adjustment proportion input by a user and a size of a currently displayed page, or may be a size input by means of a shortcut key and a scroll mouse wheel. For example, the current display page has a size of 21 cm and 27.9 cm, which is not matched with the size of the display window, and the user reduces the input adjustment ratio to 80%, so that the adjustment instruction corresponds to an adjustment size of adjustment length=21 cm×80% =16.8 cm, and adjustment width=15 cm×80% =12 cm. Rendering the first display page into a picture with the length of 16.8 cm and the width of 12 cm, obtaining a first adjusted display picture, and displaying the first adjusted display picture in a display window, so that the displayed document page meets the size required by a user.
Accordingly, after step S105 of the above embodiment of fig. 1 of the present invention, the document display method of the embodiment of the present invention may further include:
when a page size adjustment instruction is received, rendering a first display page corresponding to the page switching information into a first adjusted display picture according to the adjustment size corresponding to the page size adjustment instruction, or rendering a second display page corresponding to the page switching information into a second adjusted display picture.
Displaying a first adjusted display picture or a second adjusted display picture corresponding to the page switching information in the display window.
For example, when a page size adjustment instruction input by a user through a shortcut key and a scroll mouse wheel is received, the length of a first display page corresponding to page switching information is adjusted by 8 cm and the width of the first display page is adjusted by 4 cm according to the adjustment size corresponding to the page size adjustment instruction, and the first display page corresponding to the page switching information is rendered into a first adjusted display picture with the length of 8 cm and the width of 4 cm. When the page switching information corresponds to a second display page consisting of the page 2 and the page 3, rendering the second display page into a second adjusted display picture with the length=8×2=16 cm and the width=4×2=8 cm. Of course, the page 2 can be rendered into a first adjusted sub-picture with the length of 8 cm and the width of 4 cm, the page 3 can be rendered into a second adjusted sub-picture with the length of 8 cm and the width of 4 cm, and the first adjusted sub-picture and the second adjusted sub-picture are arranged side by side left and right to obtain the second adjusted display picture. And displaying the adjusted display picture in the display window, so that the displayed document page meets the requirement of a user on the display size.
In practical applications, the last page of books such as magazines, drawings and books is usually a back cover, and the back cover and the front cover have a correlation. Therefore, when the document of the reading material is displayed, the front cover and the back cover can be combined into a double-page to be displayed together, so that a user can have complete knowledge of the document in the initial reading process.
To this end, as shown in fig. 3, a flow of a document content presentation method according to another embodiment of the present invention may include:
s301, acquiring a document to be displayed according to a document opening instruction.
S301 is the same step as S101 in the embodiment of FIG. 1, and is not described herein again, and detailed descriptions of the embodiment of FIG. 1 are provided herein.
S302, using a preset back cover recognition algorithm to recognize whether the last page of the document to be displayed is a back cover. If yes, S303 is executed, and if no, S304 is executed.
S303, determining a double-page formed by the last page and the first page as a first display page.
The preset back cover recognition algorithm may specifically be to recognize whether the text content of the page contains preset back cover content. When the last page is the back cover, the last page and the first page can form a double-page, and the double-page is determined to be the first display page, so that the front cover and the back cover are displayed together during subsequent display, and the user can read the document in an initial manner.
S304, determining a first page of the document to be displayed as a first display page.
S305, determining the double pages formed by every two adjacent pages except the first page as a second display page according to the page sequence.
S304 to S305 are the same steps as S102 in the embodiment of fig. 1 of the present invention, and are not described herein again, and detailed descriptions of the embodiment of fig. 1 of the present invention are omitted.
S306, displaying the first display page.
S307, when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information.
S308, displaying a first display page or a second display page corresponding to the page switching information.
S306 to S308 are the same steps as S103 to S105 in the embodiment of fig. 1 of the present invention, and are not described herein again, and detailed descriptions of the embodiment of fig. 1 of the present invention are omitted.
Optionally, step S302 in the embodiment of fig. 3 of the present invention may specifically include:
and acquiring the text content of the last page.
Specifically, the text content in the page can be read by analyzing the last page.
Judging whether the text content contains preset back cover content or not.
If so, determining the last page as the back cover.
Specifically, the text content of the page can be compared with the preset back cover content, and if at least one word identical to the preset back cover content exists in the text content of the page, the text content of the page is indicated to contain the preset back cover content, so that the last page is determined to be the back cover. The preset back cover content specifically may include: words such as "book number", "pricing", "copyright", "recommended language" and "author". For example, the text content of the last page includes "pricing XX", "introduction XX", then the last page is the back cover.
Corresponding to the embodiment of the method, the embodiment of the invention also provides a display device of the document content.
As shown in fig. 4, the structure of a document content display apparatus according to an embodiment of the present invention may include:
the document acquisition module 401 is used for acquiring a document to be displayed according to a document opening instruction;
the page acquisition module 402 is configured to determine a first page of a document to be displayed as a first display page, and determine, in page order, a double page formed by every two adjacent pages except the first page as a second display page;
a page display module 403, configured to display a first display page; when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information; and displaying a first display page or a second display page corresponding to the page switching information.
When the display device for the document content provided by the embodiment of the invention is used for displaying the document, compared with the traditional document display of displaying the single page corresponding to the page switching information, the first page of the document is the cover, the single page display is carried out, and every two adjacent pages except the first page are subjected to double-page display, so that the independent display of the cover page of the document and the double-page display effect of the non-cover page are realized, the display effect of the double-page display of the non-cover page is the same as that of the document in real reading, and the document content loss caused by the single-page display is further avoided.
Optionally, the document acquisition module 401 in the embodiment of fig. 4 of the present invention may be specifically configured to:
obtaining a page queue of a document to be displayed from the document to be displayed;
accordingly, the page acquisition module 402 in the embodiment of fig. 4 of the present invention described above may be specifically used for:
and determining a first page in the page queue as a first display page, and determining every two adjacent pages except the first page in the page queue as a second display page according to the sequence of the pages.
Optionally, the page display module 403 in the embodiment of fig. 4 of the present invention may be specifically configured to:
acquiring the display position and the current index of a currently displayed display page in a display window; the current index is the sequence number of the corresponding page of the currently displayed display page in the document to be displayed;
If the display position is a preset switching position, identifying page switching information;
determining a switching index of a page corresponding to the page switching information according to the current index; the switching index is the sequence of the page corresponding to the page switching information in the document to be displayed;
and determining a first display page or a second display page corresponding to the page switching information according to the switching index.
Optionally, the page display module 403 in the embodiment of fig. 4 of the present invention may be specifically configured to:
rendering the first display page into a first display picture;
displaying the first display picture in a display window;
the page display module 403 may be specifically configured to:
rendering a first display page corresponding to the page switching information into a first display picture, or rendering a second display page corresponding to the page switching information into a second display picture;
and displaying the first display picture or the second display picture corresponding to the page switching information in the display window.
Optionally, the page acquisition module 402 in the embodiment of fig. 4 of the present invention may be specifically configured to:
rendering two adjacent pages in a second display page corresponding to the page switching information into a first sub-picture and a second sub-picture respectively;
And arranging the first sub-picture and the second sub-picture in parallel left and right to serve as a second display picture.
Optionally, the document content display apparatus in the embodiment of fig. 4 of the present invention may further include a mode selection module;
the mode selection module is configured to output a prompt message indicating whether to independently display the cover after the page display module 403 displays the first display page and before the page switching information is identified; receiving a display mode instruction input by a user whether to independently display the cover;
if the display mode instruction is an independent display cover, the page display module 403 executes, when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information;
if the display mode instruction is that the cover is not displayed independently, the page display module 403 displays the page of the document to be displayed corresponding to the page switching information when the page switching information is identified.
Optionally, the page display module 403 in the embodiment of fig. 4 of the present invention may be specifically configured to:
after the first display page is displayed, when a page size adjustment instruction is received, rendering the first display page into a first adjusted display picture according to the adjustment size corresponding to the page size adjustment instruction;
Displaying the first adjusted display picture in the display window;
after a first display page or a second display page corresponding to the page switching information is displayed, when a page size adjustment instruction is received, rendering the first display page corresponding to the page switching information into a first adjusted display picture according to the adjustment size corresponding to the page size adjustment instruction, or rendering the second display page corresponding to the page switching information into a second adjusted display picture;
displaying a first adjusted display picture or a second adjusted display picture corresponding to the page switching information in the display window.
As shown in fig. 5, the structure of a document content presentation apparatus according to another embodiment of the present invention may include:
the document acquisition module 501 is used for acquiring a document to be displayed according to a document opening instruction;
the back cover recognition module 502 is configured to recognize whether a last page of a document to be displayed is a back cover by using a preset back cover recognition algorithm;
the page obtaining module 503 is configured to determine, when the back cover identifying module identifies that the last page is a back cover, a double page formed by the last page and the first page as a first display page; when the back cover recognition module recognizes that the last page is not the back cover, determining a first page of the document to be displayed as a first display page, and determining a double page formed by every two adjacent pages except the first page as a second display page according to the page sequence;
The page display module 504 is configured to display a first display page; when the page switching information is identified, determining a first display page or a second display page corresponding to the page switching information according to the page corresponding to the page switching information; and displaying a first display page or a second display page corresponding to the page switching information.
Optionally, the bottom sealing recognition module 502 in the embodiment of fig. 5 of the present invention may be specifically configured to:
acquiring the text content of the last page;
judging whether the text content contains preset back cover content or not;
if so, determining the last page as the back cover.
Corresponding to the above embodiment, the embodiment of the present invention further provides an electronic device, as shown in fig. 6, where the device may include:
processor 601, communication interface 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 complete the communication each other through communication bus 604;
a memory 603 for storing a computer program;
the processor 601 is configured to implement the steps of the method for displaying document contents according to any of the above embodiments when executing the computer program stored in the memory 603.
When the electronic equipment provided by the embodiment of the invention is used for displaying the document, compared with the traditional document display of displaying the single page corresponding to the page switching information, the first page of the document is the cover, the single page display is carried out, and each two adjacent pages except the first page are subjected to double-page display, so that the independent display of the cover page of the document and the double-page display effect of the non-cover page are realized, the display effect of the double-page display of the non-cover page is the same as that of the document in real reading, and the document content loss caused by the single-page display is further avoided.
The Memory may include RAM (Random Access Memory ) or NVM (Non-Volatile Memory), such as at least one magnetic disk Memory. Optionally, the memory may be at least one memory device located remotely from the processor.
The processor may be a general-purpose processor, including a CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processor ), ASIC (Application Specific Integrated Circuit, application specific integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
An embodiment of the present invention provides a computer readable storage medium, including an electronic device, where the computer readable storage medium stores a computer program, where the computer program, when executed by a processor, implements the steps of the method for displaying content of any document in the above embodiment.
The embodiment of the invention provides a computer readable storage medium, which is included in an electronic device, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, compared with the traditional document display of displaying a single page corresponding to page switching information, the first page of a document is a cover, single page display is performed, and every two adjacent pages except the first page are subjected to double page display, so that the independent display of the cover page of the document and the double page display effect of a non-cover page are realized, the display effect of the document is the same as that of a document in real reading, and further the document content deletion caused by single page display is avoided.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of presenting document content according to any one of the embodiments described above is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, fiber optic, DSL (Digital Subscriber Line), or wireless (e.g., infrared, radio, microwave, etc.) means, the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, data center, etc., that contains an integration of one or more available media, the available media may be magnetic media (e.g., floppy Disk, hard Disk, magnetic tape), optical media (e.g., DVD (Digital Versatile Disc, digital versatile Disk)), or semiconductor media (e.g., SSD State, solid State Disk), etc.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus and electronic device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only required.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811273473.3A CN111199136B (en) | 2018-10-30 | 2018-10-30 | Methods, devices and equipment for displaying document content |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811273473.3A CN111199136B (en) | 2018-10-30 | 2018-10-30 | Methods, devices and equipment for displaying document content |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111199136A CN111199136A (en) | 2020-05-26 |
| CN111199136B true CN111199136B (en) | 2024-03-19 |
Family
ID=70745777
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811273473.3A Active CN111199136B (en) | 2018-10-30 | 2018-10-30 | Methods, devices and equipment for displaying document content |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111199136B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112269503B (en) * | 2020-10-22 | 2022-08-16 | 武汉悦学帮网络技术有限公司 | Method and device for displaying operation document, readable storage medium and equipment |
| CN114647475B (en) * | 2022-03-30 | 2024-05-31 | 掌阅科技股份有限公司 | Display method of folding screen device, folding screen device and storage medium |
| CN115016872A (en) * | 2022-04-28 | 2022-09-06 | 掌阅科技股份有限公司 | Page display method, electronic equipment and storage medium |
| CN120390115A (en) * | 2025-06-12 | 2025-07-29 | 北京达佳互联信息技术有限公司 | Page display method, device, equipment and storage medium |
Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0778144A (en) * | 1993-06-25 | 1995-03-20 | Casio Comput Co Ltd | Display controller |
| CN101571850A (en) * | 2009-06-10 | 2009-11-04 | 青岛海信移动通信技术股份有限公司 | Display packing and device of text document in support of page turn function |
| US7774799B1 (en) * | 2003-03-26 | 2010-08-10 | Microsoft Corporation | System and method for linking page content with a media file and displaying the links |
| WO2012057897A1 (en) * | 2010-10-27 | 2012-05-03 | Google Inc. | Animated page turning |
| CN102646008A (en) * | 2011-02-16 | 2012-08-22 | 汉王科技股份有限公司 | Method and device for displaying multi-display page of document by electronic reader |
| CN103513875A (en) * | 2012-06-18 | 2014-01-15 | 英奇达资讯股份有限公司 | Method for automatically spanning pages of electronic book |
| WO2015014023A1 (en) * | 2013-07-29 | 2015-02-05 | 华为技术有限公司 | Method and apparatus for page switching |
| CN104615776A (en) * | 2015-02-27 | 2015-05-13 | 北京奇艺世纪科技有限公司 | Method and device for providing information to be displayed |
| CN105378622A (en) * | 2013-01-31 | 2016-03-02 | 日本电气株式会社 | Document browsing device, method for turning over pages of electronic document, and program |
| CN106484726A (en) * | 2015-08-31 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of page display method and device |
| CN107256116A (en) * | 2017-06-12 | 2017-10-17 | 广州神马移动信息科技有限公司 | Page layout switch processing method, device, user terminal and read/write memory medium |
| CN107678636A (en) * | 2016-08-01 | 2018-02-09 | 广州市动景计算机科技有限公司 | The webpage representation method and apparatus of electronic equipment |
| CN107679180A (en) * | 2017-09-29 | 2018-02-09 | 北京金山安全软件有限公司 | Data display method and device |
| TWM556011U (en) * | 2017-07-27 | 2018-02-21 | 海馬音樂工作室有限公司 | Music score displaying system |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070061755A1 (en) * | 2005-09-09 | 2007-03-15 | Microsoft Corporation | Reading mode for electronic documents |
-
2018
- 2018-10-30 CN CN201811273473.3A patent/CN111199136B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0778144A (en) * | 1993-06-25 | 1995-03-20 | Casio Comput Co Ltd | Display controller |
| US7774799B1 (en) * | 2003-03-26 | 2010-08-10 | Microsoft Corporation | System and method for linking page content with a media file and displaying the links |
| CN101571850A (en) * | 2009-06-10 | 2009-11-04 | 青岛海信移动通信技术股份有限公司 | Display packing and device of text document in support of page turn function |
| WO2012057897A1 (en) * | 2010-10-27 | 2012-05-03 | Google Inc. | Animated page turning |
| CN102646008A (en) * | 2011-02-16 | 2012-08-22 | 汉王科技股份有限公司 | Method and device for displaying multi-display page of document by electronic reader |
| CN103513875A (en) * | 2012-06-18 | 2014-01-15 | 英奇达资讯股份有限公司 | Method for automatically spanning pages of electronic book |
| CN105378622A (en) * | 2013-01-31 | 2016-03-02 | 日本电气株式会社 | Document browsing device, method for turning over pages of electronic document, and program |
| WO2015014023A1 (en) * | 2013-07-29 | 2015-02-05 | 华为技术有限公司 | Method and apparatus for page switching |
| CN104615776A (en) * | 2015-02-27 | 2015-05-13 | 北京奇艺世纪科技有限公司 | Method and device for providing information to be displayed |
| CN106484726A (en) * | 2015-08-31 | 2017-03-08 | 阿里巴巴集团控股有限公司 | A kind of page display method and device |
| CN107678636A (en) * | 2016-08-01 | 2018-02-09 | 广州市动景计算机科技有限公司 | The webpage representation method and apparatus of electronic equipment |
| CN107256116A (en) * | 2017-06-12 | 2017-10-17 | 广州神马移动信息科技有限公司 | Page layout switch processing method, device, user terminal and read/write memory medium |
| TWM556011U (en) * | 2017-07-27 | 2018-02-21 | 海馬音樂工作室有限公司 | Music score displaying system |
| CN107679180A (en) * | 2017-09-29 | 2018-02-09 | 北京金山安全软件有限公司 | Data display method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111199136A (en) | 2020-05-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10484315B2 (en) | Method, system and apparatus for adding network comment information | |
| CN106484266B (en) | A text processing method and device | |
| US10778928B2 (en) | Device and method for inputting note information into image of photographed object | |
| US8949729B2 (en) | Enhanced copy and paste between applications | |
| US8341543B2 (en) | Method and apparatus of scrolling a document displayed in a browser window | |
| CN111199136B (en) | Methods, devices and equipment for displaying document content | |
| US20120131520A1 (en) | Gesture-based Text Identification and Selection in Images | |
| JP4945813B2 (en) | Print structured documents | |
| US20170140250A1 (en) | Content file image analysis | |
| US8897594B2 (en) | Image reader, mobile terminal apparatus, and non-transitory computer readable medium | |
| WO2020125345A1 (en) | Electronic book note processing method, handwriting reading device, and storage medium | |
| US20210073458A1 (en) | Comic data display system, method, and program | |
| JP2015158900A (en) | Information processing device, information processing method and information processing program | |
| US20220019783A1 (en) | Method for processing a note page of a notebook, computer device and storage medium | |
| US20160232151A1 (en) | Responsive course design system and method | |
| CN103530320A (en) | Multimedia file processing method and device and terminal | |
| CN107239528A (en) | Search result display methods and device | |
| WO2020125481A1 (en) | Method for generating identification pattern, and terminal device | |
| CN112230835A (en) | Picture operation method, device, terminal device and storage medium | |
| CN111783386A (en) | Note processing method based on electronic book, electronic equipment and storage medium | |
| CN110956023B (en) | A method and device for displaying annotations | |
| CN103513875A (en) | Method for automatically spanning pages of electronic book | |
| CN118509641A (en) | Video editing method, device, equipment and medium | |
| JP2011086050A (en) | Information processing terminal and computer program | |
| RU2732892C2 (en) | System and method of processing a screenshot-type note for a streaming document |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |