C:\Program Files (x86)\Foxit Software\Foxit Reader>"foxit reader.exe" /t "c:\po222.pdf" "\\CCS-BAR-001\NRG SP 4100N PS" It works fine
I think this has something to do with there being both a double forward slash and single forward slash in the printer name which C# is failing to recognise even though I am using @ in front of the string to represent the literal string.
My C# code is :
string testFile = "c:\\po222.pdf";
string testPrinter = @"\\CCS-BAR-001\NRG SP 4100N PS";
Process pdfProcess = new Process();
pdfProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
pdfProcess.StartInfo.FileName = @"C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe";
pdfProcess.StartInfo.Arguments = string.Format("/t {0} {1}", testFile, testPrinter);
pdfProcess.StartInfo.CreateNoWindow = false;
pdfProcess.Start();
pdfProcess.CloseMainWindow(); I can't see what I'm doing wrong. Can you spot anything out of place. Any help would be gratefully received. Kind regards Abdullah
I can't see what I'm doing wrong. Can you spot anything out of place.
Any help would be gratefully received.
Kind regards
Abdullah