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: ObjectFontInformation
Licensing Info
This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
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. |
Encoding | Gets the encoding of the font. |
Name | Gets the name of the font. |
Subset | Returns true if the font is subsetted otherwise false. |
Type | Gets the FontType of the font. |
Methods
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |