Czcionki w IronPDF: najlepsze praktyki
Czy IronPDF osadza czcionki?
Wszystkie czcionki (podzbiory) używane wewnątrz Twojego HTML są automatycznie osadzane w PDF, zakładając, że właściwość osadzania czcionki jest ustawiona na Edytowalne. To zapewnia, że PDF jest wyświetlany z tymi samymi czcionkami, zapobiegając wszelkim niezgodnościom.
Czy IronPDF może usunąć czcionki?
Tak, IronPDF może usunąć czcionki. Technicznie osiąga to poprzez odosadzanie czcionki. Aby uzyskać bardziej szczegółowe instrukcje, jak zarządzać i odosadzań czcionki z PDF, odwiedź poniższy artykuł jak-to: '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")
Czy mogę osadzić całą czcionkę w moim PDF?
Tak, IronPDF pozwala osadzać czcionki w dokumentach PDF. Osadzanie czcionek zapewnia spójność wizualną, ponieważ dokument będzie wyświetlany z oczekiwanymi czcionkami, niezależnie od tego, czy są zainstalowane na systemie przeglądającego. Zauważ, że osadzanie czcionek może zwiększyć rozmiar pliku PDF. Aby uzyskać bardziej szczegółowe instrukcje, jak zarządzać i osadzać czcionki w PDF, odwiedź artykuł jak-to: '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})

