PrintJobSettings.deviceName Method [AX 2012]
Selects a printer or retrieves the deviceName of the selected printer.
display str deviceName([str device, ClassRunMode runOn])
Run On
CalledParameters
- device
- Type: str
The name of printer to be selected; optional.
- runOn
- Type: ClassRunMode Enumeration
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;
}
Community Additions
ADD
Show: