Created
December 22, 2022 09:42
-
-
Save bjoerntx/87b2905a7b1169077a746cfef3087ad7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) { | |
tx.Create(); | |
tx.Load("template.tx", TXTextControl.StreamType.InternalUnicodeFormat); | |
using (TXTextControl.DocumentServer.MailMerge mailMerge = new TXTextControl.DocumentServer.MailMerge()) { | |
mailMerge.TextComponent = tx; | |
var jsonData = System.IO.File.ReadAllText("data.json"); | |
mailMerge.MergeJsonData(jsonData); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment