Free Support Forum - aspose.com

Preserve Wingdings Characters Font Formatting during Converting Word to PDF - API

Hi,

We are generating pdf file using Aspose.Words. Pdf is generated properly but windings characters are not displying properly. It is showing "?" charachter.

We have used below code.

Aspose.Words.License license = new Aspose.Words.License();

string LicenseFilePath = Server.MapPath("~/") + @"\Aspose.Total.lic";
license.SetLicense(LicenseFilePath);


ArrayList fontSources = new ArrayList(FontSettings.GetFontsSources());

//Wingding.ttf is present on E:\ drive
FolderFontSource folderFontSource = new FolderFontSource(@"E:\", true);

// Add the custom folder which contains our fonts to the list of existing font sources.
fontSources.Add(folderFontSource);

// Convert the Arraylist of source back into a primitive array of FontSource objects.
FontSourceBase[] updatedFontSources = (FontSourceBase[])fontSources.ToArray(typeof(FontSourceBase));

// Apply the new set of font sources to use.
FontSettings.SetFontsSources(updatedFontSources);

Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml(header);
doc.Save(outputStream,SaveFormat.Pdf);

Thanks.

Hi Dipak,


Thanks for your inquiry. Could you please create a small console application that demonstrates your problem and attach it here for testing? Also, please attach your ‘Wingding.ttf’ font file. I will investigate the issue on my side and provide you more information.

Best Regards,