Font problem when printing from a service

I have a sample app which opens a word doc using Aspose.Words and prints it. The app prints the document just fine. When I use the same code to print the document in a windows service, the fonts are wrong.

The code I am using to print is as follows:

Dim doc As New Document("c:\programdata\Conditions of Admissions.doc")
doc.Print()

I have attached the document and images of the fonts printing correctly and incorrectly.

Hi

Thanks for your inquiry. Do you print the document on the same machine? In your document you use “Century Schoolbook” font. The problem might occur because this font is not installed on machine where you are printing the document and that is why an alternative font is used. So please try installing this font.
Best regards.

Both documents were printed on the same machine. The Century Schoolbook font is installed on the machine. The document prints fine from Microsoft Word on that machine.

Hi

Thanks for your request. Could you please attach Century Schoolbook font here for testing? I will investigate the problem on my side and provide you more information.
Best regards,

Here are the font files.

Hi

Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words. Aspose.Words uses our own Rendering Engine convert a document to PDF, the same Rendering Engine we use to print a document. Could you please try converting the document to PDF on your side (using Windows service and your app) and attach these two PDF here for testing.
Best regards,

I think I have fixed the problem.

The Century Schoolbook font was not originally installed on the machine where I was running the test apps. I installed the font and ran the test apps. The Console app worked fine, but the Service would not print properly.

I re-booted the machine for another reason and suddenly both test apps worked fine. I have not been able to reproduce the problem since.

Thanks for your help in this matter.

Hi

It is perfect, that you already resolved the problem. Please let me know in case of any issues. I will be glad to help you.
Best regards,