Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Selects a printer or retrieves the deviceName of the selected printer.
Syntax
display str deviceName([str device, ClassRunMode runOn])
Run On
Called
Parameters
- device
 Type: str
 The name of printer to be selected; optional.
- runOn
 Type: ClassRunMode Enumeration
Return Value
Type: str
The deviceName of the selected printer.
Remarks
The deviceName of a printer to be selected could be found by using the getPrinter method.
Examples
This job lists the available printers and their nonprintable area.
static void aaaKJ(args a) 
{ 
    printJobSettings pjs; 
    str printer; 
    int i; 
    pjs = new printJobSettings(); 
    for (i=1; i<=pjs.GetNumberOfPrinters(); i++) 
    { 
        printer = pjs.GetPrinter(i); 
        pjs.DeviceName(printer); 
        print "printer No. ",i, " has name ",  printer; 
        print "   left:  ", pjs.UnprintableLeft(),   "/100 mm"; 
        print "   right: ", pjs.UnprintableRight(),  "/100 mm"; 
        print "   top:   ", pjs.UnprintableTop(),    "/100 mm"; 
        print "   bottom:", pjs.UnprintableBottom(), "/100 mm"; 
    } 
    pause; 
}