DITA transform to allow multi-column PDF?

Here should go questions about transforming XML with XSLT and FOP.
jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

DITA transform to allow multi-column PDF?

Post by jnielsen » Fri Aug 07, 2009 5:27 pm

I am just curious if there have been any transform solutions made for, say, a two column PDF build for DITA, such as the style that academic white papers use. I read something about Arbortext providing such a feature but have not seen much else about how this would be possible. I'm not particularly adept at XSL-FO enough to edit the page flow myself. Have you ever seen a two column PDF done with DITA? Any pointers on where I could look to find out more about how to do something like that?

Thanks,

Josh

jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Re: DITA transform to allow multi-column PDF?

Post by jnielsen » Fri Aug 07, 2009 5:50 pm

One poster on a forum here mentioned that you can edit the column count attribute of the region-body like <fo:region-body column-count="2"/> but where would this code be located, if anywhere, in the Idiom PDF transformation files of the DITA Open Toolkit?

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: DITA transform to allow multi-column PDF?

Post by sorin_ristache » Tue Aug 11, 2009 5:43 pm

Hello,

I think you have to customize the stylesheet ${frameworks}/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl where ${frameworks} is the frameworks folder of the Oxygen install folder. It seems the body content is generated by this stylesheet.


Regards,
Sorin

jnielsen
Posts: 58
Joined: Fri Sep 12, 2008 12:12 am

Re: DITA transform to allow multi-column PDF?

Post by jnielsen » Thu Aug 13, 2009 1:18 am

Thanks for the pointer Sorin.

Actually I discovered where the page layout is handled and I got the two-columned code I mentioned above to work! You must edit the settings in ${frameworks}/dita/DITA-OT/demo/fo/cfg/fo/layout-masters.xsl.

You must go to the section under the comment/header <!--BODY simple masters--> and edit the <fo:body-region> tag attributes for all four page-master sections (body-first, body-even, body-odd, and body-last) to include the attribute column-count="2" in it and it will automatically make all the body content two columned. It was much easier than I imagined it would be. The only thing to note is that larger objects like tables and images don't always stay in inside the reduced width margins of the columns, but that is to be expected.

Thanks for your help, and I hope this can help someone else out as well!


Regards,

Josh

Post Reply