We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Embedding font - existing pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

94258 May 3,2010 09:17 AM UTC Jan 7,2014 03:41 AM UTC WinForms 7
loading
Tags: PDF
Barbara Tacchino
Asked On May 3, 2010 09:17 AM UTC

Hi,
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.

Angappan G [Syncfusion]
Replied On May 3, 2010 12:04 PM UTC

Hi Barbara,

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.

Barbara Tacchino
Replied On May 6, 2010 10:16 AM UTC

Ok, but in this way I can add an embedded font.
I've an existing pdf with standard fonts (no embedded) and I need replace every font with the embedded one.
Can you help me?

Angappan G [Syncfusion]
Replied On May 7, 2010 09:50 AM UTC

Hi Barbara

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.

Brent Snyder
Replied On February 8, 2013 04:37 PM UTC

Just wondering if you had any future plans on this topic?  Aspose, does allow to cycle through fonts that are not embedded and set a property to embed them.

Brent

George Livingston [Syncfusion]
Replied On February 14, 2013 10:27 AM UTC

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


Mike Burgess
Replied On January 2, 2014 04:00 PM UTC

Has this ever been added? or is there some code that will find the list of fonts in the PDF so that they can then be added?

Praveenkumar H [Syncfusion]
Replied On January 7, 2014 03:41 AM UTC

Hi Mike,

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;