<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="using_javacommandline" xml:lang="en-us">
	<title>Generating Documents with command-line tool</title>
	<shortdesc>How to generate documents from the command line with the DITA-OT command-line
    tool.</shortdesc>
	<taskbody>
    <context id="context_kgk_v5s_n2">
      <p>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</p>
    </context>
	<steps>
	<step><cmd>Open a command prompt.</cmd></step>
	<step><cmd>Change directories to where you installed the DITA Open Toolkit.</cmd></step>
	  <step>	    <cmd>Set up the processing environment.</cmd>
	    <info>Enter the following command:<codeblock>startcmd.bat</codeblock></info></step>
	<step><cmd>Run a convertion to a transformation output type.</cmd><info>Enter the following command:<codeblock>java -jar lib/dost.jar [arguments]</codeblock><p>Three
            arguments are required:</p><dl>
            <dlentry>
              <dt><codeph>/i:<userinput>source</userinput></codeph></dt>
              <dd>defines the location of the .ditamap file for your document</dd>
            </dlentry>
            <dlentry>
              <dt><codeph>/outdir:<userinput>output-dir</userinput></codeph></dt>
              <dd>defines the director where the output resides after DITA-OT finishes processing
                your project</dd>
            </dlentry>
            <dlentry>
              <dt><codeph>/transtype:<userinput>format</userinput></codeph></dt>
              <dd>defines the type of document you want to generate for the project.</dd>
            </dlentry>
          </dl></info>
	  <stepxmp>
	    <p>For example, the following command instructs DITA-OT to build the
              <filepath>samples/sequence.ditamap</filepath> as a PDF in the <filepath>out</filepath>
            directory:</p>
	    <p>
	      <codeblock>java -jar lib/dost.jar /i:samples/sequence.ditamap /outdir:out /transtype:pdf</codeblock>
	    </p>
	  </stepxmp>
	  
	</step>
	</steps>
	</taskbody>
  <related-links>
    <link href="../../readme/dita-ot_java_properties.dita"/>
  </related-links>
</task>
