Pues es eso precisamente lo que trato de hacer, he intentado muchas cosas, pero solo me funcionan localmente:
Código:
//Instantiate the object of ProcessStartInfo.
Process objProcess = new Process();
try
{
//the command line to print PDF files without displaying the print dialog
//AcroRd32.exe /t "C:\test.pdf" "\\servername\printername"
ProcessStartInfo starter = new ProcessStartInfo("\"C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe\"", "/t \"" + fileName + "\" \"" + printerPath + "\"");
guardar("\"C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe\" /t \"" + fileName + "\" \"" + printerPath + "\"");
objProcess.StartInfo = starter;
objProcess.Start();
//close Acrobat window
objProcess.WaitForExit(10000);
objProcess.CloseMainWindow();
return "OK";
}
catch (Exception ex)
{
// Log the exception and return false as failure.
return ex.Message + " | " + ex.StackTrace;
}
finally
{
// Close the process.
objProcess.Close();
}
Lo que pasa ya a la hora de pasarlo al server, es que el acrobat reader falla al inicializar:
Código:
Application popup: cmd.exe - Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.
Alguna experiencia en esto?
Gracias de antemano