When I use the API to convert a Word Doc into PDF that has characters with the Shruti Font (TTF) in it, the digits and symbols (like : / .), but letters are converted into little rectangles (what you would see if the font does not include that character). When I select the text from the PDF file and paste it into another word document, the letters show up and the font of those letters is Shruti.
Here is the code we use to convert the document:
public void MicrosoftWordToPDF(string srcFile)
{
string dstFile = srcFile.Replace(".doc", “.pdf”);
MicrosoftWordToPDFBuffer.SetLength(0);
Document adoc = new Document(srcFile);
adoc.Save(MicrosoftWordToPDFBuffer, SaveFormat.AsposePdf);
Pdf pdf = new Pdf();
pdf.BindXML(MicrosoftWordToPDFBuffer, null);
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.Save(dstFile);
}
Thanks,
Dan
Hi,
Thank you for considering Aspose.
I am able to reproduce the error. I am not sure whether we support “shruti” Font in full. I will discuss this with the developers and we will let you know as soon as solution is found.
Thanks.
Adeel Ahmad
Support Developer
Aspose Changsha Team
Dear Dan,
It is really strange that this font is not supported. We might need more time to find the reason. Please use other font as a workaround.
Thanks, I am attempting to pursue a workaround, but the font is being choosen when the document is converted from Word Perfect to Word through MS Word in an automated process and this is going to be done for thousands of documents in a one-time conversion.
What I have found, which is interesting, is that the text comes back if you de-select “Use Local Fonts” in Acrobat Reader. I have also found that when I looked at the Shruti font in the Fonts folder on my disk, it also only showed digits and symbols defined.
Maybe this is a problem with Acrobat Reader or something, because the Shruti font displays fine in MS Word.
I also doubt if this is a bug of Adobe Reader. As a workaround, you can save the xml generated by Aspose.Words, replace all FontName="Shruti" to some other fonts such as FontName="Arial", and then use Aspose.Pdf to load the xml.