Generating Kindle Books From OxygenXML

You can configure a DITA transformation scenario in OxygenXML to generate Kindle books.

You must have the Kindle plugin deployed to the Open Toolkit used by OxygenXML, normally in the frameworks/dita/DITA-OT directory under Oxygen's installation directory. You can also use a different Toolkit by changing the value of the dita.dir Ant parameter.

For the .mobi file generation to work you must have the Amazon-provided kindlegen tool installed on your system. It must either be in the PATH environment variable or you must specify the full path to the executable as the value of the kindlegen.executable Ant parameter.

These instructions reflect Oxygen versions 11.2 and 12.0.

To set up a Kindle book transformation scenario in OxygenXML, do the following.

  1. From either the main editing window or the DITA Maps Manager, open the "Configure Transformation Scenario" dialog (the little wrench and red arrow button in the toolbar).
  2. Select "DITA OT Transformation" from the Scenario Type pulldown.
  3. Select the "DITA Map XHTML" transform and press the Duplicate button.

    The "Edit Scenario" dialog should open.

  4. Change the scenario name to something like "DITA Map Kindle"
  5. Select the Parameters tab (it should be selected by default), add a new parameter named "transtype" and set its value to "kindle".
  6. If the kindlegen executable is not included in your system's PATH environment variable, add a new parameter named "kindlegen.executable" and set its value to the full path to the executable, e.g. "/Users/ekimber/apps/KindleGen_Mac_i386_v1.1/kindlegen".
  7. Select the OK button to save the scenario.

    You should see your new scenario in the list of available DITA OT transformation scenarios.

The scenario should be ready to use. You can test it by applying it to any DITA map. The Kindle file is generated in whatever you've configured as the output directory using the normal output location configuration (as specified in the Output tab of the transformation scenario configuration dialog.

If you select the "Open in browser" option in the transformation scenario's Output panel and you have an application associated with .mobi files, such as the Kindle Previewer or the Kindle book reader application, then the newly-generated book should open in that application.

The Kindle generation process and resulting data is almost identical to the EPUB output, so all the EPUB parameters are also relevant for Kindle output.

You can edit the scenario to add additional EPUB or Kindle parameters as necessary. Simply open the scenario in the Scenario Editor, select the "add parameter" button, and create the parameter. The EPUB-specific parameters are documented in EPUB and Kindle Transformation Parameters.