Convert PDF to XPS in Windows services

Hi,
Inspired by the post:
https://blog.aspose.com/2009/10/18/how-to-print-a-document-on-a-server-via-the-xpsprint-api , we are evaluating your PDF package and using the following line of code to convert PDF to XPS in order to use the XPS Print Api to do printing in Windows service,

Document pdf = new Document(filePath);
pdf.Save(aMemoryStream, SaveFormat.Xps);

What is the technology you are using for the conversion? Are you using the WPF set of XPSDocument classes? Is your converter reliable to run in windows service?

Thanks,
Becky

Hi, I posted on the forum a question: https://forum.aspose.com/t/83206 Could someone take a look and provide answer?

Hi Becky,


Thanks for your inquiry. Its safe to use Aspose.Pdf API in windows service and for your second question regarding technology used for PDF to XPS conversion, I’m in coordination with our development team and will update you soon.

Best Regards.

Hi Becky,


Thanks for your patience.

Please note that we have our own engine based on .NET, which converts pdf documents into XPS format and it does not use any external libraries like WPF(XPSDocument classes).

As per your requirement, you can create a Windows service based on our component. There are several ways to convert your program to service (
http://www.msfn.org/board/topic/83272-how-to-run-a-program-as-a-service/ ). Also you can write service on base of NET classes ServiceBase and Installer.

Furthermore:
  1. Windows services can work in silent mode (without access to desktop). If you plan to use your service in this mode you should write handler that will catch exceptions and redirect them to log. This solution prevents service from suspending.
  2. The Pdf to XPS converter has no interface for interrupting document conversion process, therefore you cannot correctly stop process until document will be converted.
In the event of any further query, please feel free to contact.

Thank you so much for your reply.
Yes we must run windows services in silent mode, and the account we use to run the service will not be able to log in windows interactively at all. It sounds like your component will not rely on desktop resources at all (e.g. win form classes and wpf classes)?

Hi,


As shared earlier, component is not dependent upon any third-party library or utility so you can use them in your applications. In case you encounter any issue or you have any further query, please feel free to contact.