Click here to Skip to main content
15,563,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a system that renders SSRS reports as a PDF and am looking for a way to be able to print them Silently.

I tried to simply use process.start(C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe /t "File Name") to print the file from the server on a network printer, but for some reason it's not doing anything although when i try same command from the Run in windows it works fine.

Please help getting this to work or suggest any other way to allow me to print from the server silently.

Am using Windows Server 2008 and Visual Studio 2010 and framework 3.5


Updates :
I configured the process identity in the machine.config.
I enabled IIS Admin Service to interact with desktop.
I Tried using Foxit instead of Adobe.

Thanks
Posted
Updated 19-Jan-11 3:31am
v4

My initial guess os that the IIS user configured for your asp.net application does not have the required rights to access the printer, or execute another process.

Regards
Espen Harlinn
 
Share this answer
 
Comments
engnoshi 17-Jan-11 8:56am    
Thanks for the Reply. so how can i change the user configured for asp.net or change the rights to the current user?
Espen Harlinn 17-Jan-11 9:28am    
Using the IIS and Windows user management tools
engnoshi 17-Jan-11 9:44am    
I configured the process identity in the machine.config
<processModel userName="SYSTEM" password="AutoGenerate" />

and I enabled IIS Admin Service to interact with desktop and still nothing happens.
Acrobat Reader may need a desktop to even run, even if it does not create a visible UI. It's likely that it's starting and just freezing. There was an earlier thread on this where one of the suggested solutions was to allow the service to interact with the desktop, but this probably won't work if there is no desktop session active at the moment. Eventually the solution was to use Foxit which unlike Acrobat Reader seems to work even when there is no desktop session. Here's the older thread:

 
Share this answer
 
Comments
engnoshi 17-Jan-11 8:56am    
Thanks Nishant, as you suggested i already tried to Enable IIS Admin Service to interact with desktop and i also tried to use Foxit as i found it suggested on one of the threads but no luck so far.
Nish Nishant 17-Jan-11 8:57am    
What happens when you try Foxit? It just hangs too?
engnoshi 17-Jan-11 9:42am    
No nothing happens, it doesn't even start in the background or hidden.
I quit using ITextSharp becose it uses adober reader in the background and that was a problem for me a few weeks later i found a perfect library for silent printing a know it is not free but it is worth it.

http://www.pdfprinting.net[^]
 
Share this answer
 
Comments
CHill60 24-Jun-13 12:02pm    
The question is over two years old. Answering old questions that already have multiple solutions, especially with a link to a product, tends to be perceived as spam and will attract downvotes
Marc Gabrie 24-Jun-13 15:02pm    
Spammer!
chipset4010 27-Jun-13 7:40am    
sorry i did not see the date... I just tried to share a library that helped me in this situation

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900