Login  Register

PDF creation with Gradle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

PDF creation with Gradle

ChrLipp
This post was updated on Sep 30, 2013; 8:25am.
I am using Asciidoctor with Gradle and now I want to add PDF generation to the build process. At the moment there is no standard way to convert DOCBOOK generated by Asciidoctor to PDF, instead you can find a bunch of different solutions and I wanted to ask which way the community would prefer:

- Pandoc needs a complex installation, therefore is not suitable for a bootstraping build solution
- I didn't try Sandoc (1), but I think the effort to integrate the solution into a Gradle plugin should't be that high.
- Dan's asciidoctor-fopdf (2): at the moment I am struggeling to adapt the Windows command file and have still some path errors, but the final PDF is already created. The effort to integrate the solution into a Gradle plugin should't be that high.
- Pressgang (3)  provide jdocbook-core, which is the base for the maven-jdocbook-plugin, Gradleware provides a Gradle plugin (4)
- Interessting for me was the way Gradleware took for generating the Gradle documentation PDF: they generate DOCBOOK directly, convert it to HTML and then use Flying Saucer (5) + iText (6) to generate the PDF from HTML (see 7).
- Apache FOP provides an ANT task which could be easily integrated into Gradle (8)
- The TSSG 3MT Documentation System (9) provides a Unix based toolchain for generating HTML and PDF

What is the prefered way or which way would you recommend?
Kind regards, Christian

PS: I would love to see this forum support Asciidoctor ;-)


[1] https://github.com/Hocdoc/sandoc)
[2] https://github.com/mojavelinux/asciidoctor-fopdf
[3] https://github.com/pressgang
[4] https://github.com/gradle/gradle-jdocbook
[5] https://code.google.com/p/flying-saucer/
[6] http://itextpdf.com/
[7] https://github.com/gradle/gradle/tree/master/subprojects/docs
[8] http://www.vogella.com/articles/DocBook/article.html#docbookpdf
[9] https://github.com/TSSG/asciidoc2html-pdf/tree/master/asciidoc2html-pdf
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: PDF creation with Gradle

LightGuardjp
Your best bets, IMO, going to be 2 or 3. For ease of what is already there, 3 is probably the easiest. Though 2 will likely give you a better looking out.


On Thu, Sep 26, 2013 at 8:16 AM, ChrLipp [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am using Asciidoctor with Gradle and now I want to add PDF generation to the build process. At the moment there is no standard way to convert DOCBOOK generated by Asciidoctor to PDF, instead you can find a bunch of different solutions and I wanted to ask which way the community would prefer:

- Pandoc needs a complex installation, therefore is not suitable for a bootstraping build solution
- I didn't try Sandoc (1), but I think the effort to integrate the solution into a Gradle plugin should't be that high.
- Dan's asciidoctor-fopdf (2): at the moment I am struggeling to adapt the Windows command file and have still some path errors, but the final PDF is already created. The effort to integrate the solution into a Gradle plugin should't be that high.
- Pressgang (3)  provide jdocbook-core, which is the base for the maven-jdocbook-plugin, Gradleware provides a Gradle plugin (4)
- Interessting for me was the way Gradleware took for generating the Gradle documentation PDF: they generate DOCBOOK directly, convert it to HTML and then use Flying Saucer (5) + iText (6) to generate the PDF from HTML (see 7).

What is the prefered way or which way would you recommend?
Kind regards, Christian

PS: I would love to see this forum support Asciidoctor


[1] https://github.com/Hocdoc/sandoc)
[2] https://github.com/mojavelinux/asciidoctor-fopdf
[3] https://github.com/pressgang
[4] https://github.com/gradle/gradle-jdocbook
[5] https://code.google.com/p/flying-saucer/
[6] http://itextpdf.com/
[7] https://github.com/gradle/gradle/tree/master/subprojects/docs


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/PDF-creation-with-Gradle-tp661.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: PDF creation with Gradle

ChrLipp
When I look at the different approaches the solutions above are using to generate PDF, I come to the following list:

- DOCBOOK -> Latex -> PDF (Pandoc)
- DOCBOOK -> Apache FOP -> PDF (Sandoc, asciidoctor-fopdf, jocbook, Apache FOP, TSSG 3MT Documentation System)
- DOCBOOK -> HTML -> PDF (Gradleware)

So mostly used is DOCBOOK -> Apache FOP -> PDF. Even if each solution provides its own implementation for the conversion, the stylesheets are the interesting parts which makes the difference.

pressgang delivers the stylesheets and fonts in an own Maven artifact, asciidoctor-fopdf mixes stylesheets with the implementation of the conversion.