DocumentFontsSubsystem.UsingDefaultFont

DocumentFontsSubsystem.UsingDefaultFont method

Create new DocumentFontsSubsystem instance using specified default font name.

public static DocumentFontsSubsystem UsingDefaultFont(string defaultFontName, 
    Dictionary<string, string> fontsSubstitutions = null)
ParameterTypeDescription
defaultFontNameStringThe default font name.
fontsSubstitutionsDictionary`2The fonts substitutions.

Return Value

The DocumentFontsSubsystem.

Examples

Shows how to save a document in pdf format using specified default font.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));

// Save the document as PDF
dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontName_out.pdf";
oneFile.Save(dataDir, new PdfSaveOptions() 
                      {
                          FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFont("Times New Roman")
                      });

See Also