pdf

object pdf extends PDFOps

Selects the configuration options available for PDF generation.

trait PDFOps
trait CopyOps
trait SingleConfigOps
trait ColorOps
trait CommonConfigOps
class Object
trait Matchable
class Any

Value members

Inherited methods

protected def copyWith(pdfSettings: PDFSettings): Helium
Inherited from
CopyOps
protected def copyWith(epubSettings: EPUBSettings): Helium
Inherited from
CopyOps
protected def copyWith(siteSettings: SiteSettings): Helium
Inherited from
CopyOps
def coverImages(images: CoverImage*): Helium

Specifies one or more cover images for the PDF document.

Specifies one or more cover images for the PDF document.

Multiple cover images are only relevant when the @:select directive is used to generate different versions of the same e-book which can all have their own cover image. See the documentation for the @:select directive in the chapter "Standard Directives" in the manual for details.

Inherited from
PDFOps
protected def currentColors: ColorSet
Inherited from
PDFOps
def fontFamilies(body: String, headlines: String, code: String): Helium
Inherited from
SingleConfigOps
Inherited from
PDFOps
def fontSizes(body: Length, code: Length, title: Length, header2: Length, header3: Length, header4: Length, small: Length): Helium
Inherited from
SingleConfigOps
def layout(pageWidth: Length, pageHeight: Length, marginTop: Length, marginRight: Length, marginBottom: Length, marginLeft: Length, defaultBlockSpacing: Length, defaultLineHeight: Double, keepTogetherDecoratedLines: Int): Helium

Allows to override the defaults for Helium's PDF layout.

Allows to override the defaults for Helium's PDF layout.

You can use the constructors found in the LengthUnit companion to create length values, e.g. LengthUnit.px(12). It's usually most convenient to import laika.ast.LengthUnit._ for your configuration code.

Most arguments should be self-explanatory. The keepTogetherDecoratedLines value controls the number of lines for decorated blocks like code examples or callouts that should always be kept on the same page. With a setting of 12 for example only blocks with more than 12 lines are allowed to be split across multiple pages. If you choose very high numbers for this setting you might see pages with a lot of blank space when it has to move a large block to the next page.

Inherited from
PDFOps
def messageColors(info: Color, infoLight: Color, warning: Color, warningLight: Color, error: Color, errorLight: Color): Helium
Inherited from
ColorOps
def metadata(title: Option[String], description: Option[String], identifier: Option[String], authors: Seq[String], language: Option[String], date: Option[Instant], version: Option[String]): Helium
Inherited from
SingleConfigOps
Inherited from
ColorOps
def tableOfContent(title: String, depth: Int): Helium

Adds a dedicated page for a table of content, in addition to the reader-native navigation structure.

Adds a dedicated page for a table of content, in addition to the reader-native navigation structure.

Value Params
depth

the navigation depth which may be different than the one for the reader-native navigation structure

title

the title to display on the page and in navigation that links to the page

Inherited from
PDFOps
def themeColors(primary: Color, primaryMedium: Color, primaryLight: Color, secondary: Color, text: Color, background: Color, bgGradient: (Color, Color)): Helium
Inherited from
ColorOps
protected def withColors(colors: ColorSet): Helium
Inherited from
PDFOps
protected def withFontFamilies(fonts: ThemeFonts): Helium
Inherited from
PDFOps
protected def withFontSizes(sizes: FontSizes): Helium
Inherited from
PDFOps
protected def withMetadata(metadata: DocumentMetadata): Helium
Inherited from
PDFOps