Using ASP.NET PDF Web Viewer Control
How to show, display pdf file, and manage PDF web font resource in asp.net web application using c#
How to manage Adobe PDF font resource in asp.net pdf viewer component
PDF Font Management
RasterEdge SDK will process the PDF document font resources using the following order
Font resource embedded in the PDF document
Manual installed font resource
Runtime installed font resource
Windows system font resource "C:\Windows\Fonts\"
In following content, we will explain "Manual installed font resource" and "Runtime installed font resource"
Install Adobe fonts to system
Step 1: Install Adobe Reader DC to the a PC.
Website: https://get.adobe.com/reader/
Step 2: Move into the folder %Adobe Reader DC Install Folder%\Resource\Font\
Step 3: Install font files in the folder.
MinionPro-Regular.otf
MinionPro-Bold.otf
MinionPro-It.otf
MinionPro-BoldIt.otf
MyriadPro-Regular.otf
MyriadPro-Bold.otf
MyriadPro-It.otf
MyriadPro-BoldIt.otf
a. Copy font files in the above folder to the server system folder.
Eg. C:\Windows\Fonts\
or
b. Right click each *.otf file to open the menu, and then choose "Install" in the menu.
Install Adobe fonts in Runtime
Sample Code:
String fontFolder = @" C:\Program Files (x86)\Adobe\Acrobat Reader DC\Resource\Font\";
PrivateFontMgr handler = PrivateFontMgr.Handler;
// install Adobe font Minion Pro Regular
handler.InstallPrivateFont(new PrivateFontInfo("Minion Pro", FontStyle.Regular), fontFolder + "MinionPro-Regular.otf");
// install Adobe font Minion Pro Bold
handler.InstallPrivateFont(new PrivateFontInfo("Minion Pro", FontStyle.Bold), fontFolder + "MinionPro-Bold.otf");
// install Adobe font Minion Pro Italic
handler.InstallPrivateFont(new PrivateFontInfo("Minion Pro", FontStyle.Italic), fontFolder + "MinionPro-It.otf");
// install Adobe font Minion Pro Bold Italic
handler.InstallPrivateFont(new PrivateFontInfo("Minion Pro", FontStyle.Bold | FontStyle.Italic), fontFolder + "MinionPro-BoldIt.otf");
// install Adobe font Myriad Pro Regular
handler.InstallPrivateFont(new PrivateFontInfo("Myriad Pro", FontStyle.Regular), fontFolder + "MyriadPro-Regular.otf");
// install Adobe font Myriad Pro Bold
handler.InstallPrivateFont(new PrivateFontInfo("Myriad Pro", FontStyle.Bold), fontFolder + "MyriadPro-Bold.otf");
// install Adobe font Myriad Pro Italic
handler.InstallPrivateFont(new PrivateFontInfo("Myriad Pro", FontStyle.Italic), fontFolder + "MyriadPro-It.otf");
// install Adobe font Myriad Pro Bold Italic
handler.InstallPrivateFont(new PrivateFontInfo("Myriad Pro", FontStyle.Bold | FontStyle.Italic), fontFolder + "MyriadPro-BoldIt.otf");