Hi Aspose team,
I have weird situation - when I try to open OneNote document on development machine all works ok but when I copy same code to deployment server (this is Web application) and try to load same document I am getting error:
InnerException: System.ArgumentException: Unable to set provided font as default Parameter name: defaultFontName at Aspose.Note.Fonts.FontsSubsystem.(String , Dictionary2 ) at Aspose.Note.Fonts.FontsSubsystem..ctor(Stream defaultFont, Dictionary
2 fontsSubstitutions) at ??..ctor(Stream ) at ??..ctor() at ??..cctor()
Message: The type initializer for ‘??’ threw an exception.
Source: Aspose.Note
StackTrace: at Aspose.Note.Page…ctor(Document document) at ??.???() at ??.???() at ??.() at ??.???() at ??.(Stream , Document , LoadOptions ) at Aspose.Note.Document.(String , LoadOptions ) at Aspose.Note.Document…ctor(String filePath, LoadOptions loadOptions) at Application.Processor.Controllers.OneNoteToPDFController.d__0.MoveNext() in C:_Projects\Application\App.Processor\Controllers\OneNoteToPDFController.cs:line 64
Code is very simple: Document wb = new Document(uploadFolder + @"" + fileNameOld, new LoadOptions() { LoadHistory = false });
but unfortunately I cannot share project as most likely on your computers it will work anyway.
What might be a root cause/difference between my computer and server? Obviously something with fonts but any idea how to resolve that?
Btw. I use Aspose.Note 20.3 version.
P.S. I tried also without LoadOptions and had the same problem.
Thanks,
Oliver