Loading custom fonts for documents.

Since 21.5 you are now able to generate preview for documents using custom fonts. In order to realize this opportunity FontDirectories option has been added to LoadOptions class.

You can now try this feature by using code sample given below:

using (Annotator annotator = new Annotator(fs, new LoadOptions { FontDirectories = new List<string> { $"D:/fonts" } }))
    PreviewOptions previewOptions = new PreviewOptions(pageNumber =>
        var pagePath = $"D:/result_{pageNumber}.png";
        return File.Create(pagePath);


More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to annotate your PDF, DOC or DOCX, XLS or XLSX, PPT or PPTX, PNG and other documents with free to use online GroupDocs Annotation App.