# Generating Dynamic Document Previews

The BuildDocPreviews command to generate dynamic document (static document previews not supported) previews for an entire Expere repository lets you create a preview (PDF or RTF output) based on REQ files in a given source repository. This is a convenient method to generate previews of output PDFs without having to open each REQ file individually in the Requirements Editor.

Using the command line, dynamic document previews are generated through batch processing and are placed in the directory specified by the user. Each preview is named according to its document name. Document previews include most up-to-date content references (assuming content reference files were updated prior to processing).

The command line to generate dynamic document previews looks like:

    BuildDocPreviews (-FOP|-TAG|-XEP|-RTF) <Repository Path> <Output Path>

The arguments, or switches, available include the following. These switches are optional and mutually exclusive:

- –TAG generates tagged PDF previews with Apache FOP. Use the TAG switch to generate the document(s) as an ADA-enabled TaggedPDF using the Apache FOP rendering engine.
- –FOP generates straight PDF previews with Apache FOP.
- –XEP generates straight PDF previews with RenderX
- –RTF generates RTF previews. Use the RTF switch to generate the document as an RTF that can be opened in Microsoft Word.
  Note: If an assembly mode is not specified, the default is FOP.

The target repository folder and output folder are defined in the following parameters.

- <Repository Path> is the file path of the Expere content repository containing the dynamic REQ format documents. This must be a fully qualified path.
- <Output Path> is the desired output file path where the document previews are written to. This must be a fully qualified path. In addition, a BuildPreviewsLog.txt file that lists the successfully generated documents, any static document names (previews of static documents are not supported), as well as document rendering errors are written to this folder.

Note: The best practice recommendation is to avoid using spaces in the repository or output folders. If either of these folders contain spaces, you must enclose the folder path with quotes (" ") in the command line.

You must CD to the BuildDocPreviews install folder and run the command line prompt from the install folder. In the source repository, make sure the organization structure file (organizations.xml) is contained at the root of the repository folder. As well, be sure to update all content references in the repository to ensure the previews are current.

Important: You must install the BuildDocPreviews application on the target machine in order to use the command line to generate a document preview.

## About the BuildDocPreviews Application

As noted, you must install the BuildDocPreview executable to run the command line tool. You can find the BuildDocPreviewInstaller/setup.exe and all related files in the following directory:

    <Release Number>_Release/Tools/BuildDocPreviews

Note: The Expere Authoring Tools CD distributed for use with the Apache FOP rendering engine does not support the -XEP switch or Render X as the document rendering option.

If you intend to generate previews using the Render X rendering engine, by using the -XEP switch, then you must install the BuildDocPreviews installation program distributed on the XEP (RenderX) version of the Expere Authoring Tools CD.

## Example

In this example, the BuildDocPreviews application was installed to the default installation folder and the repository and output folder are at the c:\ root.

The following generates previews based on the repository using the FOP rendering engine.

    C:\Program Files (x86)\WKFS\BuildDocPreviews>BuildDocPreviews -FOP c:\ExpereRepository c:\ExpereRepositoryPreviewsOutput

Parent topic: Command Line Options