Performs a render operation from a document AST to a target format as a string. The document AST may be obtained by a preceding parse operation or constructed programmatically.
In cases where a parse operation should precede immediately, it is more convenient to use a laika.api.Transformer instead which combines a parse and a render operation directly.
Example for rendering HTML:
val doc: Document = ???
val res: String = Renderer
.of(HTML)
.build
.render(doc)
This is a pure API that does not perform any side-effects. For additional options like File and Stream I/O, templating or parallel processing, use the corresponding builders in the laika-io module.
- Companion:
- object
Type members
Types
Value members
Abstract methods
Concrete methods
Renders the specified document as a String, using the given path translator and styles.
Renders the specified document as a String, using the given path translator and styles.
Currently only PDF/XSL-FO output processes styles, all other formats will ignore them.
Renders the specified element as a String.
Renders the specified element as a String.
The provided (virtual) path may be used by renderers for cross-linking between documents.
Renders the specified element as a String, using the given path translator and styles.
Renders the specified element as a String, using the given path translator and styles.
Currently only PDF/XSL-FO output processes styles, all other formats will ignore them.
The provided (virtual) path may be used by renderers for cross-linking between documents.