Need More Info
Last Updated: 23 Jan 2025 16:21 by gerry

As Ghiath reported in the forum thread, I am seeing this same error.

I am using RadFixedDocument and am generating a PdfFormatProvider. As Ghiath mentioned it will work fine (weeks, months) and then it seems the the font file is locked and it cannot export.

System.IO.IOException: I/O error when opening file 'C:\WINDOWS\FONTS\MSYH.TTC'.

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.IOException: I/O error when opening file 'C:\WINDOWS\FONTS\MSYH.TTC'.
   at MS.Internal.FontCache.FileMapping.OpenFile(String fileName)
   at MS.Internal.FontCache.FontSource.GetUnmanagedStream()
   at System.Windows.Media.GlyphTypeface.ComputeSubset(ICollection`1 glyphs)
   at Telerik.Windows.Documents.Fixed.Model.Fonts.CidType2Font.ComputeSubset(IEnumerable`1 usedCharacters)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontStream.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontStream.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.CreateFontFile(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.ExportFontFile(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.FontDescriptor.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.CidFontObject.CopyPropertiesFrom(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.Fonts.Type0FontObject.CopyPropertiesFromOverride(IPdfExportContext context, FontBase font)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.WriteFontsFromContext(PdfWriter writer, IPdfExportContext context)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.Export(IRadFixedDocumentExportContext context, Stream output)
   at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFixedDocument document, Stream output)
   at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
 

It will throw the exception on the line where it is doing the export. The document is typically a multi-page document with images, etc. As I mentioned it might work fine for weeks and then once it fails the only solution is to recycle the web service.