Garbled output

I am using your XpsPrint sample code and it works perfectly from a Console Application. However, when I run the exact same code from a Windows Service, the print out is garbled. Have you seen this before?

This message was posted using Page2Forum from How-to: Print a Document on a Server via the XpsPrint API - Aspose.Words for .NET

Hi
Thanks for your request. Yes, we know about this issue. This is not a bug in Aspose.Words, but bug in XPS Print API:
https://stackoverflow.com/questions/6123507/xps-printing-from-windows-service
I can suggest you a workaround. You can convert your document to TIFF and then convert TIFF to XPS using the technique described here:
https://docs.aspose.com/words/net/convert-a-document/
In this case pages of your document will be simple images and upon printing there should not be any problems with fonts.
Hope this helps.
Best regards,

It works perfectly. Thanks you very much!