Print selected files in asp.net.?
Hi All,I need help from your end.. I have a scenario to print selected files...
Ex: In my grid i showed all the files, based on selection I want to print those files.
For this When i click print button, first I just download all the selected files in to my local drive and from local I'm trying to print using below sample code.
using (Process proc = new Process())
{
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.Verb = "print";
proc.StartInfo.FileName = destinationPath;
proc.StartInfo.Arguments = String.Format(@"/p /h {0}", destinationPath);
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.UseShellExecute = true;
proc.Start();
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
if (proc.HasExited == false)
{
proc.WaitForExit(10000);
}
proc.EnableRaisingEvents = true;
proc.Close();
}
but the problem is this is working only in server machine's, it's won't work in client machine.
Can any one give me some trick to accomplish this task.
Note: I want to print files, so don't suggest window.print(); and please avoid to share links, almost i refer all those links after that only I'm expecting some body help..