abstract class Renderer extends AnyRef
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.
- Self Type
- Renderer
- Alphabetic
- By Inheritance
- Renderer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Renderer(config: OperationConfig, skipRewrite: Boolean = false)
Type Members
- abstract type Formatter
Abstract Value Members
- abstract def format: RenderFormat[Formatter]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val config: OperationConfig
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def forInputFormat(markupFormat: MarkupFormat): Renderer
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
render(element: Element, path: Path, pathTranslator: PathTranslator, styles: StyleDeclarationSet): Either[RendererError, String]
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.
-
def
render(element: Element, path: Path): Either[RendererError, String]
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.
-
def
render(element: Element): Either[RendererError, String]
Renders the specified element as a String.
-
def
render(doc: Document, pathTranslator: PathTranslator, styles: StyleDeclarationSet): Either[RendererError, String]
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.
-
def
render(doc: Document): Either[RendererError, String]
Renders the specified document as a String.
-
def
skipRewritePhase: Renderer
Creates a new instance that will skip the rewrite phase when rendering elements.
Creates a new instance that will skip the rewrite phase when rendering elements.
Useful when rewriting has already been performed by a processing step external to the the library's core APIs.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated