A dotnet client library for submitting document generation requests to the KMD Logic platform and retrieving the corresponding generated documents.
To allow products using the Logic platform to generate documents for well-defined business scenarios using templates that their customers can easily manage.
For a guide on how to configure a Document Generation environment in Console please go here.
To use this library in an ASP.NET Core application, add a reference to the Kmd.Logic.DocumentGeneration.Client nuget package, and add a reference to the Kmd.Logic.Identity.Authorization nuget package.
The Logic DocumentGenerationClient provides APIs for:
- listing document generation Templates;
- requesting the generation of documents based on those templates;
- requesting conversion of documents to other formats, in particular to Pdf/A;
- checking on the progress of document generation and format conversion;
- requesting a signed download url from which to stream the generated or converted document.
More details about the DocumentGenerationClient API can be found here
Logic Document Generation is done relative to a hierarchy of template storage areas structured into a Configuration. The only way to create a new Configuration is via Console (see here).
But the Document Generation Client does provide an API for editing an existing Configuration, and for running the document generation methods relative to that configuration and its descendent template storages.
More details about the DocumentGenerationConfiguration API can be found here
Follow our Templates guide.
Perhaps the easiest way to configure the Document Generation client is though Application Settings.
{
"TokenProvider": {
"ClientId": "",
"ClientSecret": "",
"AuthorizationScope": ""
},
"DocumentGeneration": {
"SubscriptionId": ""
}
}To get started:
- Create a subscription in Logic Console. This will provide you the
SubscriptionId. - Request a client credential. Once issued you can view the
ClientId,ClientSecretandAuthorizationScopein Logic Console.
Two sample console applications are included to demonstrate how to call the Logic Document Generation API. You will need to provide the settings described above in their appsettings.json.
Before running the sample applications, upload the template documents provided in the folder:
sample\Kmd.Logic.DocumentGeneration.Client.Sample\templates
to your template storage area.