Fonts in IronPDF: Best Practices

Does IronPDF embed fonts?

All font (subsets) used inside your HTML are automatically embedded inside the PDF, assuming the Font embed property of the font is set to Editable. This ensures that the PDF is displayed with the same fonts, preventing any discrepancies.

Can IronPDF remove fonts?

Yes, IronPDF can remove fonts. Technically, it achieves this by unembedding the font. For more detailed instructions on how to manage and unembed fonts from PDFs, please visit the following How-to article: 'How to Manage Fonts in PDF'

// Example of code to unembed fonts from a PDF using IronPDF
using IronPdf;

// Load the existing PDF document
var pdf = PdfDocument.FromFile("existing-document.pdf");

// Remove fonts by unembedding them
pdf.UnembedAllFonts();

// Save the updated PDF document
pdf.SaveAs("document-without-embedded-fonts.pdf");
// Example of code to unembed fonts from a PDF using IronPDF
using IronPdf;

// Load the existing PDF document
var pdf = PdfDocument.FromFile("existing-document.pdf");

// Remove fonts by unembedding them
pdf.UnembedAllFonts();

// Save the updated PDF document
pdf.SaveAs("document-without-embedded-fonts.pdf");
' Example of code to unembed fonts from a PDF using IronPDF
Imports IronPdf

' Load the existing PDF document
Private pdf = PdfDocument.FromFile("existing-document.pdf")

' Remove fonts by unembedding them
pdf.UnembedAllFonts()

' Save the updated PDF document
pdf.SaveAs("document-without-embedded-fonts.pdf")
$vbLabelText   $csharpLabel

Can I embed an entire font in my PDF?

Yes, IronPDF allows you to embed fonts in your PDF documents. Embedding fonts ensures visual consistency, as the document will be displayed with the desired fonts regardless of whether they are installed on the viewer's system. Note that embedding fonts can increase the file size of the PDF. For more detailed instructions on how to manage and embed fonts in PDFs, visit the how-to article: 'How to Manage Fonts in PDF'

// Example of code to embed fonts in a PDF using IronPDF
using IronPdf;

// Create a new PdfDocument or load an existing one
var pdf = new IronPdf.HtmlToPdf().RenderHtmlAsPdf("<h1>Hello World</h1>");

// Ensure all fonts are embedded
pdf.SaveAs("document-with-embedded-fonts.pdf", new PdfSaveOptions
{
    EmbedFonts.Enabled = true
});
// Example of code to embed fonts in a PDF using IronPDF
using IronPdf;

// Create a new PdfDocument or load an existing one
var pdf = new IronPdf.HtmlToPdf().RenderHtmlAsPdf("<h1>Hello World</h1>");

// Ensure all fonts are embedded
pdf.SaveAs("document-with-embedded-fonts.pdf", new PdfSaveOptions
{
    EmbedFonts.Enabled = true
});
' Example of code to embed fonts in a PDF using IronPDF
Imports IronPdf

' Create a new PdfDocument or load an existing one
Private pdf = (New IronPdf.HtmlToPdf()).RenderHtmlAsPdf("<h1>Hello World</h1>")

' Ensure all fonts are embedded
pdf.SaveAs("document-with-embedded-fonts.pdf", New PdfSaveOptions With {.EmbedFonts.Enabled = True})
$vbLabelText   $csharpLabel
Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 15,904,411 | Version: 2025.10 just released