DOC to PDF font error

We are using aspose to convert a word documento to pdf with this code:
---------------------------------------------------

Stream streamFichero = new MemoryStream(byteArray);
Document doc = new Document(streamFichero);

//Save the document in Aspose.Pdf.Xml format.
doc.Save(strOutputDirectory + strPDFName + ".xml", SaveFormat.AsposePdf);

//Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(strOutputDirectory + strPDFName + ".xml", null);

//Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = true;

//Produce the PDF file.
pdf.Save(strOutputDirectory + strPDFName);

-------------------------------------------------

The problem we have is that some word documents use fonts that aren’t installed on the server and we get this error: “The Font ‘XXXXX’ is not found. This font is not supported.”

Is there any way to avoid this kind of errors (maybe replacing the “not supported fonts” with another)?

Thanks in advance.

Hello

Thanks for your inquiry. As I can see you use old method of PDF conversion. Currently the latest version of Aspose.Words supports direct way of PDF conversion (without using Aspose.Pdf). Old legacy method was excluded from the latest version.
Please try using the following code, and let me know how it goes on you side:

Document doc = new Document("in.doc");
doc.Save("out.pdf");

Best regards,

The problem is that we can’t change Aspose.Words version without making many changes in the code. Isn’t it possible to solve it using the old way of PDF conversion?

Hi
Thank you for additional information. Unfortunately, I cannot suggest you any way to resolve this issue using the old legacy method. We already completely excluded this method of PDF conversion from Aspose.Words.
Best regards,