I don't have problems to print in the debugs localserver, .txt, .doc, .pdf, no problem with any file.
When I posted the web in my iis server, where have office and acrobat reader too, it only can print .txt files. The server cannot print .doc or .pdf,
I think that is something related with the ASPNET user that cannot access the software but I don't know. I have tried to loggin in the ASPNET account to launch word or acrobat reader, to let this porgrams create their temp files, but I can't loggin with this account.
NeV3rKilL
0 Points
1 Post
Print files in a Network printer from asp.net
May 24, 2012 10:15 AM|LINK
I have the next function to print documents:
public void PrintFile(string fileName, string printerName) { string path = fileName; Process printJob = new Process(); printJob.StartInfo.FileName = fileName; printJob.StartInfo.UseShellExecute = true; printJob.StartInfo.Verb = "PrintTo"; printJob.StartInfo.CreateNoWindow = true; printJob.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; printJob.StartInfo.Arguments = "\"" + printerName + "\""; printJob.StartInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(fileName); printJob.Start(); }I don't have problems to print in the debugs localserver, .txt, .doc, .pdf, no problem with any file.
When I posted the web in my iis server, where have office and acrobat reader too, it only can print .txt files. The server cannot print .doc or .pdf,
I think that is something related with the ASPNET user that cannot access the software but I don't know. I have tried to loggin in the ASPNET account to launch word or acrobat reader, to let this porgrams create their temp files, but I can't loggin with this account.
Do you know what to do?
Thank you.
</div>