I found an internal "System.InvalidOperationException: Unknown boolex value." exception when my code call method "SaveToStream" of Spire.Doc.Document class.
this is my code:
- Code: Select all
string filename = @"bug01.doc";
using (FileStream readMs = File.OpenRead(filename))
using (FileStream writeMs = File.OpenWrite($"{filename}.pdf"))
using (Document document = new Document())
{
document.LoadFromStream(readMs, FileFormat.Auto);
if (document.IsContainMacro)
{
document.ClearMacros();
}
ToPdfParameterList pdfParameterList = new ToPdfParameterList()
{
IsEmbeddedAllFonts = false,
DisableLink = true
};
document.SaveToStream(writeMs, pdfParameterList);
}
and this is the error message :
System.InvalidOperationException: Unknown boolex value.
at spr诋.㥙(Object A_0)
at spr诋.㥙(AttrCollection A_0, Int32 A_1)
The code use the latest version of Spire.Officefor.NETStandard 9.5.0. I can't share the document for a GDPR policy, but I can send you if you provide me a safer way.
Regards
Fabrizio