Nethouse.DocumentGenerator.Client 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nethouse.DocumentGenerator.Client --version 1.0.4
                    
NuGet\Install-Package Nethouse.DocumentGenerator.Client -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nethouse.DocumentGenerator.Client" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nethouse.DocumentGenerator.Client" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Nethouse.DocumentGenerator.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nethouse.DocumentGenerator.Client --version 1.0.4
                    
#r "nuget: Nethouse.DocumentGenerator.Client, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nethouse.DocumentGenerator.Client@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nethouse.DocumentGenerator.Client&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Nethouse.DocumentGenerator.Client&version=1.0.4
                    
Install as a Cake Tool

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: Bearer header 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.Client NuGet 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 101 2/5/2026
1.0.4 90 2/5/2026
1.0.3 106 2/3/2026
1.0.2 91 2/3/2026
1.0.1 121 2/1/2026 1.0.1 is deprecated because it is no longer maintained.

NDJSON + client improvements. Target net8 only.