Click or drag to resize

ExcelToPdfCUnicodeOptionsFontsDirectory Property

Full local path to fonts directory (any folder with *.ttf files). Default value: "c:\windows\fonts\"

Namespace:  SautinSoft
Assembly:  SautinSoft.ExcelToPdf (in SautinSoft.ExcelToPdf.dll) Version: 2023.11.22
public string FontsDirectory { get; set; }

Property Value

Type: String
By default it's set to "c:\windows\fonts\"

Advice for developers who creates ASP.Net or Silverlight projects:

Some hosting providers disables any access to windows directories. For example, GoDaddy doesn't allow to read directory "Windows\Fonts".
We recommend to create own "Fonts" directory in your project and copy *.ttf files to it from "Windows\Fonts". You may copy only several fonts, but we recommend to put the font "Arial Unicode MS" - ARIALUNI.TTF anyway.

Dim p As New SautinSoft.ExcelToPdf()
p.UnicodeOptions.DetectFontsDirectory = SautinSoft.ExcelToPdf.CUnicodeOptions.eUnicodeDetectFontsDirectory.Custom
'p.UnicodeOptions.FontsDirectory = @"c:\windows\fonts\";
p.UnicodeOptions.FontsDirectory = Path.Combine(Server.MapPath(""), "Fonts\")
SautinSoft.ExcelToPdf p = new SautinSoft.ExcelToPdf();
p.UnicodeOptions.DetectFontsDirectory = SautinSoft.ExcelToPdf.CUnicodeOptions.eUnicodeDetectFontsDirectory.Custom;
//p.UnicodeOptions.FontsDirectory = @"c:\windows\fonts\";
p.UnicodeOptions.FontsDirectory = Path.Combine(Server.MapPath(""), @"Fonts\");
See Also