Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created December 5, 2019 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/ef269cdb31fdb2ef68446de396b6a51d to your computer and use it in GitHub Desktop.
Save bjoerntx/ef269cdb31fdb2ef68446de396b6a51d to your computer and use it in GitHub Desktop.
textControl1.Load("template.tx", TXTextControl.StreamType.InternalUnicodeFormat);
string data = System.IO.File.ReadAllText("data.json");
using (TXTextControl.DocumentServer.MailMerge mailMerge = new TXTextControl.DocumentServer.MailMerge())
{
mailMerge.TextComponent = textControl1;
mailMerge.RemoveEmptyLines = true;
mailMerge.MergeJsonData(data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment