Namespace: BitMiracle.Docotic.Pdf
public PdfCollection<PdfFont> RemoveUnusedFontGlyphs( IEnumerable<PdfFont> fonts )
Public Function RemoveUnusedFontGlyphs ( fonts As IEnumerable(Of PdfFont) ) As PdfCollection(Of PdfFont)
Exception | Condition |
---|---|
UnsupportedFontException | One of the fonts has unexpected structure. Please send us a PDF file for review. As a workaround, you can process individual fonts using RemoveUnusedGlyphs() method. |
This method might fail to remove unused glyphs in the following cases:
This method is useful for decreasing size of produced PDF documents. The method creates a font subsets with used glyphs only and embeds subsets in the current document.
A glyph is treated as used if the current document contains character drawn with the glyph.
This method does not remove unused glyphs from Type1 fonts.
Some PDF documents use a same font descriptor and font bytes in multiple fonts. In such cases, the call of this method for one of the fonts will also remove unused glyphs for all other fonts.