Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 22, 2022 21:13
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/7275f1558965f04a8139dc7d3f9dfb7f to your computer and use it in GitHub Desktop.
Save bjoerntx/7275f1558965f04a8139dc7d3f9dfb7f to your computer and use it in GitHub Desktop.
textControl1.Load("block_toc_template.tx", TXTextControl.StreamType.InternalUnicodeFormat);
using (TXTextControl.DocumentServer.MailMerge mm =
new TXTextControl.DocumentServer.MailMerge()) {
mm.TextComponent = textControl1;
mm.MergeJsonData(System.IO.File.ReadAllText("data.json"));
}
foreach (TXTextControl.TableOfContents toc in textControl1.TablesOfContents) {
toc.Update();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment