The document is generated remotely by using the lib files
copied into the project. The publishSynch method
publishes the document asynchronously. The document generation is
finished when this method returns. The second argument specifies the
limit to the query results, similar to the Preview query
results limit preference from the user interface. Use 0 for
a full document generation.
IDocumentgenerator generator = new RemoteDocumentGenerator( remoteURL, new Credential( remoteUser, remotePassword));
EngineStatus result = generator.publishSynch(docspec, 0);
The status result can be checked to verify that the document
generation is successful. When a document generations successfully,
the status is finished.