Page 1 of 1

Use a particular topic as cover page of PDF

Posted: Tue May 13, 2014 12:02 pm
by eloralon
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

Re: Use a particular topic as cover page of PDF

Posted: Tue May 13, 2014 4:55 pm
by Radu
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

Re: Use a particular topic as cover page of PDF

Posted: Tue May 13, 2014 8:09 pm
by eloralon
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.

Re: Use a particular topic as cover page of PDF

Posted: Wed May 14, 2014 12:34 pm
by Radu
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

Re: Use a particular topic as cover page of PDF

Posted: Wed May 14, 2014 3:13 pm
by eloralon
Thanks again Radu,

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