Change PDF output
Here should go questions about transforming XML with XSLT and FOP.
Change PDF output
I have just started using the DITA PDF output in Oxygen. I want to know how to make changes to the paragraph styles that appear in the PDF. For example, the Note style is truly awful, with a graphic on the left and then a very large empty space, with the text squashed over on the right. It looks like a two column table in old-fashioned lingo. Can you please point me to where styles and page layout are specified?
Re: Change PDF output
Hi,
Oxygen uses the DITA Open Toolkit to publish DITA to various output formats.
In your case the XSL stylesheet which you will probably have to change is:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl
Just open it in Oxygen and search for the xsl:template called:
<xsl:template match="*[contains(@class,' topic/note ')]">
Indeed the image and message are cells in a fo:table:
<fo:table xsl:use-attribute-sets="note__table">
Then you can modify the fo styles like for example setting a fixed width on the first column:
<fo:table-column column-number="1" column-width="20px"/>
Regards,
Radu
Oxygen uses the DITA Open Toolkit to publish DITA to various output formats.
In your case the XSL stylesheet which you will probably have to change is:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/commons.xsl
Just open it in Oxygen and search for the xsl:template called:
<xsl:template match="*[contains(@class,' topic/note ')]">
Indeed the image and message are cells in a fo:table:
<fo:table xsl:use-attribute-sets="note__table">
Then you can modify the fo styles like for example setting a fixed width on the first column:
<fo:table-column column-number="1" column-width="20px"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Change PDF output
Hi,
Some of the PDF output layout can be tweaked by modifying some configuration files.
Basically there is a folder:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/cfg
in which you should look in detail and which contains values for different parameters.
You can either make modifications directly to those files or (the recommanded way) there is another directory called
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/Customization
which replicates the structure of the configuration folder and in which user customizations can be placed. It also has some readme files in it.
But, as in your case, sometimes you have to make modifications directly in the stylesheets.
The stylesheet templates match the class names of different elements so
my brute force approach is usually to link to the PDF DITA Open Toolkit plugin folder OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo in the Oxygen Project view and then perform a find in files looking for things like topic/note which is the class value of the note element.
You can see the class attribute value for an element by looking in the Oxygen Attributes view when the caret is located inside the element's content.
There is also a book called DITA For Print which comes with lots of PDF customization examples:
https://xmlpress.net/publications/dita/dita-for-print/
Regards,
Radu
Some of the PDF output layout can be tweaked by modifying some configuration files.
Basically there is a folder:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/cfg
in which you should look in detail and which contains values for different parameters.
You can either make modifications directly to those files or (the recommanded way) there is another directory called
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/Customization
which replicates the structure of the configuration folder and in which user customizations can be placed. It also has some readme files in it.
But, as in your case, sometimes you have to make modifications directly in the stylesheets.
The stylesheet templates match the class names of different elements so
my brute force approach is usually to link to the PDF DITA Open Toolkit plugin folder OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo in the Oxygen Project view and then perform a find in files looking for things like topic/note which is the class value of the note element.
You can see the class attribute value for an element by looking in the Oxygen Attributes view when the caret is located inside the element's content.
There is also a book called DITA For Print which comes with lots of PDF customization examples:
https://xmlpress.net/publications/dita/dita-for-print/
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Change PDF output
Hi,
The link (http://www.scriptorium.com/whitepapers/ ... tweaks.pdf) to the document "DITA-PDF-tweaks.pdf" is not valid anymore. Not sure if anyone can share this document or offer the valid link. Thanks a lot.
I am learning DITA and DITA-OT myself and am having headache.
The link (http://www.scriptorium.com/whitepapers/ ... tweaks.pdf) to the document "DITA-PDF-tweaks.pdf" is not valid anymore. Not sure if anyone can share this document or offer the valid link. Thanks a lot.
I am learning DITA and DITA-OT myself and am having headache.
Re: Change PDF output
Hi Peter,
Thanks for reporting the broken link.
I answered your comment here with a couple of suggestions:
post47431.html#p47431
Regards,
Radu
Thanks for reporting the broken link.
I answered your comment here with a couple of suggestions:
post47431.html#p47431
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service