PublicationStyleOptions

data class PublicationStyleOptions(val defaultFontFamily: PublicationStyleOptionsDefaultFontFamily = PublicationStyleOptionsDefaultFontFamily.SERIF, val disableCssAnimations: Boolean = false, val fontSet: PublicationStyleFontSet? = null, val fontSizeScaleFactor: Double = 1.0, val letterSpacing: Length? = null, val lineHeightScaleFactor: Double = 1.0, val pageMargins: RectMargins? = null, val palette: PublicationStylePalette? = null, val hyphens: Hyphens? = null, val removePublicationDefinedHorizontalPageMargins: Boolean = false, val textAlignment: PublicationStyleTextAlignmentOptions? = null, val typographyResetOptions: PublicationStyleTypographyResetOptions = PublicationStyleTypographyResetOptions(), val wordSpacing: Length? = null)

Defines styling options for customizing the appearance of the rendered publication.

Note that support for these options depends on the publication format. By default, they do not apply to fixed-layout formats (such as PDF and fixed-layout EPUB), with the exception of defaultFontFamily (see property documentation for details).

Some of these options can be enabled for fixed-layout EPUBs by configuring IEpubReaderPublicationOptions.fixedLayoutStyleOptions.

Constructors

Link copied to clipboard
constructor(defaultFontFamily: PublicationStyleOptionsDefaultFontFamily = PublicationStyleOptionsDefaultFontFamily.SERIF, disableCssAnimations: Boolean = false, fontSet: PublicationStyleFontSet? = null, fontSizeScaleFactor: Double = 1.0, letterSpacing: Length? = null, lineHeightScaleFactor: Double = 1.0, pageMargins: RectMargins? = null, palette: PublicationStylePalette? = null, hyphens: Hyphens? = null, removePublicationDefinedHorizontalPageMargins: Boolean = false, textAlignment: PublicationStyleTextAlignmentOptions? = null, typographyResetOptions: PublicationStyleTypographyResetOptions = PublicationStyleTypographyResetOptions(), wordSpacing: Length? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The default font-family to use for documents that do not define a font-family. Defaults to 'serif'

Link copied to clipboard

Determines whether CSS animations and transitions should be disabled in the rendered publication.

Link copied to clipboard

NOTE: This interface is being simplified to be easier to use and will be released in an upcoming release.

Link copied to clipboard

Applies font-size scaling to the rendered publication. This is typically only supported on reflowable content documents and ignored otherwise.

Link copied to clipboard
val hyphens: Hyphens? = null

Allows overriding the hyphenation behavior of the text in the publication.

Link copied to clipboard
val letterSpacing: Length? = null

Controls the spacing between letters.

Link copied to clipboard

Applies line-height scaling to the rendered publication. This is typically only supported on reflowable content documents and ignored otherwise.

Link copied to clipboard

Sets the individual page margins. This is typically only supported on reflowable content documents and ignored otherwise.

Link copied to clipboard

Allows you to override the palette used for rendering the publication.

When this option is enabled, the horizontal page margin and padding defined in the publication CSS are removed.

Link copied to clipboard

Allows overriding the text alignment used in the publication

Link copied to clipboard

Various options for removing publication defined style rules related to fonts and typography.

Link copied to clipboard
val wordSpacing: Length? = null

Controls the spacing between words.

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)