---
title: BookReader
created: 2016-11-07 16:06
updated: 2016-11-07 16:10
revision: 2
author: Auriea
summary: "==Serving Images== In the case of the Standalone Demo, operation is fairly simple. Images are numbered sequentially and stored in a directory . . ."
---
## Serving Images
In the case of the Standalone Demo, operation is fairly simple. Images are numbered sequentially and stored in a directory called "StandAloneImages". The images are all the same size, and two functions in BookReaderJSSimple.js, getPageWidth() and getPageHeight(), return the page size. Scaling is done in the web browser.
## Extending bookreader functionality
To make is it easier to work with other sources, the bookreader can expect a book interface from the client with the following methods.
getPageCount()
getPage(index)
getPageWidth(index)
getPageHeight(index)
The book reader can have optional functionality which is enabled only when the book implementation has a specific method defined.
For example, bookmarks functionality can be enabled only when the book interface has getBookmarks method defined.
getBookmarks(index)
Typical usage: