We need to print a report periodically from a windows service, we use .NET 2.0.
We have modules that produce this report as a PDF or as an HTML file, PDF would be better because we have better control over the look of the report.
We also have the username, password and the name of the printer selected for the task.I searched and researched several options on how to print PDF files from windows service, namely using Acrobat Reader from command line and couldn't make it work.
Acrobat Reader seems to be unreliable and difficult to use, also we would need to guarantee it is intalled on our clients machines.
Do you have a solution for this, which may be in a third party component?
Thanks
I'm having a problem while trying to open a PDF file using Process.Start().The program runs the process as a background process but no adobe reader window show up. A solution i found was to use chrome.exe, but my client want to open on adobe-reader, as it's the default windows program.
I've seen this question asked before, but I have not seen any definite answers, and definitely not any answers that solve my problem. I created a windows service to send faxes (semi-automatically) using the FAXCOMEXLib library. So far, my service has been successful at sending text files (.txt). But when I try to send pdf, jpg, or tif files, I get the "Operation failed" error. In SO, I've seen a lot of discussion about the permissions of the user that the service is running under. I've tried a lot of different options (Local Service, Local User, custom user with admin privileges, allow service to interact with desktop). But nothing seems to make a difference. It seems that the service does not have permissions to open the appropriate app to "print" the pdf, jpg, or tif file. But I am only speculating. Has anyone been successful in sending a fax through FAXCOMEXLib in a Windows service? Here is my code that sends the fax:
I want to start this off by saying that FAXCOMEXLib is made for a windows console app, not a windows service. You can even read this in the documentation. And I think that's why we had so much trouble getting it working.
You will also see another service AarSvc immediately above the one with the five digit random number. According to this page: -us/windows/application-management/per-user-services-in-windows services of this sort are Per User services, and to completely disable them, the version without the five digits, AKA the template service, should also have its "Start" value set to 4.
Unless stated otherwise, this service is available 24/7, excluding planned outages, normal maintenance windows, and unavoidable events. Maintenance windows are Sundays from 7 to 11 a.m. but may be extended to 2 p.m., if needed. If maintenance is required outside of these hours, it will be announced on the Alerts & Bulletins page.
aa06259810