i have an issue using this code below to convert xml content to pdf.
- Code: Select all
using MemoryStream readMs = new(File.ReadAllBytes("RC_SDI8384254279.xml"));
using MemoryStream writeMs = new();
Document document = new();
document.LoadFromStream(readMs, FileFormat.);
if (document.IsContainMacro)
{
document.ClearMacros();
}
ToPdfParameterList pdfParameterList = new()
{
IsEmbeddedAllFonts = true,
DisableLink = true
};
document.SaveToFile("c:\\temp\\pdf.pdf", pdfParameterList);
The exception retrieved by the code is "NotSupportedException".
- Code: Select all
System.NotSupportedException: The file format cannot be supported.
at Spire.Doc.Document.LoadFromStream(Stream stream, FileFormat fileFormat, String password)
at Spire.Doc.Document.LoadFromStream(Stream stream, FileFormat fileFormat)
I attached the xml file used by our test.
Can you help me please or let me know if the librariy doen't support this kind of conversion?