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:

  • Font is not embedded. For such fonts the Embedded property is false.
  • 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.
  • Font is a Type3 font. Type3 fonts cannot be unembedded by its nature.
  • Current document will be saved as a PDF/A document. For such documents PdfDocument.SaveOptions.ProducePdfA property is true. PDF/A documents should have all used fonts embedded.

See Also