-
-
Save bjoerntx/f149c3c2fc571fcfcfe9835addeb9b41 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
byte[] document; | |
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) { | |
tx.Create(); | |
tx.Load("App_Data/vaccination_form.tx", TXTextControl.StreamType.InternalUnicodeFormat); | |
using (TXTextControl.DocumentServer.MailMerge mm = | |
new TXTextControl.DocumentServer.MailMerge()) { | |
mm.TextComponent = tx; | |
mm.FormFieldMergeType = TXTextControl.DocumentServer.FormFieldMergeType.Preselect; | |
mm.RemoveEmptyFields = false; | |
// pre-select form fields with known data and merge | |
// data into merge fields | |
mm.MergeObject(data); | |
} | |
tx.Save(out document, TXTextControl.BinaryStreamType.InternalUnicodeFormat); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment