Skip to content

Latest commit

 

History

History

EmbedFonts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Embed PDF fonts in C# and VB.NET

This sample shows how to embed fonts in a PDF document using Docotic.Pdf library.

Use the PdfFont.Embed method to embed a font in a PDF document. By default, this method uses SystemFontLoader to load bytes for TrueType/OpenType fonts.

This sample shows how to embed TrueType font bytes using fonts from a custom directory.

Embedding of PDF fonts is useful when you need to:

  • Display or print a PDF document consistently on any devices.
  • Fix an existing PDF document with non-embedded fonts.
  • Replace an existing PDF font subset with a full font to use in editable form fields.
  • Produce a PDF/A document.

Note that embedding of PDF fonts can significantly increase an output file size.

See also