RtfWriter

Serializes a StyledDocument to a charset-free RTF string.

Output is 7-bit ASCII: every code unit above 127 is emitted as a signed \uN escape with a ? fallback. The body opens each paragraph with \plain, groups each run in its own {...} so character formatting cannot leak between runs, and separates paragraphs with \par. No trailing \par follows the last paragraph.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun write(document: StyledDocument): String

Serializes document to a complete RTF string.