RtfDocument
data class RtfDocument(val blocks: List<RtfBlock>, val defaultFont: RtfFont, val defaultFontSizeHalfPoints: Int = 24, val info: RtfInfo? = null, val generator: String? = null, val codePage: Int = 1252, val defaultLanguage: Int = 1033)(source)
A rich, strongly-typed RTF document model for authoring arbitrarily complex output, the builder-style counterpart to StyledDocument's minimal round-trip model. Construct one directly and serialize it with RtfDocumentWriter.
Fonts and colors are referenced by value from RtfSpanStyle; RtfDocumentWriter gathers every referenced font (plus defaultFont) and color into the document's tables and resolves their indices, so the model never deals in raw \fN / \cfN numbers.
Parameters
defaultFont
the \deff0 body font; always font index 0 in the table.
defaultFontSizeHalfPoints
the document \fsN default in half-points (24 = 12pt).
codePage
the \ansicpgN code page (cosmetic — output is 7-bit ASCII with \uN escapes).
defaultLanguage
the \deflangN language id.