Page 1 of 1

DITA - PDF Output Customization questions

Posted: Thu Feb 27, 2014 6:24 pm
by dan.s
Hi guys. Can someone please help me customize a pdf output? I'm trying to:

1. include a left-aligned company logo in the footer, visible on all pages excluding front page and TOC section.
2. include a "Version date: <output date>" text just under the title on the main page, small size, grey color. (<output date>) to be automatically filled each time I'm building an output.

Can you please tell me what files need to be modified and how?
Thank you so much for the best dita editing tool out there! :)

Re: DITA - PDF Output Customization questions

Posted: Fri Feb 28, 2014 12:27 pm
by Radu
Salut Dan,

Thanks for the kind words.
I will try to give you some hints for each question below:
1. include a left-aligned company logo in the footer, visible on all pages excluding front page and TOC section.
If you look in this configuration file (for English):

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg/common/vars/en.xml

it contains some variables like:

Code: Select all

    <!-- The footer that appears on odd-numbered pages. -->
<variable id="Body odd footer"/>

<!-- The footer that appears on even-numbered pages. -->
<variable id="Body even footer"/>
Such variables are used in the XSLT:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/fo/static-content.xsl

in XSLT templates like:

Code: Select all

 <xsl:template name="insertBodyEvenFooter">
.....
So you could try to modify their content.
As a side note usually PDF customizations are not made by directly modifying the XSLT code in the DITA OT folder:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html
2. include a "Version date: <output date>" text just under the title on the main page, small size, grey color. (<output date>) to be automatically filled each time I'm building an output.
In the XSL:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\front-matter.xsl

there is an XSLT template called:

Code: Select all

 <xsl:template name="createFrontMatter_1.0">
..........
which should probably be modified to add some XSLT code which presents the current date under the part where the map title is presented.

The DITA Users List is also a very good place where to register and ask customization questions.
There is also a very good book about PDF customization by Leigh White:

http://xmlpress.net/publications/dita/dita-for-print/

Regards,
Radu

Re: DITA - PDF Output Customization questions

Posted: Fri Feb 28, 2014 4:02 pm
by dan.s
Thank you kindly Radu. It helped .