We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Fonts not embedded in pdf

When I create a new pdf document (Aspose.Pdf.dll file version 4.1.0.0), the fonts are not included in the pdf. Only when I make a call to the GetTextHeight function the fonts are included.

Attached are the fonts we used.

CODE:

TextInfo StandardFontBold = new TextInfo();

StandardFontBold.FontName = "HelveticaNeue-Bold";

StandardFontBold.FontPfmFile = "HLB_____.PFM";

StandardFontBold.FontOutlineFile ="HLB_____.PFB";

StandardFontBold.IsFontEmbedded = true;

StandardFontBold.FontSize = 9f;

StandardFontBold.LineSpacing = 4f;

StandardFontBold.Color = black;

Pdf pdf = createNewPdf("PDFName", 20f / MM, 15f / MM, 61f / MM, 19.7f / MM);

Section section = pdf.Sections.Add();

Text titleText = new Text("Hello World!", StandardFontBold);

//Uncomment the line below to inlcude fonts

//titleText.GetTextHeight(pdf, 0f);

titleText.Margin.Bottom = 4.6f / MM;

pdf.DefaultFontName = StandardFontBold;

section.Paragraphs.Add(titleText);

pdf.Save(fileLocation);

Hello Joeri,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFNET-11853. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience.

Is there already new information considering this problem?

Hello Joeri,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The issue is still under consideration and our development team is working hard to get it resolved. Meanwhile, I've contacted our team to share the ETA (if possible) regarding its resolution.

Hello Joeri,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your patience.

After investigating this issue, we've found that the issue can be resolved in one week (by the end of next week) but still it's not a promise. As soon as the hotfix is available, we would be pleased to update you with the status of availability.

Your comprehension is greatly appreciated in this regard.

Hello Joeri,

Thanks for your patience.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I'm pleased to inform you that, the issue reported earlier PDFNET-11853 in this forum thread is resolved in the hotfix shared over this link.

Please try using it and in case you still face any problem or you've any further query, please feel free to contact.