Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process p = new Process( );
- p.StartInfo = new ProcessStartInfo( )
- {
- CreateNoWindow = true,
- Verb = "print",
- FileName = path //put the correct path here
- };
- p.Start( );
- public static bool Print(string file, string printer) {
- try {
- Process.Start(
- Registry.LocalMachine.OpenSubKey(
- @"SOFTWAREMicrosoftWindowsCurrentVersion" +
- @"App PathsAcroRd32.exe").GetValue("").ToString(),
- string.Format("/h /t "{0}" "{1}"", file, printer));
- return true;
- } catch { }
- return false;
- }
- Process.Start("LPR -S printerdnsalias -P raw C:filesfile.pdf");
Add Comment
Please, Sign In to add comment