Nethouse.DocumentGenerator.Client
1.0.5
dotnet add package Nethouse.DocumentGenerator.Client --version 1.0.5
NuGet\Install-Package Nethouse.DocumentGenerator.Client -Version 1.0.5
<PackageReference Include="Nethouse.DocumentGenerator.Client" Version="1.0.5" />
<PackageVersion Include="Nethouse.DocumentGenerator.Client" Version="1.0.5" />
<PackageReference Include="Nethouse.DocumentGenerator.Client" />
paket add Nethouse.DocumentGenerator.Client --version 1.0.5
#r "nuget: Nethouse.DocumentGenerator.Client, 1.0.5"
#:package Nethouse.DocumentGenerator.Client@1.0.5
#addin nuget:?package=Nethouse.DocumentGenerator.Client&version=1.0.5
#tool nuget:?package=Nethouse.DocumentGenerator.Client&version=1.0.5
Nethouse.DocumentGenerator.Client
Typed .NET client for the Nethouse Document Generator API —
a powerful and flexible solution for generating Microsoft Word documents from templates based on JSON Schemas.
🚀 Overview
The Document Generator Client provides a simple, strongly-typed interface for communicating with the
Nethouse Document Generator API, which enables automatic Word document creation using reusable templates.
This client is ideal for developers who want to generate .docx or .pdf documents from structured JSON data, without depending on Microsoft Word automation or Office runtime components.
🧩 Features
- 🧾 Generate Word documents from JSON models and reusable templates
- 🧠 JSON Schema–driven templating with automatic content control mapping
- 🔄 Refit-based client — simple, declarative REST API
- 🔐 Bearer token authentication (Azure AD, Auth0, or custom providers)
- ☁️ Integrates with hosted or self-hosted Nethouse Document Generator API
- ⚙️ Targets .NET Standard 2.0
⚙️ Configuration and Client Registration
The Nethouse.DocumentGenerator.Client library integrates seamlessly with .NET dependency injection and configuration.
You can register the client using a configuration section path — for example:
services.AddDocumentGeneratorClient("{CONFIGURATION_SECTION_PATH}");
The parameter indicates where the AuthSettings section is located in your configuration file
(appsettings.json, user secrets, or environment variables).
This enables the client to automatically:
- Load authentication details and API base URL from configuration.
- Acquire Azure AD (or OAuth2) access tokens via the configured credentials.
- Attach the
Authorization: Bearerheader to each API request.
🧩 Example appsettings.json
{
"AuthSettings": {
"ClientId": "YOUR-CLIENT-ID",
"ClientSecret": "YOUR-CLIENT-SECRET",
"TenantId": "YOUR-TENANT-ID",
"Scope": "api://document-generator-api/.default",
"BaseUrl": "https://api.documentsgenerator.org"
}
}
💡 Tip:
You can also override these values via environment variables or Azure App Configuration for production environments.
💡 Usage Example
Below is an example of using the registered client to generate a document from a data model.
this.logger.LogInformation("Creating document generator client");
var documentGenerator = this.apiClientFactory.CreateClient(hostUrl, 500);
this.logger.LogInformation("Generating document");
var documentData = this.dataProvider.GetData<LeasingPlanDocumentModel>();
var document = await documentGenerator.GenerateAsync(
documentData,
"LeasingPlanTemplate.docx",
cancellationToken);
this.logger.LogInformation("Document generated successfully");
☁️ Azure Container Offer
The Document Generator API is also available as a certified Azure Container Offer in the
Microsoft Azure Marketplace, allowing organizations to deploy the API within their own Azure environments.
🔹 Highlights
- Document Template Designer editor is available as a Word VSTO plugin
- One-click deployment to your Azure subscription
- Preconfigured Helm and CNAB package
- Secure template and schema storage via Azure Files / Blob Storage
- Built-in health and readiness probes
- Scalable deployment with AKS and Azure Front Door
- Seamless integration with the
Nethouse.DocumentGenerator.ClientNuGet package
🔗 Learn more
➡️ Azure Marketplace Offer Page
➡️ API Deployment Guide
➡️ Download free demo version of Word Template Designer Download
📦 Installation
dotnet add package Nethouse.DocumentGenerator.Client
2025 © Nethouse — Nethouse Document Generator contact@nethouseconsulting.com
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- IdentityModel.OidcClient (>= 6.0.0)
- Microsoft.Extensions.Caching.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Caching.Memory (>= 9.0.3)
- Microsoft.Extensions.DependencyInjection (>= 9.0.3)
- Microsoft.Extensions.Http (>= 9.0.3)
- Microsoft.Extensions.Options (>= 9.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.3)
- Microsoft.Extensions.Options.DataAnnotations (>= 9.0.3)
- Ndjson.AsyncStreams.Net.Http (>= 2.1.0)
- Refit (>= 9.0.2)
- Refit.HttpClientFactory (>= 9.0.2)
- System.Interactive.Async (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
NDJSON + client improvements. Target net8 only.