Generate cover page for PDF document

486 Views Asked by At

Given this template-docinfo.xml document:

<mediaobject role="cover">
    <imageobject><imagedata fileref="cover_page.jpeg" format="JPG"/></imageobject>
    <textobject><phrase>Template Title</phrase></textobject>
</mediaobject>

<legalnotice>
    <literallayout class="monospaced">
        Copyright 2014
    </literallayout>
</legalnotice>

These settings will render an ePub document with a cover page:

$ a2x -f epub -d book -a docinfo -v --epubcheck template.adoc

These setting will render a PDF document, but without a cover page:

$ a2x -f pdf -d book -a docinfo -v --fop template.adoc

Is there a way to render a PDF document with a cover page (i.e. the image is the document's first page)?

1

There are 1 best solutions below

0
On

I do not think that mediaobject is in the default titlepage transformation for FO, using DocBook 4x. You will have to make a custom titlepage transformation that includes the mediaobject tag.

DocBook 5.x has a cover element that might be included.

https://lists.oasis-open.org/archives/docbook-apps/200701/msg00221.html