ExcelToPdfCUnicodeOptionsDetectFontsDirectory Property |
Allows to specify type of finding *.tff files. This is necessary to insert Unicode inside PDF. Default value:
Auto Namespace: SautinSoftAssembly: SautinSoft.ExcelToPdf (in SautinSoft.ExcelToPdf.dll) Version: 2024.11.30
Syntax
Remarks
Default value:
Auto
Possible values:
Auto - First tries to find the "Windows\Fonts" directory and in case of failure uses the directory from
FontsDirectory property.
In case of success finding directory "Windows\Fonts" the component will not search *.tff in Custom directory specified in
FontsDirectory. Therefore some *.ttf files located in custom directory can be missed.
NotDetect - Unicode is disabled. Doesn't make any tries of reading HDD to find *.ttf files.
Custom - Doesn't try to find the "Windows\Fonts" directory and uses only the directory from
FontsDirectory property to find all .ttf files.
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.
ExampleSautinSoft.ExcelToPdf p = new SautinSoft.ExcelToPdf();
p.UnicodeOptions.DetectFontsDirectory = SautinSoft.ExcelToPdf.CUnicodeOptions.eUnicodeDetectFontsDirectory.Custom;
p.UnicodeOptions.FontsDirectory = Path.Combine(Server.MapPath(""), @"Fonts\");
Dim p As New SautinSoft.ExcelToPdf()
p.UnicodeOptions.DetectFontsDirectory = SautinSoft.ExcelToPdf.CUnicodeOptions.eUnicodeDetectFontsDirectory.Custom
p.UnicodeOptions.FontsDirectory = Path.Combine(Server.MapPath(""), "Fonts\")
See Also