I'm having trouble with printing a PDF through Foxit Reader.. The problem is not that it's not printing, but that the GUI is loaded when trying to do so.. I would like the printing to just happen in the background...
Everything I read so far suggests that the code below is supposed to actually print in the background, yet for every print job, the Foxit GUI pops open... The GUI also closes after printing, but I don't want it to open in the first place. I am executing the code below from a Console application that hosts a WCF service if that would be important...
ProcessStartInfo psInfo = new ProcessStartInfo();
psInfo.FileName = FoxitReaderLocation;
psInfo.Arguments = String.Format("/t \"{0}\" \"{1}\"",
fileLocation,
printerName);
psInfo.WindowStyle = ProcessWindowStyle.Hidden;
psInfo.CreateNoWindow = true;
psInfo.UseShellExecute = true;
Process process = Process.Start(psInfo);
process.WaitForExit(10000);
if (!process.HasExited)
{
process.Kill();
process.Dispose();
}
Printing with /p "filelocation"
also works with the default printer, but the same problem with the GUI occurs.
Doing this with Adobe Reader occurs silently, but doesn't print half of my files (but then again, the command line interface of Adobe Reader is not officially supported, so please don't suggest to use Adobe Reader)
Sources: