Here is some sample code:
Optimizer.OptimizerSettings optimizerSettings = new Optimizer.OptimizerSettings();
Optimizer.TextSettings textSettings = new Optimizer.TextSettings();
textSettings.EmbedFonts(true);
textSettings.SubsetFonts(false);
optimizerSettings.SetTextSettings(textSettings);
Optimizer.Optimize(pdf, optimizerSettings);
- The Optimizer currently doesn't allow full font embedding. All new fonts are subsetted.
- The Subset option applies only to existing embedded fonts. For example, if a PDF contains a huge font you can reduce it in file size with the subset option.
- EmbedFonts(true) can be used to embed missing fonts, however, as stated above, these fonts would be subsetted.