Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've searched in vain, off and on for several months, and still haven't found anyone else with this issue. Resolutions to similar issues aren't working for me or simply don't apply.

I have a web application written in Visual Studio.Net 2012 (C#/ASP.Net). The application pulls a small set of data from an Oracle table, and then uses Crystal Reports to throw that data onto a report page that is displayed by Adobe Acrobat within the browser. The Users then print out the individual Adobe Acrobat page as a 'coupon', and physically scans it into our document scanning system. This document scanning system DEMANDS a particular font, and here's the issue...Currently, the app is running in our production environment, and our User Acceptance Testing (UATest) environment. The Adobe Acrobat page is displaying a different font set for each web environment. On UATest, everything is displaying as it should. The font is OCR A Extended. It's a monospaced font that resembles the old Courier style. On our production system, it's displaying what looks like Arial? Microsoft Sans Serif? I have no idea, but whatever it is, our scanning system doesn't like it and won't accept it.

The situation is what it is. I can't alter the river flow at this point. That means I'm stuck with the current methodology. Automating the process so that the data goes from website into the data tables on scanner would be ideal, but that's not possible.

At this point, I've got my Users running the app from the UATest server. Not the most ideal solution, but it will have to hold until I find the fix for this.

Any help that anyone can give me would be greatly appreciated.

What I have tried:

Here's the technical stuff...

* The two web servers are both Windows Server 2012/R2.

* The IIS setup is identical for both applications on both web servers.

* I've synchronized all of the fonts and font settings on both web servers. They are exactly the same number and files for fonts on both machines.

* The application is internal to our department, and access to it is controlled through Active Directory. Not sure if that matters for this, but better to have too much info than not enough.

* The applications are identical, meaning that I've copied the entire application folder from the UATest machine where it displays the proper font, onto the Production machine where it doesn't.

* The font is set correctly and shows correctly in the Crystal Report creator on the development machine (my local machine used to code, compile, and deploy the app).

* The results are the same regardless of the browser used.

* I've gone into the Crystal Report, Right Clicked -> Design -> Default Settings -> Fonts Tab. And then set the default fonts to OCR A Extended for each possible object.
Posted
Comments
Richard Deeming 13-Mar-18 9:24am    
Have you restarted the production server since you installed the font?
DanielEvansJr 13-Mar-18 10:39am    
Thanks for the reply, Richard. No, I have not. I'm just a lowly Developer, not a SysAdmin. But I suppose I could have a restart scheduled. I'll reply back with the results.
Richard Deeming 13-Mar-18 10:41am    
I know from experience that IIS / ASP.NET doesn't pick up changes made to the installed fonts until you restart. :)
DanielEvansJr 16-Mar-18 11:27am    
Sweet fancy moses! That worked! System restart after-hours yesterday and today everything is showing like it should! Mr. Deeming, sir, I'm gifting you with good karma and I shall sacrifice one of my girlfriend's stuffed animals in your honor. Thank you!
Richard Deeming 16-Mar-18 11:30am    
I can't be held responsible for any relationship trauma caused by stuffed-animal sacrifice! :)

I'll post a solution to remove this from the "unanswered" list.

1 solution

As discussed in the comments, installing new fonts on a Windows server typically requires a restart.

Without a restart, only the current session is notified of the new font. Other sessions, such as ASP.NET, are not notified, and will not be able to use the new font.

It is sometimes possible to avoid a restart by calling AddFontResource[^] from code executing within the target session. But in my experience, you still need to at least restart IIS for the changes to get picked up.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900