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
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" | |
xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#" | |
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" | |
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" | |
xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#" | |
rdf:about="" | |
> | |
<pdfaExtension:schemas> | |
<rdf:Bag> | |
<rdf:li rdf:parseType="Resource"> |
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
using TXTextControl; | |
SaveSettings saveSettings = new SaveSettings(); | |
var metaData = File.ReadAllText("metadata.xml"); | |
// byte array from the ZUGFeRD XML file | |
var zugferdXML = File.ReadAllBytes("yourzugferd.xml"); | |
// create a new embedded file |
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
using TXTextControl; | |
SaveSettings saveSettings = new SaveSettings(); | |
var metaData = File.ReadAllText("metadata.xml"); | |
// byte array from the ZUGFeRD XML file | |
var zugferdXML = File.ReadAllBytes("rechnung_206_4267_zugferdaddon.xml"); | |
// create a new embedded file |
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
[TestClass] | |
public class UnitTest1 | |
{ | |
[TestMethod] | |
public void TestConversion() | |
{ | |
string html = "<html><body><h1>Hello, World!</h1></body></html>"; | |
byte[] pdf = MyTextControlClassLibrary.DocumentProcessing.GeneratePDF(html); | |
Assert.IsNotNull(pdf); |
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
[TestMethod] | |
public void TestConversion() | |
{ | |
string html = "<html><body><h1>Hello, World!</h1></body></html>"; | |
byte[] pdf = MyTextControlClassLibrary.DocumentProcessing.GeneratePDF(html); | |
Assert.IsNotNull(pdf); | |
} |
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
namespace MyTextControlClassLibrary | |
{ | |
public static class DocumentProcessing | |
{ | |
static DocumentProcessing() { | |
TXTextControl.ServerTextControl.EntryAssembly = | |
typeof(DocumentProcessing).Assembly; | |
} | |
public static byte[] GeneratePDF(string html) |
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
TXTextControl.ServerTextControl.EntryAssembly = typeof(DocumentProcessing).Assembly; |
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
namespace MyTextControlClassLibrary | |
{ | |
public static class DocumentProcessing | |
{ | |
static DocumentProcessing() { | |
TXTextControl.ServerTextControl.EntryAssembly = | |
typeof(DocumentProcessing).Assembly; | |
} | |
public static byte[] GeneratePDF(string html) |
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
namespace MyTextControlClassLibrary | |
{ | |
public static class DocumentProcessing | |
{ | |
public static byte[] GeneratePDF(string html) | |
{ | |
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) | |
{ | |
byte[] data; |
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
using TXTextControl.DocumentServer.OfficeOpenXML; | |
// store the custom XML parts in a list | |
var docxFileContentNew = File.ReadAllBytes("modified.docx"); | |
var customXmlParts = CustomXMLHandler.Extract(docxFileContentNew); | |
using (TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl()) | |
{ | |
tx.Create(); | |
NewerOlder