Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service not printing on windows 10 #12

Closed
SaadYasir opened this issue Jun 28, 2021 · 5 comments
Closed

Service not printing on windows 10 #12

SaadYasir opened this issue Jun 28, 2021 · 5 comments

Comments

@SaadYasir
Copy link

when running it as service on windows 10. it doesn't print anything. but when debugging it in visual studio it works well

@huysentruitw
Copy link
Owner

Does it work when you run it from the console (start the exe with the flag --console) ?

If it runs as a service, the user the service runs under must have printers installed (Windows links printers to users IIRC). It can help to use a service account instead of Network Service or Local System.

@Vasanthvivi
Copy link

Does it work when you run it from the console (start the exe with the flag --console) ?

If it runs as a service, the user the service runs under must have printers installed (Windows links printers to users IIRC). It can help to use a service account instead of Network Service or Local System.

Yes it works when running as console application but it is not working while running as a service ,,, according to the microsoft docs the PrintDocument is based on WinForms and i think windows service dont have the rights to print documents

@yiwan74
Copy link

yiwan74 commented May 1, 2022

Is any solution found about this issue?
Printing from service is not possible. Any workaround for this problem?

Yes it works when running as console application but it is not working while running as a service ,,, according to the microsoft docs the PrintDocument is based on WinForms and i think windows service dont have the rights to print documents

@SaadYasir
Copy link
Author

SaadYasir commented May 1, 2022 via email

@yiwan74
Copy link

yiwan74 commented May 2, 2022

Yes. You are right. It can print from service.
I was trying to print from service on printer that was redirected through remote desktop.
In that case it prints only when started with Visual Studio.
But when I used local network printer it prints well from service too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants