Re: How do I generate a PDF through the gradle DocBookTask

From
Norman Walsh <>
Date
2019-02-14T16:39:12+00:00
ID
Thread
Re: How do I generate a PDF through the gradle DocBookTask
Loren Cahlander <> writes:
> I found Norm Walshâs grade DocBookTask in his article https://so.nwalsh.com/2018/03/05/easy
[â]
> I need to find the settings for generating a PDF.

Iâve been exploring the answer to that question recently. There are
two obvious avenues: through XSL-FO or through CSS. Iâve made both
work, though the DocBook 2.0 stylesheets for FO arenât really as well
developed as the HTML ones.

Something as simple as this, should produce FO:

task myPdfDocument(type: DocBookTask) {
  // And tell the pipeline to validate with the schema
  option("schema", "https://docbook.org/xml/5.1/rng/docbook.rng")
  input("source", "document.xml")

  output("result", "output.fo")
  option("format", "print")
}

Iâve produced PDF with CSS (via AntennaHouse) recently, see the xproc_pdf
task in build.gradle in github.com/xproc/3.0-specification/

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <> | Waste no more time arguing what a good
http://nwalsh.com/            | man should be. Be one.--Marcus Aurelius