Click or drag to resize
Pdftools logo

FontOptions Class

The parameters for font optimization

Inheritance Hierarchy
SystemObject
  PdfTools.InternalNativeBase
    PdfTools.InternalNativeObject
      PdfTools.OptimizationFontOptions

Namespace: PdfTools.Optimization
Assembly: PdfTools (in PdfTools.dll) Version: 1.7.0+cfcc11b476b3e1eb4320f0f37269191f64e36bd8
Syntax
C#
public class FontOptions : NativeObject

The FontOptions type exposes the following members.

Properties
 NameDescription
Public propertyMerge

Whether to merge fonts and font programs

A PDF document can have the same font, or a subset of it, embedded multiple times. This commonly occurs, when multiple PDFs are merged into one large PDF. Such fonts can be merged into one font.

Merging fonts and font programs can greatly reduce the file size. However, it is computationally complex and can increase file processing time and memory usage substantially.

Default: .

Public propertyRemoveStandardFonts

Whether to remove standard fonts

Enable or disable un-embedding of the font programs of all embedded standard fonts, such as Arial, Courier, CourierNew, Helvetica, Symbol, Times, TimesNewRoman and ZapfDingbats. This decreases the file size.

The fonts are replaced with one of the 14 PDF Standard Fonts, all of which have no associated font program. A PDF viewer must be able to display these 14 PDF Standard Fonts correctly. Therefore, enabling this property usually does not visually alter the PDF when it is displayed.

Un-embedding the font works based on the font's Unicode information, i.e. the un-embedded font's characters are mapped to those of the original font with the same Unicode. Therefore, only fonts with Unicode information are un-embedded.

If a font's Unicode information is incorrect, un-embedding may lead to visual differences. The correctness of a Unicode information can be verified by extracting text that uses the font.

If the extracted text is meaningful, the font's Unicode information is correct, and un-embedding of the font does not cause visual differences.

Default: (disabled) except in the profile MinimalFileSize.

Top
Methods
 NameDescription
Public methodEquals
(Inherited from NativeObject)
Public methodGetHashCode
(Inherited from NativeObject)
Top
See Also