# Generating Documents with command-line tool

How to generate documents from the command line with the DITA-OT command-line tool.

The DITA Open Toolkit provides a command-line tool to run document conversions. However, the command-line tool is a wrapper for the Ant interface, so you still must install Ant. In addition, only a subset of the Ant properties are supported by the command-line tool

1. Open a command prompt.
2. Change directories to where you installed the DITA Open Toolkit.
3. Set up the processing environment. Enter the following command:

       startcmd.bat

4. Run a convertion to a transformation output type. Enter the following command:

       java -jar lib/dost.jar [arguments]

   Three arguments are required:

   `/i:`source``
     defines the location of the .ditamap file for your document
   `/outdir:`output-dir``
     defines the director where the output resides after DITA-OT finishes processing your project
   `/transtype:`format``
     defines the type of document you want to generate for the project.

   For example, the following command instructs DITA-OT to build the samples/sequence.ditamap as a PDF in the out directory:

       java -jar lib/dost.jar /i:samples/sequence.ditamap /outdir:out /transtype:pdf

Parent topic: Running DITA Open Toolkit
Related reference
Command-line tool arguments for DITA-OT