Functional Requirements for Pagination
Document authors should be able to control:
- page margins
- page orientation (if device allows orientation changes)
- page display
- number of pages to display in viewport—one page (one-up), two pages (two-up) etc.
- spatial arrangement of pages—horizontal, vertical, other
- the entire viewport (i.e. prevent UA chrome from interfering with content)
- ability to simulate bleeds (art extending beyond edge of viewport)
- running headers and footers
- page numbers or other progress indicators
- master pages or named pages
- support for sequencing of master pages that content flows through—often the first page or two of a document may use a different page style
In many of the above cases (especially things like margins and orientation), end users should be able to override the author and user-agent stylesheets
Content Rendering in Pages
Latinreq covers various typographical requirements for laying out content in pages.
- Control of widows
- Alignment of facing pages
- Displaying no fewer than n lines on the last page of a section (n is often around 5)
- Multiple columns in pages
- Mechanism for controlling line breaks to meet typographic requirements
- details TK
- Mechanism for copyfitting
- details TK
Changing Page Content
- Use alternate content for running heads etc. (if chapter title is too long, editors sometimes specify a shorter version)
- Rewrite link text to be more user friendly ("next page" instead of "page 391" if appropriate)
- User can go to next page, previous page, or random [suggest "specific" not "random"] page via a user interface provided by the user agent
- Page transitions work not only within HTML files, but across separate files (for example, a page turn gesture should move between the last page of ch01.html and the first page of ch02.html)
Interacting with Pages
Page Representation in the DOM (or box tree?)
- Provide a mechanism for accessing pages and their contents
- Provide a mechanism for changing properties of a page (eg margins, background, etc)
- Provide a mechanism for accessing lines (may be needed to address many other requirements)
Page from Element
- An API for determining a page or pages associated with a particular element
- An API for determining which page a given offset into a text node is on.
- A mechanism to identify a specific page in an ebook.
- Must be storable.
- Must be sortable.
- Must adjust to reflowable content (eg get a reasonable page when the size of the viewport changes).
- Define a list of events a User Agent should fire related to pages.