Problem: After migrating a stable system from Win 2008 to Win 2012, ABCPDF is not able to subset fonts correctly. We suspect a Windows permissions issue but do not know what or how to fix.
Background: We have enjoyed the use of ABCPDF for many years on a that has just been migrated from Win 2008 R2 to Win 2012 R2 Datacenter. We use ActiveX DLL's - yes we want to replace them but that is out of scope for now. Current ABCPDF level is ABCPDF 8.1. The dll's run under COM manager and have a specific run-as identity set to avoid the common access issues experienced when running as Network Svc or System accounts.
Our app uses the custom font files meaning we do not rely on the fonts being installed under windows. We use the Windows API call
AddFontResourceEx(font_path, FR_PRIVATE, &O0)
to load fonts into memory and run text measurement routines. This is proven to work because we generate a small bitmap with sample characters from the select font and the glyphs we see are correct. Conclusion is that the fonts are loaded via Windows API successfully. This is important because it informs us that the fonts are where they are expected to be and the run-as user account can access them.
Meanwhile we give the same font to ABCPDF via
oDoc.AddFont(font_path)
but the generated PDF does not include the glyphs of the specific font. Inspecting within Acrobat pro shows Times New Roman is being used.
All works fine on old Win2008 installation. Since moving to Win 2012 R2 we have this issue.
Conclusion: the DLL code can access the font under Win API, but ABCPDF cannot. Suspect some permissions change in Windows 2012. Help?
When we installed ABCPDF it was installed as a user who was not an Administrator. Solution was to uninstall then follow the advise on Websupergoo website which is to install with Run-As Administrator.