EpubPositionsService

class EpubPositionsService(readingOrder: List<Link>, presentation: Presentation, container: Container<Resource>, reflowableStrategy: EpubPositionsService.ReflowableStrategy) : PositionsService

Positions Service for an EPUB from its readingOrder and container.

The presentation is used to apply different calculation strategy if the resource has a reflowable or fixed layout.

https://github.com/readium/architecture/blob/master/models/locators/best-practices/format.md#epub https://github.com/readium/architecture/issues/101

Constructors

Link copied to clipboard
constructor(readingOrder: List<Link>, presentation: Presentation, container: Container<Resource>, reflowableStrategy: EpubPositionsService.ReflowableStrategy)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class ReflowableStrategy

Strategy used to calculate the number of positions in a reflowable resource.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend fun positions(): List<Locator>
Link copied to clipboard
open suspend override fun positionsByReadingOrder(): List<List<Locator>>