PDF

laika.format.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.

Attributes

Graph
Supertypes
trait TwoPhaseRenderFormat[FOFormatter, BinaryPostProcessorBuilder]
trait Format
class Object
trait Matchable
class Any
Self type
PDF.type

Members list

Concise view

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.

Attributes

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object BookConfig

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

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.

Attributes

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.

Attributes

Concrete fields

override val description: String

Short string describing the markup or output format for tooling and logging.

Short string describing the markup or output format for tooling and logging.

Attributes

val interimFormat: RenderFormat[FOFormatter]

The render format for the interim result, the first phase of this renderer.

The render format for the interim result, the first phase of this renderer.

Attributes