Destroys this instance, all pages currently loading or loaded will be unloaded/destroyed. Any async load* call that has not yet completed will be canceled and the returned Promise rejected.
Fetch the estimated clientHeight for each reader document.
Fetch the exact or estimated number of pages for each reader document.
If true, use an estimation algorithm to determine the approxiamte number of pages per document. The algorithm is specific to underlying format adapter. If false, fetch exact number of pages per document. This is a very expensive operation as reflowable documents need to be completely rendered.
Callback used for notifying about the progress of the operation.
If this instance has been destroyed.
Returns true if the specified Page is the first Page in the stream.
Returns true if the specified Page is the last Page in the stream.
Returns true if the specified Page is the last Page of its parent reader document.
Check if anything has been loaded from the specified readerDocument.
Loads the first Page in the stream.
A Promise resolved with the Page instance.
Loads the next Page relative to another Page. If referencePage is the last Page in the stream, the returned Promise will be rejected.
The reference Page to load the next page from.
A Promise resolved with the Page instance.
Loads a Page using a ContentLocation. If the readerDocument specified in the ContentLocation is not part of this stream, the returned Promise will be rejected.
A Promise resolved with the Page instance.
Loads a Page by page index from the specified reader document.
The reader document to load from.
The page index starting from 0. This value will be capped if specifying a pageIndex out of range.
A Promise resolved with the Page instance.
Loads the previous Page relative to another Page. If referencePage is the first Page in the stream, the returned Promise will be rejected.
A Promise resolved with the Page instance.
Unloads a previously loaded page. If this causes the reference count for that Page to reach 0, the page will be destroyed.
The page to unload.
Generated using TypeDoc
Intended for internal use between the ReaderView and Renderers.
Provides a linear stream of IRenderableDocumentPage ("Page") objects from a list of IReaderDocuments. IRenderableDocumentPageStream is typically used by IRenderer implementations to load Pages specialized for that renderer.
IRenderableDocumentPageStream instances delivers the right "kind" of Page depending on how the content is to be presented given
IRenderer.getSpreadSupport()
andIRenderer.getSupportedFlowModes()
The stream is traversable in both directions. Page objects can also be randomly accessed and loaded using ContentLocations.
Reference counting is used to detect when pages should be destroyed. For example, if you call loadFirstPage() twice, you will receive the SAME instance twice. To unload that page, you need to call unloadPage() twice.