PDF

object PDF extends TwoPhaseRenderFormat[FOFormatter, BinaryPostProcessorBuilder]

A post processor for PDF output, based on an interim XSL-FO renderer. May be directly passed to the Render or Transform APIs:

val transformer = Transformer
 .from(Markdown)
 .to(PDF)
 .using(GitHubFlavor)
 .parallel[IO]
 .build

val res: IO[Unit] = transformer
 .fromDirectory("src")
 .toFile("demo.pdf")
 .transform

In the example above the input from an entire directory gets merged into a single output file.

trait TwoPhaseRenderFormat[FOFormatter, BinaryPostProcessorBuilder]
trait Format
class Object
trait Matchable
class Any

Type members

Classlikes

case class BookConfig(metadata: DocumentMetadata, navigationDepth: Option[Int], fonts: Seq[FontDefinition], coverImage: Option[Path])

Configuration options for the generated EPUB output.

Configuration options for the generated EPUB output.

The duplication of the existing BookConfig instance from laika-core happens to have a different implicit key association with the EPUB-specific instance.

Value Params
coverImage

the path to the cover image within the virtual document tree

fonts

the fonts that should be embedded in the PDF output

metadata

the metadata associated with the document

navigationDepth

the number of levels to generate a table of contents for

Companion
object
object BookConfig
Companion
class

Value members

Concrete methods

def postProcessor: BinaryPostProcessorBuilder

Processes the interim XSL-FO result, transforms it to PDF and writes it to the specified final output.

Processes the interim XSL-FO result, transforms it to PDF and writes it to the specified final output.

def prepareTree(root: DocumentTreeRoot): Either[Throwable, DocumentTreeRoot]

Adds a preamble to each document for navigation and replaces the template with a fallback. The modified tree will be used for rendering the interim XSL-FO result. The original template will only be applied to the concatenated result of the XSL-FO renderer in a later step.

Adds a preamble to each document for navigation and replaces the template with a fallback. The modified tree will be used for rendering the interim XSL-FO result. The original template will only be applied to the concatenated result of the XSL-FO renderer in a later step.

Concrete fields

override val description: String
val interimFormat: RenderFormat[FOFormatter]