Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IEpubCharactersContentPositionTimelineMappingOptions

    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.

    interface IEpubCharactersContentPositionTimelineMappingOptions {
        audioElementWeight?: number;
        iframeElementWeight?: number;
        imageElementWeight?: number;
        videoElementWeight?: number;
        whitespaceBehaviour?: EpubContentPositionTimelineWhitespaceBehavior;
    }

    Properties

    audioElementWeight?: number

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

    50
    
    iframeElementWeight?: number

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

    50
    
    imageElementWeight?: number

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

    50
    
    videoElementWeight?: number

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

    50
    

    Defines how whitespace characters should be handled.

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

    COLLAPSE