Print Manager Occasionaly throwing exceptions

Print Manager Occasionaly throwing exceptions

Forum member · Mar 15, 2013
Hi there, I wonder if anyone can help me. Occasionally when trying to load a system font using: ceTe.DynamicPDF.Font.LoadSystemFont(font.Name) I get an "Object reference not set to an instance of an object." error. The thing is 'font' does have a value, and even when I manually type the text in I get the same error: Font.LoadSystemFont("Microsoft Sans Serif")' threw an exception of type 'System.NullReferenceException' ceTe.DynamicPDF.Font {System.NullReferenceException} 99% of the time the call works fine, and the error will only ever happen on the first call of the application life-cycle, once it's been called it works perfectly from then on. Once the error is thrown all subsequent calls fail. The method is being called by a multi-threaded application, perhaps I need to lock the resource when loading the font?

Re: Print Manager Occasionaly throwing exceptions

Support · Mar 15, 2013
Hello, Please try locking the resource when loading the font as you have suggested. If that does not resolve the issue, email us [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] the following info so we can look into it further. 1. Exception message and the entire stack trace. 2. Version & build number of DynamicPDF dll used. 3. More details about your application. Thanks, ceTe Software Support Team.