Packages

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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Renderer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Renderer(config: OperationConfig, skipRewrite: Boolean = false)

Type Members

  1. abstract type Formatter

Abstract Value Members

  1. abstract def format: RenderFormat[Formatter]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. val config: OperationConfig
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def forInputFormat(markupFormat: MarkupFormat): Renderer
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. 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.

  17. 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.

  18. def render(element: Element): Either[RendererError, String]

    Renders the specified element as a String.

  19. 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.

  20. def render(doc: Document): Either[RendererError, String]

    Renders the specified document as a String.

  21. 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.

  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped