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

Post by eloralon » Tue May 13, 2014 12:02 pm

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

Radu
Posts: 7154
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use a particular topic as cover page of PDF

Post by Radu » Tue May 13, 2014 4:55 pm

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,
Radu
Radu Coravu
<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

Post by eloralon » Tue May 13, 2014 8:09 pm

Thanks Radu for your reply.

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.

Radu
Posts: 7154
Joined: Fri Jul 09, 2004 5:18 pm

Re: Use a particular topic as cover page of PDF

Post by Radu » Wed May 14, 2014 12:34 pm

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,
Radu
Radu Coravu
<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

Post by eloralon » Wed May 14, 2014 3:13 pm

Thanks again Radu,

I have already started doing that and will come back with questions if necessary.

Post Reply