Hello,
I am using GemBox.Document version 35.0.1946 for a large project. I am aware that newer versions are available, but this version has worked flawlessly on Windows 11 until now. However, a Windows update in recent weeks appears to have caused the document preview to stop working, throwing a System.IO.FileFormatException.
The error message states that the file “file:///C:/WINDOWS/FONTS/calibrib.ttf” does not comply with the expected file format specification. It seems, therefore, that the GemBox document preview is now having an issue with TTF font files.
Before I start upgrading to a newer version of GemBox.Document, I would like to know if the error described above is a known issue and if it does not occur in the more recent versions of GemBox.Document—especially since the problem only surfaced following one of the recent Windows updates.
I just tried it with the latest GemBox.Document version (2026.8.113) and am getting the same error.
The error is triggered when calling DocumentModel.ConvertToXpsDocument(GemBox.Document.SaveOptions.XpsDefault). This call is intended to generate an XpsDocument for displaying the document in the WPFDocumentView.
Note that this is a hidden (unlisted) version. To install it, you’ll need to run the above command on the NuGet Package Manager Console (Tools → NuGet Package Manager → Package Manager Console).
Thanks for the quick response. I’ve since used the issue with DocumentModel.ConvertToXpsDocument as an opportunity to switch to WebView2 so I can preview my GemBox documents in my WinForms project. This allowed me to bypass the use of DocumentModel.ConvertToXpsDocument and also eliminate the need to embed WpfDocumentView within a WinForms application.
However, this tip might be helpful to other users.