LinkSoft.WordTemplateToPdf 10.0.0

Prefix Reserved
dotnet add package LinkSoft.WordTemplateToPdf --version 10.0.0
                    
NuGet\Install-Package LinkSoft.WordTemplateToPdf -Version 10.0.0
                    
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="LinkSoft.WordTemplateToPdf" Version="10.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LinkSoft.WordTemplateToPdf" Version="10.0.0" />
                    
Directory.Packages.props
<PackageReference Include="LinkSoft.WordTemplateToPdf" />
                    
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 LinkSoft.WordTemplateToPdf --version 10.0.0
                    
#r "nuget: LinkSoft.WordTemplateToPdf, 10.0.0"
                    
#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 LinkSoft.WordTemplateToPdf@10.0.0
                    
#: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=LinkSoft.WordTemplateToPdf&version=10.0.0
                    
Install as a Cake Addin
#tool nuget:?package=LinkSoft.WordTemplateToPdf&version=10.0.0
                    
Install as a Cake Tool

The purpose of this package is to fill DOCX templates from JSON data and convert the generated document to PDF using LibreOffice headless mode.

The package targets the repository-wide .NET version configured in common/common.props (net9.0).

Configuration:

using LinkSoft.WordTemplateToPdf;

var converter = new WordTemplateToPdfConverter(new WordTemplateToPdfConverterOptions
{
    // Required. Output and LibreOffice working files are created here.
    TemporaryFolderPath = "/var/tmp/linksoft-documents",

    // Optional. If omitted, `libreoffice` is expected to be available in PATH.
    LibreOfficePath = "/usr/bin/libreoffice"
});

Usage:

var result = await converter.ConvertAsync(
    docxFileName: "contract.docx",
    jsonFileName: "contract-data.json");

Console.WriteLine(result.PdfPath);

The DOCX file name and JSON file name are supplied for every conversion run. Relative names are resolved from TemporaryFolderPath first and then from the current working directory; rooted paths are used as-is. The JSON root must be an object. Property names map directly to template placeholders without brackets.

Output files are written directly into TemporaryFolderPath as NEW_<docx file name> and NEW_<docx file name without extension>.pdf.

{
  "CustomerName": "Jane Doe",
  "ContractNumber": "C-2026-0001",
  "Amount": 123.45
}

Templates must use [[Name]] placeholders. For example, the JSON property Name fills the Word placeholder [[Name]].

This package is a part of larger set of packages for LinkSoft Technologies shared open source repository.

You can find the repository on GitHub.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
10.0.0 99 9/15/2026
9.1.7 137 6/12/2026

Initial Word template to PDF converter.