Created
December 28, 2023 14:51
-
-
Save bjoerntx/baa2897f3a2012f55e0ddddd64d15eb5 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
string xmlZugferd = xRechnung.CreateXML(); | |
// load Xml file | |
string metaData = File.ReadAllText("metadata.xml"); | |
TXTextControl.SaveSettings saveSettings = new TXTextControl.SaveSettings(); | |
// create a new embedded file | |
var zugferdInvoice = new TXTextControl.EmbeddedFile( | |
"ZUGFeRD-invoice.xml", | |
Encoding.UTF8.GetBytes(xmlZugferd), | |
metaData); | |
zugferdInvoice.Description = "ZUGFeRD-invoice"; | |
zugferdInvoice.Relationship = "Alternative"; | |
zugferdInvoice.MIMEType = "application/xml"; | |
zugferdInvoice.LastModificationDate = DateTime.Now; | |
// set the embedded files | |
saveSettings.EmbeddedFiles = new TXTextControl.EmbeddedFile[] { zugferdInvoice }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment