how to automate label printing with command line parameters
2010-12-14 15:24
507 查看
/// <summary> /// Print label using Command line /// </summary> /// <param name="btwFilePath">btwFilePath</param> public void BarTenderCommandLinePrintLabel(string btwFilePath) { Process p = new Process(); p.StartInfo.FileName = bartenderPath;//bartender.exe path p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.CreateNoWindow = true; p.StartInfo.Arguments = " /F=" + '"' + btwFilePath + '"' + " /P/X"; //p.StartInfo.Arguments = " /F=" + '"' + btwFilePath + '"' + " /D=" + '"' + dataFilePath + '"' + " /P/X"; //./P Executes a print job, leaving the status of the Use Database check box of the Print dialog unchanged //./F Specifies a label format to load. //./D="<path to data file>" //./X Specifies that, after all requested functions have been performed, BarTender will automatically exit, // but without saving any changes that may have occurred as a result of any command line actions // that were performed or data values that were incremented. p.Start(); p.WaitForExit(30000); p.StandardOutput.Close(); p.Close(); p.Dispose(); Thread.Sleep(1000); }
相关文章推荐
- How to import LDIF file into LDAP server with command line
- How to parse command line parameters.
- how to query name server with command line in Windows.
- How to resolve "can not start db2 in windows command line"
- Learn how to automate your testing with TTCN-3 - Updated 3!
- How to create and execute JAR file in Java – Command line Eclipse Netbeans
- How to build database on DB2 with db2 command
- How to run FTE and FTE from command line
- How to change Red Hat Linux to boot to command line mode from Gnome
- How to install IIS 7.5 on Windows 7 using the Command Line
- How to automate PowerPoint by using Visual C++ 5.0 or Visual C++ 6.0 with The Microsoft Foundation Classes
- How to Use Android ADB Command Line Tool
- How to pass macro definition from “makefile” command line arguments to C source code?
- How To Use gflags (formerly Google Commandline Flags)
- How to find a file or folder in MS-DOS or Windows command line
- How To Use Ip Command In Linux with Examples
- How to monitor Nginx web server from the command line in real time
- How to install Database using commandline prompt
- How to do non greedy regex match in command line
- How To Use gflags (formerly Google Commandline Flags)