Re: [docbook-apps] Re: How do I generate a PDF through the gradle DocBookTask

2019-02-14 Thread Loren Cahlander
I tried that and got:

Mac-Pro:xqdoc2pdf lcahlander$ vi build.gradle
Mac-Pro:xqdoc2pdf lcahlander$ gradle myPdfDocument
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :myPdfDocument FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':myPdfDocument'.
> Duplicate option name: 'format'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 24s
1 actionable task: 1 executed
Mac-Pro:xqdoc2pdf lcahlander$


> On Feb 14, 2019, at 11:39 AM, Norman Walsh  wrote:
> 
> 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")
> }



signature.asc
Description: Message signed with OpenPGP


[docbook-apps] Re: How do I generate a PDF through the gradle DocBookTask

2019-02-14 Thread Norman Walsh
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


signature.asc
Description: PGP signature