Load custom fonts

GroupDocs.Comparison allows you to compare documents whose content has non-standard fonts.

The following are the steps to connect custom fonts and compare documents:

  • Instantiate LoadOptions object and provide a list of directories for custom fonts;
  • Instantiate Comparer object with source document path or stream and LoadOptions object created at previous step;
  • Call Add method and specify target document path or stream;
  • Call Comparer method.

The following code sample shows how to connect custom fonts and compare documents.

// Instantiate the LoadOptions object and create a list of custom font directories.
LoadOptions loadOptions = new LoadOptions();
loadOptions.FontDirectories.Add("./fontPath/");
 
using (Comparer comparer = new Comparer("source.docx", loadOptions))
{
    comparer.Add("target.docx");
    comparer.Compare("result.docx");
}

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 compare your DOC or DOCX, XLS or XLSX, PPT or PPTX, PDF, EML, EMLX, MSG and other documents with free to use online GroupDocs Comparison App.