Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created April 20, 2023 13:08
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/1349c788ff1285f91ddcab5fc0bd8171 to your computer and use it in GitHub Desktop.
Save bjoerntx/1349c788ff1285f91ddcab5fc0bd8171 to your computer and use it in GitHub Desktop.
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) {
tx.Create();
tx.Load("invoice-template.tx", TXTextControl.StreamType.InternalUnicodeFormat);
using (MailMerge mailMerge = new MailMerge()) {
mailMerge.TextComponent = tx;
mailMerge.MergeObjects(invoices, false);
}
tx.Save("results.pdf", TXTextControl.StreamType.AdobePDF);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment