DocumentFontsSubsystem.UsingDefaultFontFromFile
Contents
[
Hide
]DocumentFontsSubsystem.UsingDefaultFontFromFile method
Create new DocumentFontsSubsystem instance using a font from specified file as default.
public static DocumentFontsSubsystem UsingDefaultFontFromFile(string filePath,
Dictionary<string, string> fontsSubstitutions = null)
Parameter | Type | Description |
---|---|---|
filePath | String | The file containing default font name. |
fontsSubstitutions | Dictionary`2 | The fonts substitutions. |
Return Value
Examples
Shows how to save a document in pdf format using default font from a file.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fontFile = Path.Combine(dataDir, "geo_1.ttf");
// Load the document into Aspose.Note.
Document oneFile = new Document(Path.Combine(dataDir, "missing-font.one"));
// Save the document as PDF
dataDir = dataDir + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromFile_out.pdf";
oneFile.Save(dataDir, new PdfSaveOptions()
{
FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromFile(fontFile)
});
See Also
- class DocumentFontsSubsystem
- namespace Aspose.Note.Fonts
- assembly Aspose.Note