Convert Word to PDF with embedded fonts

Is it possible to convert a Word document to PDF and also embed the fonts in the PDF which are embedded in the original Word document?
The original Word document is generated by Aspose.Words mail merge and is based on a Word document with some embedded (non standard) fonts.

Hi,

Thank you for considering Aspose.

Yes you can convert a word document to pdf and also embed the fonts. Before saving the pdf you wil have to set the IsFontEmbedded to true. Here is a sample of the code:

foreach(Aspose.Pdf.Section sec in pdf.Sections)
{
foreach(Paragraph para in sec.Paragraphs)
{
if(para is Text)
{
Text t = para as Text;
foreach(Segment seg in t.Segments)
{
seg.TextInfo.IsFontEmbedded = true;
}
}
}
}
pdf.Save(...);

Thanks.

Adeel Ahmad
Support Developer
Aspose Changsha Team
http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

AdeelTaseer:
Thank you for considering Aspose.


Not only considering, we are using it already. It's about a 100 times faster then our previous com interop implementation :)


Yes you can convert a word document to pdf and also embed the fonts. Before saving the pdf you wil have to set the IsFontEmbedded to true. Here is a sample of the code:


I read this solution elsewhere on the forum, but it also said that the fonts have to be installed on the server. Is that correct?

You are right. If you want to embed a font, that font MUST be installed in your system.

That is not the answer I was hoping for.

Our customers can upload their own templates, so not all fonts might be installed.
Is it possible to extract embedded fonts from a Word document (using Aspose) so I can automatically install them on the server? Is there any other workaround you can suggest?

Sorry we can’t resolve this problem from Aspose.Pdf side. You can post the question in the Aspose.Words forum to see if they can extract the embedded fonts form Word document.