Fontes no IronPDF: Melhores Práticas

This article was translated from English: Does it need improvement?
Translated
View the article in English

O IronPDF incorpora fontes?

Todas as fontes (ou subconjuntos delas) usadas no seu HTML são incorporadas automaticamente no PDF, desde que a propriedade "Incorporar fonte" esteja definida como "Editável". Isso garante que o PDF seja exibido com as mesmas fontes, evitando quaisquer discrepâncias.

O IronPDF consegue remover fontes?

Sim, o IronPDF pode remover fontes. Tecnicamente, isso é conseguido desincorporando a fonte. Para obter instruções mais detalhadas sobre como gerenciar e remover fontes de PDFs, consulte o seguinte artigo explicativo: " Como gerenciar fontes em 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

Posso incorporar uma fonte inteira no meu PDF?

Sim, o IronPDF permite incorporar fontes em seus documentos PDF. A incorporação de fontes garante consistência visual, pois o documento será exibido com as fontes desejadas, independentemente de estarem instaladas no sistema do visualizador. Observe que a incorporação de fontes pode aumentar o tamanho do arquivo PDF. Para obter instruções mais detalhadas sobre como gerenciar e incorporar fontes em PDFs, consulte o artigo explicativo: " Como gerenciar fontes em 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
Redator Técnico

Curtis Chau é bacharel em Ciência da Computação (Universidade Carleton) e se especializa em desenvolvimento front-end, com experiência em Node.js, TypeScript, JavaScript e React. Apaixonado por criar interfaces de usuário intuitivas e esteticamente agradáveis, Curtis gosta de trabalhar com frameworks modernos e criar manuais ...

Leia mais
Pronto para começar?
Nuget Downloads 18,318,263 | Versão: 2026.4 acaba de ser lançado
Still Scrolling Icon

Ainda está rolando a tela?

Quer provas rápidas? PM > Install-Package IronPdf
executar um exemplo Veja seu HTML se transformar em um PDF.