Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 22, 2020 10:01
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/4c346b5bd5b00846de1c9a6182d25296 to your computer and use it in GitHub Desktop.
Save bjoerntx/4c346b5bd5b00846de1c9a6182d25296 to your computer and use it in GitHub Desktop.
string sCDAData = System.IO.File.ReadAllText("004bb033-b948-4f4c-b5bf-a8dbd7d8dd40.xml");
TXTextControl.EmbeddedFile cdaAttachment =
new TXTextControl.EmbeddedFile(
"004bb033-b948-4f4c-b5bf-a8dbd7d8dd40.xml",
sCDAData,
null) {
Description = "CDA2 information",
Relationship = "Unspecified"
};
textControl1.DocumentSettings.EmbeddedFiles =
new TXTextControl.EmbeddedFile[] { cdaAttachment };
textControl1.Save("cover_letter.pdf", TXTextControl.StreamType.AdobePDFA);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment