DOC to PDF Font Issue

Hi,
We are using Aspose.Word and Aspose.Pdf to convert DOC files to PDF using our software. There are some files where the conversion is fine but the font in the converted PDF gets converted to “Times New Roman” instead of the original font i.e. the font in the original document.
I have attached the DOC file which is causing this problem.
Also, here is the code sample we are using for doing the conversion.

Aspose.Words.Document doc = new Aspose.Words.Document(sourceFilePath);
doc.SaveOptions.PdfExportImagesFolder = Path.GetTempPath();
string uniqueXmlPath = string.Format("{0}.xml", Path.GetFileNameWithoutExtension(destinationFilePath));
doc.Save(uniqueXmlPath, SaveFormat.AsposePdf);
// Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
// Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = true;
// pdf.DestinationType = DestinationType.FitPage;
pdf.BindXML(uniqueXmlPath, null);
// Produce the PDF file.
pdf.Save(destinationFilePath);

I also tried with the latest version of Aspose.Word and Aspose.Pdf but the issue still persists. Can you please assist us with this.
Thanks,
Vedang Purohit
Intralinks Inc.

Hi
Thanks for your request. In your document, you use “DIN-Light” font. Please make sure this font is installed on your PC. If so, please attach it here for testing.
Also, the latest version of Aspose.Words supports direct conversion to PDF (without using Aspose.Pdf). You can try using this method. Please see the following code:

// Open the document.
Document doc = new Document("in.doc");
// Save the output document
doc.SaveToPdf("out.pdf");

Best regards,

I had the same issue while using only AsPose.Words for .Net …
See : https://forum.aspose.com/t/60181

Hi

Thanks for your request. I already answered this question in the following thread
https://forum.aspose.com/t/60181
Best regards,