-
Notifications
You must be signed in to change notification settings - Fork 1
/
LabelShift.swift
33 lines (30 loc) · 887 Bytes
/
LabelShift.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// LabelShift.swift
//
//
// Created by chen on 2023/11/11.
//
import Foundation
/// The ^LS command allows for compatibility with Z-130 printer formats that are set for less than full label width.
/// It is used to shift all field positions to the left so the same commands used on a Z-130 or Z-220 Printer can be used on other Zebra printers.
///
/// # Label Shift
///
/// - Important: The ability to save the ^LS command depends on the version of firmware.
public struct LabelShift: ZPLCommandConvertible {
/// Shift left value (in dots)
///
/// Values: -9999 to 9999
///
/// Initial Value at Power Up: 0
public var left: Int
public var command: String {
"^LS\(left)"
}
/// Label Shift.
///
/// - Parameter left: Shift left value (in dots). -9999 to 9999.
public init(left: Int) {
self.left = left
}
}