Templater has a minimal interface API, but a large feature set. A lot of examples are explained in detail at Github examples

Change log

Templater is a mature product with over 10 years of development. Detailed list of changes is available in the change log


Templater installation is done in two simple steps:

  1. Grab the latest copy of Templater library
  2. Include it in your project…

…or just use it through package managers such as Maven and Nuget

Code sample

using NGS.Templater;

class Program
    static void Main(string[] args)
        using (var document = Configuration.Factory.Open("Spreadsheet.xlsx"))
            document.Process(new { Teacher = "Cooper", Age = 39 });
            document.Process(new [] {
                new { Name = "Joshua" },
                new { Name = "Aaron" },
                new { Name = "Carlos" },
                new { Name = "Gabriel" }
import hr.ngs.templater.*;

class Program {
    static void main(String[] args) {
        try(FileInputStream fis = new FileInputStream("Template.docx");
            FileOutputStream fos = new FileOutputStream("Result.docx");
            TemplateDocument document = Configuration.factory().open(fis, "docx", fos)) {
                document.process(new Object() { public final String Tag = "a cast"; });
import hr.ngs.templater.*

object Program {
  case class Student(Name: String)
  def main(args: Array[String]) {
    val document ="Presentation.pptx")
    document.process(new { val Teacher = "Cooper"; val Age = "39" })

Full documentation

There are only a few methods that you need to use in order to start processing your templates

method IDocumentFactory.Open
Use the Open method to load your template.
Open(string path)
  • opens a document from the specified path
  • Templater will recognize the appropriate document format from the file extension
Open(Stream input, string extension, Stream output, CancellationToken cancelToken)
  • opens a document from the input stream
  • the extension string indicates the type of document in the stream
  • writes the document to the output stream
  • cancellation token to cancel the processing
Returns ITemplateDocument
method ITemplateDocument.Process
Method Process will replace tags with corresponding data.
  • modifies the ITemplateDocument file or stream by replacing tags with rules according to specific data types
Returns ITemplateDocument



User manual

More information about how Templater works is available in the PDF documentation

Readme can also be found in quick (zip) download.


Javadoc is available here.