Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/10/2008, 18:45
Mario san
 
Fecha de Ingreso: junio-2004
Mensajes: 70
Antigüedad: 20 años, 9 meses
Puntos: 0
Imprimiendo a traves de un webservice

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