Login  Register

Rendering in PDF with Maven

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

Rendering in PDF with Maven

Jmm
Hello,

I am looking into changing our "asciidoctor -> docbook -> pdf" tool chain to the more direct "asciidoctor -> pdf" chain. We are working with maven.

I was able to generate a pdf but I am looking how I can customise the output. How can I for instance control the paper size (A4) ? I would like to customise also header, footer, etc. I want to achieve something that has the same level finish as the Docbook output before proposing it to my colleagues.

I have read that there is a YML configuration file where quite lot of stuff can be tweaked. How can I access to that through the maven configuration ?

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

Re: Rendering in PDF with Maven

mojavelinux
Administrator
The right way to go is the YML configuration file. It just needs to be available somewhere in the project. Though not a Maven project, you can see an example in the doc build for gpars.

https://github.com/GPars/GPars/blob/master/build.gradle#L227

You need to set the attributes pdf-stylesdir and pdf-style for it to locate the theme file.

> I want to achieve something that has the same level finish as the Docbook output before proposing it to my colleagues.

It's not going to be possible at this point to polish it to the level you can with DocBook. Asciidoctor PDF is intentionally more simple than the DocBook Apache FO PDF output at the moment. You could say that it is more opinionated...though the truth is it's just not as mature.

To really tweak the output of Asciidoctor PDF, you have to hack / override the Ruby code and that's just not something that's easily linked up with a Maven build yet. We'll find our way there, but it's going to take time.

Cheers,

-Dan

On Wed, Jan 21, 2015 at 3:06 PM, Jmm [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I am looking into changing our "asciidoctor -> docbook -> pdf" tool chain to the more direct "asciidoctor -> pdf" chain. We are working with maven.

I was able to generate a pdf but I am looking how I can customise the output. How can I for instance control the paper size (A4) ? I would like to customise also header, footer, etc. I want to achieve something that has the same level finish as the Docbook output before proposing it to my colleagues.

I have read that there is a YML configuration file where quite lot of stuff can be tweaked. How can I access to that through the maven configuration ?

Jmm
 


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



--