Selecting text in a DjVu page

This experiment was inspired by the Google Docs PDF viewer (see the Stack Overflow question How does the Google Docs PDF viewer work?). It takes a DjVu page image and the XML with the coordinates and OCR text and displays the page (see my blog post for how this is done). The coordinates of each block of text are stored in a R-tree using Jon-Carlos Rivera's R-Tree Library for Javascript, which makes it easy to quickly find what blocks have been selected. The text selected is displayed in a HTML DIV, and also in a hidden TEXTAREA box, which means you can copy it to the click board.

This is all very experimental, and so far only works in Safari and Chrome.

On iPad click here to select text