Fontes no IronPDF: Melhores Práticas
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")
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})

