Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created December 28, 2023 14:52
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/0097bfb1f7ec981ea37649eff46d1a6e to your computer and use it in GitHub Desktop.
Save bjoerntx/0097bfb1f7ec981ea37649eff46d1a6e to your computer and use it in GitHub Desktop.
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl())
{
tx.Create();
// load the document
tx.Load("template.tx", TXTextControl.StreamType.InternalUnicodeFormat);
// merge the data
using (MailMerge mm = new MailMerge())
{
mm.TextComponent = tx;
mm.MergeObject(xRechnung);
}
// save the document
tx.Save("test.pdf", TXTextControl.StreamType.AdobePDFA, saveSettings);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment