Monday, October 1, 2007

How to print PDF using GhostScript?

// Print PDF file using GhostScript
System.Diagnostics.ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.Arguments = " -dPrinted -dBATCH -dNOPAUSE -dNOSAFER -q -dNumCopies=" + Convert.ToString(numberOfCopies) + " -sDEVICE=ljet4 -sOutputFile=\"\\\\spool\\" +
printerIdentifier + "
\" \"" + _fileName + "\"";
startInfo.FileName = ConfigurationSettings.AppSettings["GhostScriptPath"].ToString();
startInfo.UseShellExecute = false;
System.Diagnostics.Process process = Process.Start(startInfo);





No comments:

Post a Comment