Skip to main content

FontInformation

Version: 11.0

cete.dynamicpdf.merger.fontinformation

FontInformation​

Represents the font information present in a PDF document, this class is used to get the font file name, encoding, embed and font type information.

public class FontInformation
Public Class FontInformation

Inheritance: Object → FontInformation

Examples​

The following example shows accessing the font information from a PDF document.

Imports ceTe.DynamicPDF.Merger

Module Examples

Sub GetFontInformation() 'Create a PdfdDocument object using the source pdf document
Dim PdfDocument As PdfDocument = New PdfDocument(@"Source.pdf") 'Get the font information from the pdfDocument
Dim fontInformation As FontInformation() = PdfDocument.GetFonts()
'Access the font specific details using FontInformation Dim info As FontInformation = fontInformation(0)
'Get the font name Dim fontName As String = info.Name
'Gets true if the font is subset embedded Dim isSubset As Boolean = info.Subset
'Gets true if the font is fully embedded Dim isEmbed As Boolean = info.Embed
End Sub
End Module
using ceTe.DynamicPDF.Merger;

class Examples
{
public static void GetFontInformation()
{
// Create a PdfdDocument object using the source pdf document
PdfDocument pdfDocument = new PdfDocument(@"Source.pdf");

// Get the font information from the pdfDocument
FontInformation[] fontInformation = pdfDocument.GetFonts();

// Access the font specific details using FontInformation
FontInformation info = fontInformation[0];

// Get the font name
string fontName = info.Name;

// Gets true if the font is subset embedded
bool isSubset = info.Subset;

// Gets true if the font is fully embedded
bool isEmbed = info.Embed;
}
}

Properties​

Embed​

Returns true if the font is embeded otherwise false.

public bool Embed { get; }
Public Property Embed As Boolean

Property Value​

Boolean

Encoding​

Gets the encoding of the font.

public string Encoding { get; }
Public Property Encoding As String

Property Value​

String

Name​

Gets the name of the font.

public string Name { get; }
Public Property Name As String

Property Value​

String

Subset​

Returns true if the font is subsetted otherwise false.

public bool Subset { get; }
Public Property Subset As Boolean

Property Value​

Boolean

Type​

Gets the FontType of the font.

public FontType Type { get; }
Public Property Type As FontType

Property Value​

FontType

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.Merger