PdfFont.Unembed Method

Removes font bytes from the PDF file.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)


public bool Unembed()
Public Function Unembed As Boolean

Return Value

Type: Boolean
true if font bytes were successfully removed; otherwise, false.


This method might fail to remove font bytes in the following cases:

  • The font is not embedded. For such fonts the Embedded property is false.
  • The font is used by one of form controls (PdfTextBox, PdfComboBox, etc.) and therefore can't be unembedded. A PDF reader might be unable to view or change text in a control if the control uses an unembedded font.
  • The font is a Type3 font. Type3 fonts cannot be unembedded by its nature.
  • PDF readers will not be able to load the font after unembedding.

It is not recommended to remove any font bytes if you plan to save the current document as a PDF/A document. PDF/A documents should have all used fonts embedded. Therefore, the library will try to embed all font bytes before producing a PDF/A.

See Also