Page 1 of 1

DITA OT - GENERATE PDF - CHAPTER

Posted: Mon Sep 05, 2011 12:29 pm
by ESTRADE
Hi,

It's possible to modifie out PDF for page chapter ?
Actuelly i obtains ;
Chapter
N° chapter
Title
Topics :
list of totpics


Thank you


Best regards

Re: DITA OT - GENERATE PDF - CHAPTER

Posted: Mon Sep 05, 2011 2:11 pm
by Radu
Hi Jean,

All the customizations can be made in the XSLT stylesheets used to build the XSL-FO (from which Apache FOP will build the final PDF output).
You should set the xml:lang="fr-fr" attribute on the DITA Map root element in order for the PDF transformation to know in what language the static texts should be used. You should also specify this attribute on every DITA topic in order for this to work properly for XHTML-based transformations.

What exactly do you want to change?

Regards,
Radu

Re: DITA OT - GENERATE PDF - CHAPTER

Posted: Mon Sep 05, 2011 2:32 pm
by ESTRADE
Hi,

For example, the Number of chapter is below the mention Chapter, why not on the same line ?

Topics is not centred, they are in a list at the left ?

...


Best regards

Re: DITA OT - GENERATE PDF - CHAPTER

Posted: Tue Sep 06, 2011 4:57 pm
by Radu
Hi,

For placing the chapter name and number on the same line, the stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl

contains a template called:

<xsl:template name="insertChapterFirstpageStaticContent">

in it there is a:

Code: Select all

<fo:block xsl:use-attribute-sets="__chapter__frontmatter__number__container">
<xsl:value-of select="$chapterNumber"/>
</fo:block>
which can be replaced by:

Code: Select all

<fo:inline xsl:use-attribute-sets="__chapter__frontmatter__number__container">
<xsl:value-of select="$chapterNumber"/>
</fo:inline>
The list of topics is not centered probably because the chapter may have its own content which appears in the right part of the topics list.
You can also probably make some XSLT changes to customize the behavior.

Regards,
Radu

Re: DITA OT - GENERATE PDF - CHAPTER

Posted: Wed Sep 07, 2011 11:23 am
by ESTRADE
Hi Radu,

Again thank you

Best regards

Jean