Hi, i have a problem with some code that loads our private fonts in to a XPrivateFontCollection
This code seems to work great, except on one of our webservers (hosted so i have no control over it) i get an exception:
Code:
System.TypeInitializationException: The type initializer for 'PdfSharp.Drawing.XPrivateFontCollection' threw an exception. ---> System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> <CrtImplementationDetails>.ModuleLoadException: The C++ module failed to load.
---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at clock()
at ?A0xe96b2b07.clock_wrapper()
at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* )
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
--- End of inner exception stack trace ---
at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* )
at .cctor()
--- End of inner exception stack trace ---
at PdfSharp.Drawing.XPrivateFontCollection..ctor()
at PdfSharp.Drawing.XPrivateFontCollection..cctor() in C:\Work\Projects From Outside\PDFsharp\code\PdfSharp\PdfSharp.Drawing\XPrivateFontCollection.cs:line 64
--- End of inner exception stack trace ---
at PdfSharp.Drawing.XPrivateFontCollection.get_Global()
at Distriplan.VerzekerdDoel.Reporting.FontHandlerBase.InternalAddPrivateFonts() in C:\Work\svn\VerzekerdDoel-trunk\src\Reporting\ReportGenerator\FontHandler.cs:line 28
the code that calls this:
Code:
XPrivateFontCollection globalFontCollection = XPrivateFontCollection.Global;
... followed by some code to actually add the fonts
This line was suggested in topic
http://forum.pdfsharp.net/viewtopic.php?f=2&t=1835any suggestion for how i can investigate / fix this further would be greatly appreciated.
kind regards,
Alain.