This method publishes a template for use with HotDocs Server. Like the Publishing Wizard (available in the HotDocs Tools menu), this method scans the template for any inserted templates and builds the JavaScript (.JS), HotDocs Variable Collection (.HVC), and Manifest (.manifest.xml) files required for HotDocs Server. These .JS and .HVC files are then copied to an output folder along with the template files.
This method was introduced in HotDocs 6.1 SP1. Also, it can only be used with HotDocs Developer. If used with HotDocs Developer LE, User, or Player, it returns an error.
void PublishOnlineFiles ( string TemplatePath, string destinationDir )
Parameters | Description |
templatePath | The file system path of the template to publish. |
destinationDir | The output folder to which resulting files are copied. |
The following Visual C# example creates the set of files required to assemble a template using HotDocs Server and copies them to the specified folder.
public class ExampleCode { static void Main() { HotDocs.Application app = new HotDocs.Application(); app.PublishOnlineFiles(@"C:\Documents\HotDocs\Templates\demoempl.rtf", @"C:\HotDocs Server"); } }