U.S. patent application number 11/369075 was filed with the patent office on 2006-07-06 for dynamic pagination of text and resizing of image to fit a document.
This patent application is currently assigned to Microsoft Corporation. Invention is credited to Ralph Sommerer, Charles P. Thacker.
Application Number | 20060150096 11/369075 |
Document ID | / |
Family ID | 36127887 |
Filed Date | 2006-07-06 |
United States Patent
Application |
20060150096 |
Kind Code |
A1 |
Thacker; Charles P. ; et
al. |
July 6, 2006 |
Dynamic pagination of text and resizing of image to fit a
document
Abstract
Dynamic pagination for electronic documents, such as electronic
books, is disclosed. In one embodiment, a computer-implemented
method first processes a document made up of at least text, as a
number of segments. Second, the method determines a number of page
breaks within a predetermined segment. This segment, for example,
may be entered into the memory of a viewing device, such as an
electronic book device. Third, the method renders a predetermined
page within the predetermined segment, and finally displays the
predetermined page. For example, the page can be displayed on a
display device such as a flat-panel display of an electronic book
device.
Inventors: |
Thacker; Charles P.; (Palo
Alto, CA) ; Sommerer; Ralph; (Cambridge, GB) |
Correspondence
Address: |
AMIN & TUROCY, LLP
24TH FLOOR, NATIONAL CITY CENTER
1900 EAST NINTH STREET
CLEVELAND
OH
44114
US
|
Assignee: |
Microsoft Corporation
Redmond
WA
|
Family ID: |
36127887 |
Appl. No.: |
11/369075 |
Filed: |
March 6, 2006 |
Related U.S. Patent Documents
|
|
|
|
|
|
Application
Number |
Filing Date |
Patent Number |
|
|
09410414 |
Oct 1, 1999 |
7028258 |
|
|
11369075 |
Mar 6, 2006 |
|
|
|
Current U.S.
Class: |
715/251 ;
715/227; 715/247 |
Current CPC
Class: |
G06F 40/114
20200101 |
Class at
Publication: |
715/525 ;
715/521 |
International
Class: |
G06F 17/21 20060101
G06F017/21 |
Claims
1. A machine implemented method that facilitates dynamically
adaptive pagination, comprising: deconstructing an electronic
document into at least one segment; ascertaining a location of at
least one page break within the at least one segment; disposing a
plurality of predetermined slots on a page to form a two
dimensional grid; inserting text included in the at least one
segment into a first of the predetermined slots; determining
whether a current line of the text makes reference to an image;
ascertaining whether sufficient subsequent predetermined slots
exist in order to accommodate placement of the image on the page;
recalibrating each of the subsequent predetermined slots to
facilitate placement of the image on the page; placing the image on
the page based at least in part on the recalibration of the
subsequent predetermined slots; rendering a predetermined page
within the at least on segment; and displaying the predetermined
page.
2. The method of claim 1, further comprises receiving an electronic
document that includes at least text.
3. The method of claim 1, ascertaining a location of at least one
page break effectuated without rendering the at least one segment
on a display device.
4. The method of claim 1, the two dimensional grid comprises one or
more rows and one or more columns.
5. The method of claim 1, the predetermined slots adjustable based
at least in part of a font size selected in order to render the
predetermined page.
6. The method of claim 1, the predetermined slots measured by a
number of display pixels.
7. The method of claim 1, the ascertaining a location of the at
least one page break based at least in part on a display
capability.
8. The method of claim 1, further comprising inserting text
included in the at least one segment into a plurality of subsequent
predetermined slots.
9. The method of claim 1, further comprising determining whether a
footnote is associated with a current line of the text.
10. The method of claim 9, determining whether sufficient
subsequent predetermined slots exist in order to accommodate
placement of the footnote on the page.
11. The method of claim 1, placing the image on the page based at
least in part on a predetermined position, the predetermined
position includes at least one of: in-line, left justified in
relation to the predetermined page, right justified in relation to
the predetermined page, horizontally centered in the predetermined
page, and vertically centered in the predetermined page.
12. A machine implemented system that facilitates dynamically
adaptive pagination, comprising: means for storing an electronic
document comprising a plurality of segments; means for
disassembling the plurality of segments into an identifiable
segment; means for locating one or more page break within the
identifiable segment; means for generating fixed sized slots, the
fixed sized slots arranged on a page in a two dimensional pattern;
means for inserting text and one or more images that comprise the
electronic document into the fixed sized slots; means for
identifying the one or more images and recalibrating subsequent
fixed sized slots to accommodate insertion of the one or more
images; and means for displaying the page comprising the inserted
text and one or more images.
13. The system of claim 12, the means for locating identifies the
one or more page break without employing the means for
displaying.
14. The system of claim 12, the means for inserting accommodates
insertion of the one or more images based at least in part on a
predetermined position that includes one or more of: in-line and
horizontally and vertically centered in relation to the fixed sized
slots.
15. The system of claim 12, the means for identifying recalibrates
the subsequent fixed sized slots based on an identification that
one or more images comprise a current line.
16. The system of claim 12, the means for identifying recalibrates
the subsequent fixed sized slots based on a display capability of
the means for displaying.
17. A machine-readable medium including instructions for execution
on a machine to perform a dynamic adaptive pagination method
comprising: receiving a predetermined segment of a document in
machine memory; identifying one or more page break within the
predetermined segment; inserting text associated with the
predetermined segment into a plurality of slots arranged to
comprise a two dimensional grid; locating a footnote within the
predetermined segment; rearranging the plurality of slots to
selectively position the footnote; and displaying the plurality of
slots and the footnote on a display device.
18. The method of claim 17, identifying the one or more page break
effectuated without employing the display device.
19. The method of claim 17, selectively positioning the footnote
based at least upon whether sufficient subsequent slots within the
plurality of slots exist to accommodate the positioning.
20. The method of claim 17, further comprising identifying an image
within the predetermined segment and rearranging a plurality of
subsequent slots to selectively accommodate the image.
Description
RELATED APPLICATIONS
[0001] This application is a continuation of U.S. application Ser.
No. 09/410,414, filed Oct. 1, 1999, entitled "Dynamic Pagination of
Text and Resizing of Image to Fit a Document". This application is
related to U.S. Pat. No. 6,966,026 entitled "Balanced View
Generation for Electronic Documents". The entirety of each is
hereby incorporated by reference.
FIELD OF THE INVENTION
[0002] This invention relates generally to electronic documents
such as electronic books, and more particularly dynamic pagination
of such electronic documents.
BACKGROUND OF THE INVENTION
[0003] Documents, such as books, magazines, etc., are increasingly
being distributed in an electronic manner. For example, books
distributed electronically are commonly referred to as electronic
books. The terminology electronic document is used herein to refer
to any type of document that is stored and/or distributed in an
electronic manner. Such so-called electronic documents can be
viewed on general-purpose desktop and laptop computers, as well as
other devices, such as personal digital assistants (PDA's), palmtop
computers, hand-held computers, set-top boxes for television sets,
etc. Furthermore, one type of device on which electronic documents
can be viewed is referred to as an electronic book device, which is
a specialized device designed for the reading of electronic
documents.
[0004] Especially for electronic book devices, electronic documents
typically are paginated statically, specifically for a particular
device. This means, however, that the electronic documents are not
readily adaptable to other devices, or future devices. That is,
static pagination ignores the very large installed base of desktop
and laptop computers.
[0005] Although liquid crystal displays (LCD's) are improving in
quality and decreasing in price, they are still the most expensive
component in a laptop computer currently, so a specialized reader
device based on these components will remain expensive, at least
for a while. Furthermore, the best LCD available currently is at
best only merely adequate to display a page originally formatted
for paper distribution. Thus, a distribution format that is
optimized for a fixed-size display is disadvantageous, since
display technologies are evolving rapidly.
[0006] For these and other reasons, there is a need for the present
invention.
SUMMARY OF THE INVENTION
[0007] The invention relates to dynamic pagination for electronic
documents. In one embodiment, a computer-implemented method
performs four parts. First, the method processes a document made up
of at least text, as a number of segments. For example, the method
can assemble the document from the segments, or divide a document
into segments. Second, the method determines a number of page
breaks within a predetermined segment. This segment, for example,
may be entered into the memory of a viewing device, such as an
electronic book device. Third, the method renders a predetermined
page within the predetermined segment, and finally displays the
predetermined page. For example, the page can be displayed on a
display device such as a flat-panel display of an electronic book
device.
[0008] Embodiments of the invention provide for advantages not
found in the prior art. For example, embodiments allow for quick
pagination of electronic documents regardless of the host device on
which they are being viewed. By having the document made up of a
number of segments, which may, for example, correspond to chapters
of a book, only one segment at a time has to be paginated
on-the-fly. Furthermore, only the currently desired page of the
segment needs to be rendered for display. The invention also
provides for flexibility in different types of host devices on
which the electronic documents may be viewed. By paginating pages
dynamically, electronic books under embodiments of the invention
can look quite good on devices ranging from palm-sized personal
computers (PC's) to twenty-one inch monitors.
[0009] The invention includes electronic devices,
computer-implemented methods, machine-readable media, computerized
systems, and computers of varying scopes. Other aspects,
embodiments and advantages of the invention, beyond those described
here, will become apparent by reading the detailed description and
with reference to the drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
[0010] FIG. 1(a) is a diagram illustrating the manner by which a
document is made up of 20 segments, how one segment has its page
breaks determined, and how one page is rendered and displayed,
according to an embodiment of the invention;
[0011] FIG. 1(b) is a flowchart according to one embodiment of the
invention;
[0012] FIG. 2(a) is a diagram showing the manner by which a page of
an electronic book is dynamically paginated according to an
embodiment of the invention;
[0013] FIG. 2(b) is a diagram showing in a graphically conceptual
manner an electronic book text that has been dynamically paginated,
according to an embodiment of the invention;
[0014] FIG. 2(c) is a diagram showing the manner by which a page of
an electronic book is dynamically paginated, in the special case of
a footnote present on the page, according to an embodiment of the
invention;
[0015] FIG. 2(d) is a diagram showing the manner by which a page of
an electronic book is dynamically paginated, in the special case of
an image present on the page, according to an embodiment of the
invention; 10
[0016] FIG. 3(a) is a diagram of a paginatable segment of text
(including footnotes and reference to graphics), according to an
embodiment of the invention;
[0017] FIG. 3(b) is a flowchart of a method for dynamically
paginating text, according to an embodiment of the invention;
[0018] 15 FIG. 3(c) is a flowchart of another method for
dynamically paginating text, according to an embodiment of the
invention;
[0019] FIG. 3(d) is a flowchart of a method for dynamically
paginating text in the special case of encountering an image or a
footnote, according to an embodiment of the invention; and,
[0020] FIG. 4 is a diagram of a representative electronic device,
according to an embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTION
Introduction
[0021] In the following detailed description of exemplary
embodiments of the invention, reference is made to the accompanying
drawings which form a part hereof, and in which is shown by way of
illustration specific exemplary embodiments in which the invention
may be practiced. These embodiments are described in sufficient
detail to enable those skilled in the art to practice the
invention, and it is to be understood that other embodiments may be
utilized and that logical, mechanical, electrical and other changes
may be made without departing from the spirit or scope of the
present invention. The following detailed description is,
therefore, not to be taken in a limiting sense, and the scope of
the present invention is defined only by the appended claims.
[0022] Some portions of the detailed descriptions which follow are
presented in terms of algorithms and symbolic representations of
operations on data bits within a computer memory. These algorithmic
descriptions and representations are the means used by those
skilled in the data processing arts to most effectively convey the
substance of their work to others skilled in the art. An algorithm
is here, and generally, conceived to be a self-consistent sequence
of steps leading to a desired result. The steps are those requiring
physical manipulations of physical quantities. Usually, though not
necessarily, these quantities take the form of electrical or
magnetic signals capable of being stored, transferred, combined,
compared, and otherwise manipulated.
[0023] It has proven convenient at times, principally for reasons
of common usage, to refer to these signals as bits, values,
elements, symbols, characters, terms, numbers, or the like. It
should be borne in mind, however, that all of these and similar
terms are to be associated with the appropriate physical quantities
and are merely convenient labels applied to these quantities.
Unless specifically stated otherwise as apparent from the following
discussions, it is appreciated that throughout the present
invention, discussions utilizing terms such as processing or
computing or calculating or determining or displaying or the like,
refer to the action and processes of a computer system, or similar
electronic computing device, that manipulates and transforms data
represented as physical (electronic) quantities within the computer
system's registers and memories into other data similarly
represented as physical quantities within the computer system
memories or registers or other such information storage,
transmission or display devices.
Overview
[0024] In this section, an overview of embodiments of the invention
is provided. The overview is meant to provide a general description
of at least some embodiments of the invention. In subsequent
sections, more detailed embodiments of the invention are
presented.
[0025] Referring first to FIG. 1(a), a diagram illustrating the
general manner according to which embodiments of the invention
operate is shown. A document 100 has a number of segments 102a,
102b, . . . , 102n. The document 100 is an electronic document,
which is an electronic version of a document that may or may not
also be available as a hard copy (e.g., paper) version. For
example, such documents include books, magazines, pamphlets, web
pages, etc. The invention is not particularly limited to a given
type of electronic document. The document 100 includes at least
text, and may also include other aspects, such as images,
footnotes, etc., as well. Each segment 102a, 102b, . . . , 102n
desirably corresponds to a meaningful partition of the document
100. For example, where the document 100 is an electronic book,
each segment can correspond to a chapter within the book. As a
further example, where the document 100 is an electronic magazine,
each segment can correspond to an article within the magazine. The
utility of having the document 100 partitioned into different
segments is explained later in this section of the detailed
description.
[0026] A predetermined segment 104 of the document 100 is paginated
into pages 106a, 106b, . . . , 106n. The segment 104 may be, for
example, the segment containing a page desired to be viewed by a
user. When an electronic document is first opened, the segment 104
may be the first segment of the document, such that it contains the
first page of the document. The invention is not limited to the
manner by which the predetermined segment 104 is chosen.
[0027] The pagination of the predetermined segment 104 of the
document 100 into pages 106a, 106b, . . . , 106n is referred to as
dynamic pagination in that the document 100 desirably does not
itself having internal page breaks denoted, which may correspond to
a static definition of a page for a particular display device.
Thus, the document 100 is independent of the display device on
which it will be viewed, so that it can be dynamically paginated
for any type of display device on which it happens to currently be
viewed. In one embodiment, dynamic pagination is accomplished as
described in a succeeding section of the detailed description.
[0028] In paginating the segment 104 into different pages, it is
noted that embodiments of the invention do not lay out, or render,
each individual page within the segment, but rather only determine
where the page breaks within the segment 104 lie. Once a
predetermined page 108 is selected from the segment 104, it is at
that time that the page is rendered, and displayed on a display
device such as a flat-panel display. The invention is also not
limited to the manner by which the predetermined page 108 is
chosen.
[0029] Furthermore, in one embodiment, the document 100 itself is
stored on a storage device, which is desirably a non-volatile
storage device such as a hard disk drive, flash memory device, PC
card hard drive, read-only memory (ROM), etc. In this embodiment,
only the predetermined segment 104 is entered into memory, which is
typically volatile memory such as types of random-access memory
(RAM). Then, only the predetermined page 108 is rendered, or laid
out, also in the memory, for display on a display device such as a
flat-panel display, a cathode-ray tube, etc.
[0030] By partitioning the document 100 into different segments
102a, 102b, . . . , 10211, only paginating a predetermined segment
104 into pages 106a, 106b, . . . , 106n, and only rendering a
predetermined page 108 to be displayed on a display device,
embodiments of the invention provide for advantages not found in
the prior art. For example, where an embodiment of the invention is
implemented in conjunction with an electronic book device, such a
device is likely to have a limited amount of volatile memory, and a
relatively slow processor. By only entering one predetermined
segment 104 into memory at a given time (as opposed to the entire
document 100, for example), memory is conserved. Furthermore, by
only paginating one predetermined segment 104 into pages 106a,
106b, . . . , 10611 (as opposed to paginating the entire document
100, for example), and only rendering one predetermined page 108 of
the segment 104 at one time (as opposed to rendering all the pages
106a, 106b, . . . , 106n of the segment 104, for example),
processing time is reduced.
[0031] A method corresponding to the above overview of embodiments
of the invention is now described. Referring to FIG. 1(b), a
flowchart of such a method, according to one embodiment of the
invention, is shown. In 150, an electronic document, which is made
up of at least text, is processed as a number of segments. In one
embodiment, this can mean assembling the document from a number of
already existing segments, each of which may, for example,
correspond to one or more physical files of data. In another
embodiment, this can mean dividing an already existing document
into a number of segments, where the existing document itself
already exists as one physical file of data. The invention is not
limited to either approach or any combination thereof, however.
[0032] In 152, a number of page breaks within a predetermined
segment of the document is determined. Desirably, this does not
involve rendering each individual page of the segment, but rather
only determining the page breaks within the segment. In one
embodiment, 152 can involve first entering the predetermined
segment of the document into memory, such as volatile memory, as
has been described, such that the page breaks within the
predetermined segment are also stored in the memory. In 154, a
predetermined page within the predetermined segment is rendered,
then displayed in 156, for example, on a display device.
[0033] It is noted that this and other methods described in the
detailed description are desirably computer-implemented methods.
Such computer-implemented methods are desirably realized at least
in part as one or more programs running on a computer--that is, as
a program made up of instructions and executed from a
computer-readable medium such as a memory by a processor of a
computer. The programs are desirably storable on a machine-readable
medium such as a floppy disk or a CD-ROM, for distribution and
installation and execution on another computer.
Specific Embodiment for Dynamic Pagination
[0034] In this section of the detailed description, a specific
embodiment of the invention for performing the dynamic pagination
as described in the preceding section of the detailed description
is presented. It is noted that the invention is not limited to this
specific embodiment, however. As described herein, the specific
embodiment pertains to electronic documents that are electronic
books. However, embodiments of the invention are not so limited to
documents that are books, as can be appreciated by those of
ordinary skill within the art.
[0035] Referring first to FIG. 2(a), a diagram of how a page of an
electronic book is dynamically paginated according to an embodiment
of the invention is shown. The page 200 includes a number of slots,
such as the slot 202, into which text is "poured" (that is,
inserted) to determine how much text will fit onto the page 200.
The text is inserted within each slot from a left-to-right (or
right-to-left as, for example, with Hebrew) manner in one
embodiment, as indicated by the arrow 204. The slots are filled
column by column, top to bottom; thus, in the two-column set-up of
FIG. 2(a), first the left hand column is filled from top to bottom,
as indicated by the arrow 206, and then the right hand column is
filled from top to bottom, as indicated by the arrow 208.
[0036] Thus, to determine how much text fits onto a given page, an
embodiment of the invention determines how much text fits into each
slot of the page, and proceeds from slot to slot and column to
column as described. To determine how much text fits into each
slot, the determination may be performed as to complete words
(viz., how many complete words fit into the slot, where "word" can
denote a symbol e.g. in non-western-languages), or may be performed
utilizing hyphenation (viz., hyphenating a last word to make a
portion of the word fit into the slot). The invention is not so
limited.
[0037] Embodiments of the invention provide for dynamic pagination
in that the structure of a given page, such as the page 200 of FIG.
2(a) is specific to a given device. For example, a dedicated
electronic book device may have two columns of slots, with a
predetermined number of slots in each column, each of a
predetermined width, while a palm-PC device may have only one
column of slots, with a lesser number of slots, while a desktop
computer with a large display monitor may have three or more
columns of slots, with a larger numbers of slots in each column
that are of greater width. In this way, embodiments of the
invention provide for adapting an electronic book to whatever
display device is available. The number of columns on a page, the
number of slots on a page, the width and height of the slots, etc.,
are all predetermined as to a specific display device (or specified
by the author of the book, or adjusted by the user), while the
mechanism provided by an embodiment of the invention to dynamically
paginate an electronic book as to a given page for a given display
device remains the same.
[0038] In one embodiment of the invention, the width and height of
a slot is fixed and measured by a number of pixels. The font size
of the font utilized in rendering the text in each slot is also
fixed. The invention is not necessarily so limited, however.
[0039] It is noted that dynamic pagination as to a page such as the
page of FIG. 2(a) refers in at least some embodiments of the
invention to determining only the page breaks within the text of an
electronic book a priori, and not to, for example, actually laying
out each page within the text a priori. That is, when an electronic
book is first input, dynamic pagination just determines where each
page break is--for example, within an internal representation of
the electronic book--and does not determine how each page will be
actually displayed. This is advantageous, because page layout
generally takes longer than just determining page breaks, so that
only accomplishing the latter means that the electronic book will
be more quickly ready to be viewed by a user once it has been
input. This is shown more specifically in reference to FIG. 2(b).
The bar 210 represents a segment of an electronic book text.
Dynamic pagination according to an embodiment of the invention is
accomplished to determine the page breaks within the electronic
book text for a given defined page of a display device. Thus,
dynamic pagination may determine--that is, denote--that page breaks
as represented by perpendicular lines 212, 214 and 216 are required
in order for a given defined page of a display device. It is noted
that the diagram of FIG. 2(b) is only meant for illustrative
purposes, and does not convey a limitation of embodiments of the
invention as to how electronic book text is structured from a data
structure standpoint.
[0040] Two special cases also deserve description in this overview
section of the detailed description. While the diagram of FIG. 2(a)
illustrates the manner by which standard text is poured into slots
of a page to yield dynamic pagination, electronic books may also
include footnotes and images. With respect to footnotes, the user
may have the option of viewing the footnotes as true footnotes
(shown at the bottom of the page), or as endnotes, where they are
displayed all at once at the end of a document, or in "hyper
space", i.e outside the text flow, e.g. as a separate page (for
each footnote) that is brought into view upon the user's demand
(e.g. by activating a hypertext link). In the latter case, the
endnotes are saved, and can be displayed as normal text at the end
of the document, and dynamically paginated as has been described in
conjunction with FIG. 2(a). In the former case, however, the
description of dynamic pagination as has been described in
conjunction with FIG. 2(a) is modified somewhat.
[0041] This is shown by reference to FIG. 2(c). Within the page
218, text is poured in successive slots 220, 222, and 224, until a
footnote is reached in the text as shown in the slot 224. In this
case, the dynamic pagination stops and attempts to fit the footnote
in the current column. It does this by decreasing the size of the
current c olm, as represented by the arrow 226, to create room for
the footnote text within the column, as represented by the box 228.
For example, the box 228 may take up the space previously allocated
for one or more slots, such that the column is decreased by as many
(empty) slots as needed 15 to accommodate the footnote.
[0042] There are two variations in accommodating footnotes not
shown by reference to FIG. 2(c). First, the footnote within the
text may be reached when the dynamic pagination process is already
near the end of a first (or current) column of the page, such that
one or more of the number of slots that need to be allocated for
the footnote in the current column have already been used to pour
text into. In such an instance, the dynamic pagination process does
not reduce the size of the current column. Rather, the process tags
the footnote as postponed, such that in a next column on the same
page, room is made for the footnote within the column before any
text is poured into slots of the column. As a second variation, if
the footnote cannot be accommodated on the page where it is first
referenced, then it is tagged as postponed, such that in the first
column of the next page, room is made for the footnote within the
first column of the next page before any text is poured into the
slots of the first column. (in one embodiment, a footnote covers at
the most a certain predefined fraction of the column's height, e.g.
3/4 of the column)
[0043] The special case of images is shown with reference to FIG.
2(d). Text is poured into slots of the page 230, such as the slots
232,234 and 236, until a graphic reference (e.g., a file name of a
graphic) is encountered within the text file, as shown in the slot
236. As in the case of footnotes, it is determined if the graphic
can fit on the page given the text already poured into slots of the
page; if so, then the graphic is so fit, otherwise it is postponed
to a next column of the current page or a next page. A graphic can
also include positioning information as to where on the page it
should desirably be displayed: in-line with the text, left
justified in the current column, right justified in the current
column, center justified in the current column, inserted at the top
of a page, vertically centered in a page, inserted at the bottom of
a page, left justified in a page, right justified in a page, and/or
horizontally centered in a page, the invention is not so limited,
however.
[0044] In the case of FIG. 2(d), the graphic 238 is to be
positioned horizontally and vertically centered on the page 230.
Thus, room is made for the graphic 238 by decreasing the width of
the slots on either side of the graphic, as is shown in FIG. 2(d).
Once room is made for the graphic 238, then the pouring of text
into slots of the page 230 continues. Thus, after the slot 236 is
filled, text is poured in slots 242 and 244, et seq.
[0045] As has been noted, if room cannot be made for a graphic,
then it is postponed in a manner similar to the way footnotes are
postponed, either to a next column of the current page, or to a
next page altogether. For example, as shown in FIG. 2(d), room can
be made for the graphic 238 because it was encountered in the text
while the first column of slots (as pointed to by the arrow 246)
was still being filled. However, if the graphic was encountered in
the text after the first column of slots was filled, and while the
second column of slots (as pointed to by the arrow 248) was being
filled, then the graphic would have to be postponed to the next
page--the graphic 238 as shown in FIG. 2(d) spans horizontally both
columns of the page 230, and thus it could not be accommodated on
the current page, because empty slots could not be moved or
adjusted for the graphic.
[0046] In other words, accommodation for footnotes and images is
made on a given page only when such accommodation does not involve
changing any slot into which text has already been poured. In the
case just described in the previous paragraph, this means that
placement of the graphic has to be postponed to a next page,
because the only way the graphic can be accommodated on the current
page is to change the number of slots in the first column--but
these slots have already had text poured there into, so they cannot
be adjusted. This general rule is applicable in at least some
embodiments of the invention--that accommodation of footnotes and
images is allowed only when empty slots need adjustment or
modification, and not slots into which text has already been
poured--and provides for quicker dynamic pagination, in that such
pagination is a one-pass process, and not a multi-pass process.
[0047] A computer-implemented method for dynamic pagination,
consistent with the preceding description within this section of
the detailed description follows. What is meant by a paginatable
segment of electronic book text (where the text may include
footnotes, and refer to graphics) is first described by reference
to FIG. 3(a). A paginatable segment of text is a part of an
electronic book, such that the electronic book may be comprised of
one or more such segments of text. When a given segment of text is
input, dynamic pagination is performed as to the segment. Thus, any
page may within the segment may subsequently be quickly referenced,
in that the page breaks within the segment have been determined, or
denoted. When a new segment is referenced, then it, too, is
initially dynamically paginated. Thus, breaking up an electronic
book into a plurality of paginatable segments provides for quicker
dynamic pagination, in that the entire electronic book does not
have to be paginated dynamically a priori, but only the current
segment of interest.
[0048] However, a segment does not necessarily refer to a specific
file. Rather, a segment can refer to a series of files, as is shown
in FIG. 3(a). In FIG. 3(a), each of files 300a, 300b, 300c, . . . ,
30011 is linked as a series of files defining the segment 302. They
are linked as shown in FIG. 3(a) by arrows such as the arrow 304
linking file 300a to file 300b. Anchors within a file links the
file to a next file. In one embodiment, the files are in HyperText
Markup Language (HTML) format, known within the art, such that a
specially defined segment tag within successive HTML files defines
a new segment. It is noted that the invention is not necessarily
limited to a segment referring to a number of different files, and
that other embodiments of the invention can be utilized such that a
segment refers to a single file. In one embodiment, a segment
contains exactly one file.
[0049] Referring next to FIG. 3(b), a flowchart of a method for
dynamically paginating a paginatable segment of text is shown. The
method assumes a current position in the text defined by the
paginatable segment--for example, starling with a first word within
the text. The method also assumes that each of a number of pages
(that is, a number of pages as will be necessary to hold the
segment of text) has a predetermined number of slots, as described
in the previous section of the detailed description, such that
there is a current page--for example, starting with a first
page.
[0050] Thus, in 306, the method, starting at a current position in
the text defined by the paginatable segment, determines a maximum
number of words that fit into a current slot of a series of
predetermined slots of the current page, organized into one or more
columns on the page. Once the maximum number of words that fit into
the current slot of the current page has been determined, in 308,
the current position in the text is advanced to the next word after
the last word that has been determined to fit into the current slot
of the current page. It is noted that if there is no more text left
in the paginatable segment, then the method ends at 308.
[0051] Otherwise, in 310, it is determined whether there are any
more slots within the current page. If there are, then in 312, the
current slot is advanced to the next slot, in a predetermined
manner--for example, from top to bottom within a column, where the
columns of slots are proceeded to from left to right, as has been
described. Then the method continues in 306 again, determining the
maximum number of words that fit into the new current slot,
etc.
[0052] If there are no more slots left in the current page, then
the method instead proceeds from 310 to 314, where a page break is
marked. In one embodiment, the page break is marked, or denoted, in
an internal representation of the plurality of text defined by the
paginatable segment. For example, the internal representation may
include reference to each file within the paginatable segment, such
that a page break is marked by indicating the paginatable segment,
the file within the paginatable segment, and the position within
that file. The invention is not so limited, however. LU 316, the
current page is advanced to a next page (the first slot thereof),
and then the method continues in 306 again, as has been
explained.
[0053] The specific embodiment of the invention of FIG. 3(b) can be
generalized as shown in the method of FIG. 3(c). Referring now to
FIG. 3(c), in 318, a plurality of text is input--for example, a
series of files including the text that defines a paginatable
segment. In 320, the text is poured into a series of slots of a
page, which can be organized into one or more columns on the page,
until all the slots of the page have been processed (that is, until
all the slots have had text poured there into). In 322, a page
break is marked in an internal representation of the plurality of
text, and this process of 320 and 322 is repeated until all the
text has been poured into slots (and thus the method is
finished).
[0054] As described in the previous section of the detailed
description, special cases are made for dynamic pagination when
graphics or footnotes are encountered (the latter, in the case
where the footnotes are desired to be displayed as footnotes on a
page, as opposed to endnotes at the end of the text). These special
cases are now described in conjunction with specific embodiments of
the invention. In these specific embodiments, the plurality of text
is defined as a series of lines, such that each line within the
plurality of text includes text to be poured, or a footnote, or
reference to a graphic. However, as used herein, the term line does
not necessarily have to relate to a specific line within the text.
Rather, the temi line can also relate to a specific position within
the text, for example, if the text is so organized. For example, in
one embodiment, each line corresponds to a slot, as has been
described previously in the detailed description. The invention is
not so limited.
[0055] In 324, it is determined that a current line (where the term
line can also refer to a current position or other manner by which
a give place within the text is indicated) refers to an image or a
footnote. In 326, it is determined whether the image or the
footnote has sufficient room on the page to fit--given the already
filled slots on the page, as has been described in the previous
section of the detailed description (i.e., such that the dynamic
pagination process is a one-pass--and not a two-pass--process).
With respect to images specifically, the scale of the image may be
resized as necessary if so desired. If there is sufficient room on
the page, then in 328, the page is adjusted as necessary. For
example, subsequent slots on the page may be decreased in size, or
the number of slots on the page may be decreased in number, as has
been described in the overview of embodiments of the invention
previously in the detailed description.
[0056] Otherwise, in 330, accommodation of the footnote or graphic
on the page is postponed to the next page (or, to a next column of
the current page, in one embodiment of the invention), such that as
soon as that next page is being processed, accommodation of the
footnote or graphic is made before any text is poured into the
slots of the page.
Representative Device for Viewing Electronic Documents
[0057] As described, the methods of the previous sections of the
detailed description can be implemented on any type of computerized
device, such as a general-purpose laptop or desktop computer, a
personal digital assistant (PDA), a palm-top computer, a hand-held
computer, a specialized electronic book device, etc. However, one
such representative device is described in this section of the
detailed description. Those of ordinary skill within the art can
appreciate that the invention is not limited to this representative
device for viewing electronic documents.
[0058] Referring to FIG. 4, a diagram of such a representative
device, in accordance with an embodiment of the invention, is
shown. The electronic device includes a processor, or
central-processing unit (CPU), 400, a storage device 402, a memory
device 404, and a display device 406. The processor 400 is the
processor that executes computer programs to perform methods such
as those described in the preceding sections of the detailed
description. The storage device 402 is a non-volatile storage
device, such as a hard disk drive, flash memory device, PC card
hard drive, etc., on which an electronic document having a number
of segments is stored. The memory device 404 is a volatile device,
such as a dynamic random-access memory (DRAM), a synchronous
dynamic-random access memory (SDRAM), etc., into which one of the
segments is stored temporarily, into which the denoted page breaks
of the segment are stored temporarily, and into which one page of
the segment is stored as rendered prior to display. The display
device 406 can be a flat-panel display, such as a liquid-crystal
display (LCD), a plasma display, etc., or a cathode-ray tube (CRT),
such as commonly found with desktop computers as monitors. The
device 406 displays a rendered, or laid-out, page.
[0059] Thus, the processor 400 executes a computer program to
determine a number of page breaks within the one segment of the
document stored in the memory device 404, after entering the
segment into the device 404 from the storage device 402. The page
breaks are also stored in the memory device 404 in one embodiment.
The processor 400 also executes a second computer program to render
one of the pages of the segment stored in the memory device 404,
and display that page on the display device 406. Each of these
programs may be separate, or part of a larger computer program, in
which latter case the individual programs are typically referred to
as software objects, or software components, as known in the
art.
Conclusion
[0060] Although specific embodiments have been illustrated and
described herein, it will be appreciated by those of ordinary skill
in the art that any arrangement which is calculated to achieve the
same purpose may be substituted for the specific embodiments shown.
This application is intended to cover any adaptations or variations
of the present invention. For example, in some embodiments of the
invention, the embodiments described herein can be utilized in
conjunction with the subject matter described in the related
applications, which have been described at the beginning of this
application, and which have been incorporated by reference. The
invention is not so limited, however. Therefore, it is manifestly
intended that this invention be limited only by the following
claims and equivalents thereof.
* * * * *