|
请大侠指教下面Tribon关于批批印源代码怎么用?怎么样才能利用下面的代码实现批打印?在下非常感谢!
"""Example on how to use TBPrintSrv from Python. |
| This example needs win32com for Python to run.""" |
| import TBPrintSrvapp = TBPrintSrv.TBApplication()fnd = TBPrintSrv.FindDrawings()job = TBPrintSrv.PrintJob()prt = TBPrintSrv.Printer() |
| print "Start"job.Drawings.AddDrawings(fnd.GetDrawings("MW*","SB_PDB"))job.Printer = prt# Remember to "escape" backslashjob.Printer.SelectPrinter("\\\\NTSRV7\\P015")job.PrintOpti***.PrintToFile = 1job.PrintOpti***.NameMask = "VBS*.PS"if job.Drawings.Count: print "Printing " + str(job.Drawings.Count) +" drawings." job.StartPrint()else: print "No drawings found" |
| print "End" |
|
|