Use a particular topic as cover page of PDF

Here should go questions about transforming XML with XSLT and FOP.
eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Use a particular topic as cover page of PDF

Hello,

I have a question about how to use a particular topic as cover page for PDF rendition using XEP RenderX and DITA-OT.

At the moment when I transform my ditamap to PDF I get the table of content and then the cover page, which I would want to put at the beginning of the PDF.

I have searched the forum and seen how few ways to customize the PDF rendition but could not find a similar solution to what I am trying to do.

Thanks

Posts: 7024
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use a particular topic as cover page of PDF

Hi,

If you use a DITA Bookmap for your project (you have an example in: OXYGEN_INSTALL_DIR\samples\dita\it-book\taskbook.ditamap) the bookmap can refer in its <frontmatter> section to a <notices> element which can refer to a topic which will be shown before the table of contents.

The notices are shown before the TOC page before in the XSLT stylesheet OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/fo/front-matter.xsl the XSLT template called "createFrontMatter_1.0" creates the front matter (first page in the PDF) and then calls

Code: Select all

 <xsl:call-template name="createNotices"/>
to create the notices. Then the TOC is processed.

Regards,
<oXygen/> XML Editor
http://www.oxygenxml.com

eloralon
Posts: 38
Joined: Thu Oct 28, 2010 5:10 pm

Re: Use a particular topic as cover page of PDF

Actually what I need is to have the content of the topic and not the title only of the topic referenced in the <notices></notices> of the bookmap to be shown on the cover page. Currently when I run the ditamap to PDF scenario from oXygen I only get the titles on the first page, followed by the topic content on the second page, and then the TOC on the third page.

The topic I need to include on the cover page is just one paragraph and an image.

Additionally I have a constrain on the DITA-OT version, which is 1.4.2 and not the latest version.

Thanks for your help.

Posts: 7024
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use a particular topic as cover page of PDF

Hi,

You will probably need to located the PDF front-matter.xsl in your older DITA OT distribution and try to first understand and then customize the "createFrontMatter_1.0" template which outputs the first page of the PDF.

Regards,