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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

embed font in pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

150168 Dec 23,2019 04:50 PM UTC Dec 30,2019 11:16 AM UTC WPF 4
loading
Tags: PDF
Marco
Asked On December 23, 2019 04:50 PM UTC

Hi, I am using Syncfusion.Pdf dll to create pdf, and is all ok but i had embed font using this code c#

                            Font font = new Font(new FontFamily(fontnome), 20f, FontStyle.Regular);
                            PdfFont carattere = new PdfTrueTypeFont(font, FontStyle.Regular, (float)Convert.ToDouble(dr_ele[7]), false, true);
but enbed font have this name WCSGIM+//fontname// so acrobat cannot read it.
How can i do?

Marco
Replied On December 23, 2019 05:34 PM UTC

I have to add some info about this tread.
I have checked with fontforge, the info about font enbed, and i see that the font are enbed with this name WCSGIM+//fontname//  and is it correct because for some font fontforge can find all the glifi and bmp, for other like (Museo sans 500) cannot find usable bitmap for this font ttf. So i check this is not a truetypefont but an OpenType .
May be this is the cause of this problem??


Anand Panchamoorthi [Syncfusion]
Replied On December 24, 2019 10:16 AM UTC

Hi Macro, 
  
Thank you for contacting Syncfusion support. 
 
We found that you have enabled the font embedding option and disabled the Unicode support. The open type fonts only support while enabling the Unicode option in the PdfTrueTypeFont instance. Please refer the below code snippet to draw the text using open type font. 
 
PdfFont carattere = new PdfTrueTypeFont(font, FontStyle.Regular, (float)Convert.ToDouble(dr_ele[7]), true, true); 
 
Please try the above solution in your end and let us know whether your requirement is achieved or not. If not please share us the font and sample text to draw it into PDF document. It will helpful for us to provide the precise solution on this. 
  
With Regards, 
Anand Panchamoorthi

Marco
Replied On December 24, 2019 10:48 AM UTC

Hy Anand,
many thanks for your reply. Unfortunatly i Have tried as you tell to me but the font is not correctly embed. As before if I open the file in acrobat or fontforge , I can see the name of the font embed but the font library is missed
The Font is Museo Sans 500, but as my customer tell to me the same with all Museo Sans font.




Sowmiya Loganathan [Syncfusion]
Replied On December 30, 2019 11:16 AM UTC

Hi Macro, 

We have tried with the sample to draw the text using Museo Sans 500 font in PDF document. But the font is embedded properly and preserved in font entries of resultant PDF document. Please refer the below screenshots for more details, 

Output document:  
 

Fonts preserved in PDF document:  
 

Could you please let us know what issue you have faced in your end (i.e., font library is missed and font is not embedded properly). It will be helpful for further analysis and provide the better solution on this.  

Regards, 
Sowmiya Loganathan 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon