Embedding font - existing pdf
I have a question:
I need to embed fonts in an existing pdf.
If I use:
Font fnt = new Font("c:\\Arial.ttf", 12f);
PdfFont font = new PdfTrueTypeFont( fnet, true);
page.Graphics.DrawString("Embedded font", font, brush, 0,100);
I can embed fonts in a new pdf, but for an existing one?
tnx.
Thank you for your interest in Essential Pdf.
We can embed the fonts into an existing pdf file using the following code snippet
PdfLoadedDocument ldoc = new PdfLoadedDocument("../Data/Fonts.pdf");
PdfFont font = new PdfTrueTypeFont("../Data/CENTURY.TTF", 12f);
PdfLoadedPage lpage = ldoc.Pages[0] as PdfLoadedPage;
lpage.Graphics.DrawString("Embedded Font", font, brush,location);
Please try this and let us know if you have any queries.
Regards,
Angappan.
I've an existing pdf with standard fonts (no embedded) and I need replace every font with the embedded one.
Can you help me?
It is not possible to replace the existing fonts with the embedded fonts because "Fonts" are XObjects in PDF.To embed the new fonts, the existing standard font entries must be deleted,but it is not possible to delete the Xobjects in the PDF once they were added.
Please let us know if you have any queries.
Regards,
Angappan.
Hi
Brent,
Thank you for your
update.
This feature
request for “Need to add support to embed the non-embedded font in the PDF
Document” has been added. We will let you know once the feature has been
implemented.
Please let us know
if you have any questions.
Regards,
George
Thank you for your interest in Syncfusion products,
Still feature request “Need to add support to embed the non-embedded font in the PDF Document” is not implemented. We will let you know once the feature has been implemented.
Please let us know if you have any questions.
Regards,
Praveen
Hi,
Has this feature has been added now?
We can add an extra text with custom font in the existing pdf file, but can we change the font in the existing pdf file?
We have pdf files where the content is not readable as can be found in the attachment. It looks like the pdf file does not have fonts embedded in it.
Is it possible to attach the web fonts in
Thanks
Attachment: image_4_f0f02047.png
Hi Dimitri,
Yes,you can embed all the non-embedded fonts in an existing PDF document using the EmbedFonts method provided by Syncfusion. This ensures that the text becomes readable by embedding the required fonts into the PDF.
This approach will embed the missing fonts into the PDF, making the content readable. However, note that this does not change the existing font style; it only ensures the original fonts are properly embedded.
Follow the link below for more information:
Embed all the non-embedded fonts in the existing PDF document
Regards,
Irfana J.
- 9 Replies
- 8 Participants
-
BT Barbara Tacchino
- May 3, 2010 09:17 AM UTC
- Dec 5, 2025 12:25 PM UTC