A few years ago we had problems with customers who'd set their screen DPI > 100% getting improper font sizes on print outs. I started a thread on the old newsgroup and eventually got the answer. We had to make the program "DPI Aware" and then we had to check a ratio which had one value in XP and another in Vista and probably Windows 7 and then we had to add a factor into the conversion of screen resolution to printer resolution depending upon the answer. Everything worked until recently.
I'm starting to get reports from some Windows 8 users and Windows 10 users that unless they use 100% the printing is off again. At least Windows 10 uses 100% as the default and recommended setting but something has changed.
Has anyone been down this path in Windows 10? I can post the code that used to work if that would be helpful.
Screen Resolution and Printing
8 years 1 month ago #3336
Generally, screen DPI should not have effects of printing. Posting some code that exhibits the problem would be useful.
Windows 8.1 has introduced per-monitor dpi awareness and that is most likely the source of your problem. You have made your apps DPI-aware, but they are not per-monitor DPI aware. Adding following section in your app manifest will make app per-monitor DPI aware.
We'll check that out although I seriously doubt that any of our users have more than one monitor. We haven't been able to pin down the situation that is causing the problem. It doesn't seem to be every user of Windows 8.1 or 10, but we are definitely seeing some users have font size issues when printing if they set the screen dpi to something greater than 100%. We went looking for the code we used to fix a font scaling problem we had before we introduced dpi awareness and discovered that it was in a completely different part of our program and can not be the same problem we're seeing now. In fact, the new problem may only be happening with particular fonts. For example, New Times Roman may not be printing in the proper size when the screen dpi is 125% while other fonts are unaffected.
So ... we're beginning to think the problem could be in some individual True Type Fonts and not in our program at all. The fonts in question are in government forms that our application prints. The next time we get a report of this particular problem, we'll send the user a new version of the form that uses a different font and see if that fixes it.