Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active July 24, 2020 09:18
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/4748820505a9add5861509172e07abdb to your computer and use it in GitHub Desktop.
Save bjoerntx/4748820505a9add5861509172e07abdb to your computer and use it in GitHub Desktop.
var sData = File.ReadAllText("data.xml");
TXTextControl.EmbeddedFile file = new TXTextControl.EmbeddedFile("data.xml", sData, "") {
MIMEType = "text/xml",
RelationShip = "Alternative"
};
TXTextControl.SaveSettings saveSettings = new TXTextControl.SaveSettings() {
EmbeddedFiles = new TXTextControl.EmbeddedFile[] { file }
};
textControl1.Save("myinvoice.pdf",
TXTextControl.StreamType.AdobePDFA,
saveSettings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment