Load Note document with options

GroupDocs.Conversion provides NoteLoadOptions to give you control over how source Note document will be processed. The following options could be set:

  • DefaultFont - default font for Note document. The specified font will be used if a font is missing. An absolute path to font file must be provided.
  • FontSubstitutes - substitutes specific fonts from the Note document
  • Password - password to unlock protected document

Set Default Font

GroupDocs.Conversion for .NET allows you to set a default font name when a font is not available in the document. You can use DefaultFont property of NoteLoadOptions class to set the default font name. In case DefaultFont is not set the Times New Roman font will be used. The following code snippet shows how to set a default font name when converting from PDF into to wordprocessing document:

Contracts.Func<LoadOptions> getLoadOptions = () => new NoteLoadOptions
{
    DefaultFont = "Helvetica"
};
using (Converter converter = new Converter("sample.one", getLoadOptions))
{
    WordProcessingConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}

Specify font substitution

The following code sample shows how to convert Note document and specify font substitution for missing fonts:

Contracts.Func<LoadOptions> getLoadOptions = () => new NoteLoadOptions
{
    FontSubstitutes = new List<FontSubstitute>
    {
        FontSubstitute.Create("Tahoma", "Arial"),
        FontSubstitute.Create("Times New Roman", "Arial"),
    }
};
using (Converter converter = new Converter("sample.one", getLoadOptions))
{
    PdfConvertOptions options = new PdfConvertOptions();
    converter.Convert("converted.pdf", options);
}