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);
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?
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.
- 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.
- The Pdf to XPS converter has no interface for interrupting document conversion process, therefore you cannot correctly stop process until document will be converted.
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)?