generatePDF

About This Task

Generates PDF from your AsciiDoc sources using AsciidoctorJ PDF. Output is written to build/pdf/. The result looks like a typeset book, not a print-to-PDF web page.

./dtcw4 local generatePDF

Configuration

Specify which files to render in your docToolchainConfig.groovy:

inputFiles = [
    [file: 'manual.adoc', formats: ['html','pdf']],
]

Add the files you want rendered with the pdf format.

Custom PDF Theme

To customize colors, fonts, headers, and footers, create a custom-theme.yml file.

  1. Run ./dtcw4 local copyThemes pdfTheme to copy the bundled pdfTheme (including the example template_config/pdfTheme/custom-theme.yml) into your project.

  2. Reference it from your AsciiDoc file:

:pdf-themesdir: {docdir}/../pdfTheme
:pdf-theme: custom

Source

View the source of this task: scripts/generatePDF.groovy on GitHub