Re: generating PDF

Don R. Day <donday@...>

Hi, Balaji. The simplest way to get started producing PDF using DITA-OT is to use the command-line dialog.

1. Assuming that you are using Windows, open your file explorer to the root folder of your DITA-OT installation.

2. Run the startcmd.bat file by doubleclicking on it.

3. Start the dialog by entering: ant -f build_demo.xml
A sample interaction might look like this (where the bold highlighting represents what you would enter):

Buildfile: C:\DITA-OT1.8.M2\build_demo.xml



     [echo] Please enter the filename for the DITA map that you
     [echo] want to build including the directory path (if any).
     [echo] The filename must have the .ditamap extension.
     [echo] Note that relative paths that climb (..) are not supported yet.
     [echo] To build the sample, press return without entering anything.
    [input] The DITA map filename:  [C:\DITA-OT1.8.M2\samples\hierarchy.ditamap]


     [echo] Please enter the name of the output directory or press return
     [echo] to accept the default.
    [input] The output directory (out):  [out]
     [echo] Please enter the type of output to generate.
     [echo] Options include: eclipse, tocjs, htmlhelp, javahelp, pdf, or web
     [echo] Use lowercase letters.
    [input] The output type:  (eclipse, tocjs, htmlhelp, javahelp, pdf, [web], d
     [echo] Ready to build samples\sequence.ditamap
     [echo] for pdf in out
    [input] Continue?  (Y, [y], N, n)

These are the basic inputs for any PDF conversion, but you don't have to use just this method. As others have hinted, you can encode those input choices into an Ant build file that you can run at any time. For an example, see samples\ant_sample.xml which sets up exactly the same kind of build request. Run this build file by entering:

C:\DITA-OT1.8.M2>ant -f samples\ant_sample\sample_pdf.xml

The process and outcome should be identical to that of the interactive dialog.

Now you can copy this build file to another location and modify the properties (ditamap name, output directory, output process, etc.) and run it for any custom setup you wish.

I hope this was the kind of "getting started" help that you were looking for.

DITA and XML Consultant, Learning by Wrote
Co-Chair, OASIS DITA Technical Committee
"Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?"
--T.S. Eliot

On 12/17/2013 12:01 AM, Balaji Kothandaraman wrote:

I  would like to generate PDF using one of the ditamaps that I am using for doc purpose. Please advise me on the procedure to do the same. Also please let me know if I have to make changes to specific settings as well to generate the PDF.
Any help would be much appreciated.

Balaji K

  • "Where is the wisdom we have lost in knowledge?
  • Where is the knowledge we have lost in information?"
  • --T.S. Eliot

Join to automatically receive all group messages.