Introduction

The TopLeaf API provides a mechanism allowing you to integrate TopLeaf within third party applications. The API contains three different interfaces, as discussed below. Choose the interface that best suits your application (or use a mixture of interfaces if this is appropriate).

  • The command line interface is implemented as a separate executable (tlapi). This allows it to be used from a large number of languages and applications. This interface works on all platforms.

  • The library interface is more efficient than the command line interface, since it avoids the overhead of process start-up and shut-down, but can only be called from a compiled language such as C++. This is currently only available on Microsoft Windows via a DLL (Dynamic Link Library).

  • The scripting interface uses COM (the Component Object Model) to provide an object-oriented view of the typesetting engine. This can be called from scripting languages such as JavaScript and VBScript. This is currently only available on Microsoft Windows.

The scripting interface is designed to provide a higher-level interface than the other two, and currently does not support some of the more specialised functions.

Interface Details contains more information about each of the interfaces.

API Concepts discusses concepts relating to the operations of the API.

Reference contains reference information on each of the API entry points.

Status Codes is a list of error codes.

Before you can use the API, you need to create a TopLeaf repository containing one or more publications. TopLeaf repository components, including publication stylesheets are created and maintained using TopLeaf Workstation. See the User Guide and Mapping Guide for more information.