Sparse documents are a special case of compound documents. In this case, every content element represents a single page, and each page/content element can be requested and returned in separate chunks as needed. The ideal use case for sparse documents is when

  • the document is already split up into single-page files and
  • retrieving each page is relatively time-expensive, making retrieving the whole document prohibitive.

An example use case could be if a physical document was scanned and converted to a series of large image files, one for each page.

Loading and displaying Sparse Documents

To pass a directory with single pages of Sparse document, the value of a documentId should start with SparseDocument. The only parameter is a directory name relative to sample-documents directory of the viewer. The following example shows how to load and display Sparse document with pages that are located in virtualviewer/sample-documents/sparseDoc/ directory:

http://localhost:8080/virtualviewer/index.html?documentId=SparseDocument:sparseDoc

Printing Sparse Documents

To print a sparse document, select the Print button.