Search Results for

    Show / Hide Table of Contents

    FlexCelPdfExport.GetFontFolder Event

    Use this event if you want to provide your own font information for embedding. Normally FlexCel will search for fonts on [System]\Fonts folder and %localappdata%\Microsoft\Windows\Fonts. If your fonts are in other location, you can tell FlexCel where they are here. If you prefer just to give FlexCel the full data on the font, you can use GetFontData event instead.

    Note that this property applies only to this object. To change the property for the full application, use PdfWriter.GetFontFolderGlobal

    Syntax

    Namespace: FlexCel.Render

    public GetFontFolderEventHandler GetFontFolder

    Examples

    The following code will setup a GetFontFolder event that searches for a font first in c:\MyFonts, and if the font isn't there, it will search in the default FlexCel search path:

        using (FlexCelPdfExport pdf = new FlexCelPdfExport(xls, true))
        {
            pdf.GetFontFolder += (sender, e) =>
            {
                e.FontPath = "c:\\MyFonts;" + e.FontPath;
            };
    
            pdf.Export("result.pdf");
        }
    

    See also

    • FlexCelPdfExport
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com