Class DocumentFontsSubsystem

Class DocumentFontsSubsystem

A név: Aspose.Note.Fonts Összefoglaló: Aspose.Note.dll (25.4.0)

Könnyű végrehajtás a Aspose.Note.FontsSubsystem. Retrieves System.Drawing.FoontFamily objektum az operációs rendszerből.

public class DocumentFontsSubsystem : FontsSubsystem, IFontsSubsystem

Inheritance

object FontsSubsystem DocumentFontsSubsystem

Implements

IFontsSubsystem

Örökletes tagok

FontsSubsystem.AddFontSubstitution(string, string) , FontsSubsystem.AddFont(Stream, string) , FontsSubsystem.AddFont(Stream) , FontsSubsystem.AddFont(string) , FontsSubsystem.LoadFontsFromFolder(string) , FontsSubsystem.GetFontFamily(string) , FontsSubsystem.TranslateFontName(string) , FontsSubsystem.FetchFontFamily(string) , FontsSubsystem.FindFontFamilyInInternalCollection(string) , FontsSubsystem.DefaultFont , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Megmutatja, hogyan kell menteni egy dokumentumot PDF formátumban a megadott alapértelmezett betűtípus segítségével.

// 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")
                                                                                                         });

Megmutatja, hogyan lehet menteni egy dokumentumot pdf formátumban az alapértelmezett betűtípus használatával a fájlból.

// 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)
                                                                                                               });

Megmutatja, hogyan lehet menteni egy dokumentumot pdf formátumban az alapértelmezett betűtípus használatával egy áramlatból.

// 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 + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromStream_out.pdf";

                                                                                       using (var stream = File.Open(fontFile, FileMode.Open, FileAccess.Read, FileShare.Read))
                                                                                       {
                                                                                           oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                                     {
                                                                                                                         FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromStream(stream)
                                                                                                                     });
                                                                                       }

Constructors

DocumentFontsSubsystem(Stream, Szótár <string, string="">)

Kezdődik egy új példány a Aspose.Note.Fonts.DocumentFonsSubsystem osztály.

public DocumentFontsSubsystem(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontStream Stream

A default font.

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

DocumentFontsSubsystem(string, szótár <string, string="">)

Kezdődik egy új példány a Aspose.Note.Fonts.DocumentFonsSubsystem osztály.

public DocumentFontsSubsystem(string defaultFontFile, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontFile string

A default font.

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

DocumentFontsSubsystem(Szótár <string, string="">)

Kezdődik egy új példány a Aspose.Note.Fonts.DocumentFonsSubsystem osztály.

public DocumentFontsSubsystem(Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

Properties

Default

Megkapja vagy beállítja a statikus default példát.

public static DocumentFontsSubsystem Default { get; set; }

ingatlan értéke

DocumentFontsSubsystem

Methods

FetchFontFamily(A string)

Fetches font család jelöltként GetFontFamily.

protected override FontFamily FetchFontFamily(string fontName)

Parameters

fontName string

A font neve.

Returns

FontFamily

A rendszer.Drawing.FontFamily

UsingDefaultFont(string, szótár <string, string="">)

Hozzon létre egy új DocumentFontsSubsystem példát az alapértelmezett betűtípus nevével.

public static DocumentFontsSubsystem UsingDefaultFont(string defaultFontName, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontName string

Az alapértelmezett font neve.

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

Returns

DocumentFontsSubsystem

A Aspose.Note.Fonts.DocumentFonsSubsystem rendszer.

Examples

Megmutatja, hogyan kell menteni egy dokumentumot PDF formátumban a megadott alapértelmezett betűtípus segítségével.

// 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")
                                                                                                         });

UsingDefaultFontFromFile(string, szótár <string, string="">)

Hozzon létre egy új DocumentFontsSubsystem példát az alapértelmezett fájlból származó betűtípus használatával.

public static DocumentFontsSubsystem UsingDefaultFontFromFile(string filePath, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

filePath string

Az alapértelmezett font nevét tartalmazó fájl.

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

Returns

DocumentFontsSubsystem

A Aspose.Note.Fonts.DocumentFonsSubsystem rendszer.

Examples

Megmutatja, hogyan lehet menteni egy dokumentumot pdf formátumban az alapértelmezett betűtípus használatával a fájlból.

// 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)
                                                                                                               });

UsingDefaultFontFromStream(Stream, Szótár <string, string="">)

Hozzon létre egy új DocumentFontsSubsystem példát egy betűtípus használatával a meghatározott áramlat alapértelmezett.

public static DocumentFontsSubsystem UsingDefaultFontFromStream(Stream defaultFontStream, Dictionary<string, string=""> fontsSubstitutions = null)

Parameters

defaultFontStream Stream

Az áram az alapértelmezett betűtípus nevét tartalmazza.

fontsSubstitutions Dictionary < string , string >

A fontok helyettesítése.

Returns

DocumentFontsSubsystem

A Aspose.Note.Fonts.DocumentFonsSubsystem rendszer.

Examples

Megmutatja, hogyan lehet menteni egy dokumentumot pdf formátumban az alapértelmezett betűtípus használatával egy áramlatból.

// 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 + "SaveUsingDocumentFontsSubsystemWithDefaultFontFromStream_out.pdf";

                                                                                       using (var stream = File.Open(fontFile, FileMode.Open, FileAccess.Read, FileShare.Read))
                                                                                       {
                                                                                           oneFile.Save(dataDir, new PdfSaveOptions()
                                                                                                                     {
                                                                                                                         FontsSubsystem = DocumentFontsSubsystem.UsingDefaultFontFromStream(stream)
                                                                                                                     });
                                                                                       }

</string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,>

 Magyar