[]
        
(Showing Draft Content)

Adjust Font Embedding

By default, font subsets containing just the glyphs used in the document are embedded. However, fully embedding fonts can significantly increase memory usage. DsPdf provides the flexibility of allowing you to choose which fonts to embed.

If needed, you can embed whole fonts (which may result in huge file sizes, so be careful) or to not embed fonts at all (which is usually also not recommended). This is done by setting the FontEmbedMode property as NotEmbed. Refer to the code snippet below.

var doc = new GcPdfDocument();
doc.FontEmbedMode = FontEmbedMode.NotEmbed;

Limitations

  • Fonts that aren’t embedded depend on the device’s installed fonts, which can mess up the layout, make the text ugly or hard to read, or create searchability and accessibility issues.

  • DsPdf will use Type0IdentityEncoding regardless of the user’s selection if a font is not embedded, as Acrobat Reader renders such PDFs with a lot of distortions.