EpubCharactersContentPositionTimelineMappingOptions

data class EpubCharactersContentPositionTimelineMappingOptions(val audioElementWeight: Int = 50, val iframeElementWeight: Int = 50, val imageElementWeight: Int = 50, val videoElementWeight: Int = 50, val whitespaceBehaviour: EpubContentPositionTimelineWhitespaceBehavior = EpubContentPositionTimelineWhitespaceBehavior.COLLAPSE)

Options used when creating EPUB ContentPositionTimeline objects with CHARACTERS as unit of measurement.

In publications with lots of media, it might be desirable to count media elements (or other replaced elements) as x number of characters to get a better estimation of the "length" of the rendered publication. By default each replaced element is counted as 50 characters.

Many HTML documents may contain lots of whitespace that is not visible in the rendered publication. By default, multiple adjacent whitespaces are collapsed and counted as a single whitespace.

Constructors

fun EpubCharactersContentPositionTimelineMappingOptions(audioElementWeight: Int = 50, iframeElementWeight: Int = 50, imageElementWeight: Int = 50, videoElementWeight: Int = 50, whitespaceBehaviour: EpubContentPositionTimelineWhitespaceBehavior = EpubContentPositionTimelineWhitespaceBehavior.COLLAPSE)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

The number of characters each audio element should be counted as.

Link copied to clipboard

The number of characters each iframe element should be counted as.

Link copied to clipboard

The number of characters each image element should be counted as.

Link copied to clipboard

The number of characters each video element should be counted as.

Link copied to clipboard

Defines how whitespace characters should be handled.