HotDocs Open SDK Overview
The exact usage of the HotDocs SDK in a project depends on the goals of the integration. Typically, a developer using the HotDocs SDK needs to accomplish some or all of the following tasks when developing an integration:
- Create a Work Session, to store information about the state of the document assemblies.
- Create an Answer Collection and add answers to it, so that the HotDocs interview will be populated with data when it is displayed to users.
- Display a HotDocs interview to the user, to gather answer data.
- Process a user's answers when they complete a HotDocs interview.
- Using a user's answers to generate a completed document.
In this section, there are six examples of tasks that can be accomplished using the SDK. Source code for each example is available for download. Each example uses C# and Microsoft Visual Studio to demonstrate use of the HotDocs Open SDK.
Documentation
For full documentation of the HotDocs Open SDK, see the HotDocs Open SDK Help.
Download Example Projects
All of the examples projects below are available to download from the HotDocs-Samples repository on GitHub.
- SdkExample1DocumentAssembly – assemble a document using HotDocs Server
- SdkExample2AnswerCollection – create a collection of answers, used when assembling a document with HotDocs Server
- SdkExample3InterviewFragment – generate and retrieve an Interview HTML Fragment using HotDocs Server
- SdkExample4InterviewDisplay – display an interview and process answer data
- SdkExample5Worksession – create and use a Work Session to complete multiple interviews and assemble multiple documents
- SdkExample6ComponentInfo – read information about the Variable and Dialog components from a HotDocs Template
- SdkExample7CloudServices – send requests to HotDocs Cloud Services using the Open SDK
- SdkExample8WebServiceUpload – upload a HotDocs Template Package File to the HotDocs Web Service
- SdkExample9WebServiceDocumentAssembly – assemble a completed document using Web Services
- SdkExample10WebServiceInterviewDisplay – display an interview in a web page using the Web Service
- SdkExample11WebServiceComponentInfo – Read Variable and Dialog information from the Template Package File
Examples Walkthrough
To assist in developing custom web application using HotDocs Server and the HotDocs Open SDK, there are example tutorials that explain different Open SDK and HotDocs Server features:
- SDK Example 1: Assemble a document from a HotDocs template
- SDK Example 2: Creating an answer collection
- SDK Example 3: Retrieving the HotDocs interview HTML
- SDK Example 4: Displaying the HotDocs interview and processing a user's answers
- SDK Example 5: Using WorkSessions
- SDK Example 6: Reading variables and dialogs from a component file
- SDK Example 7: Using Cloud Services with the HotDocs Open SDK
- SDK Example 8: Upload a Template Package to the HotDocs Web Service
- SDK Example 9: Assemble a Document using the HotDocs Web Service
- SDK Example 10: Display an Interview using the HotDocs Web Service
- SDK Example 11: Get Component File Information using the HotDocs Web Service