A .docx someone made in Word stays the design; your code supplies the values. Placeholders take single values, collection parameters fill repeating table rows, and the same service converts the result to PDF.
The interfaces below are the part that does not change when you swap the library underneath. Each provider then adds whatever extras its own library exposes.
WordTemplateInput carries the document and two dictionaries: one for single values, one for collections that expand into table rows.
Convert a generated document to PDF or another format through the same service — no second library for the signing copy.
Append an addendum, a set of terms or a cover page by merging several template inputs into one document.
Pull plain text or embedded images back out, for indexing or for migrating content off old documents.
Install the one that fits your runtime and licensing, and name it once at registration. Every package here is published on nuget.org.
The provider appears where the concrete class is constructed, and nowhere else. Always-current samples live in the package documentation.
// A .docx template plus values. Collection parameters fill repeating table rows.
IWordService word = new Regira.Office.Word.Spire.WordManager();
IMemoryFile contract = await word.Create(new WordTemplateInput
{
Template = template,
GlobalParameters = new Dictionary<string, object>
{
["ClientName"] = client.Name,
["StartDate"] = start.ToString("d")
}
});
// Same service converts and merges.
IMemoryFile pdf = await word.Convert(new WordTemplateInput { Template = contract }, FileFormat.Pdf);Create a Word document from a template, extract plain text, merge documents and convert between DOCX and PDF over HTTP.
The free tier needs no key and is rate-limited to 5 requests / 60 s. A trial or commercial key removes the limit — send it in the X-License-Key header.