// // KMPrintPrinterModel.swift // PDF Master // // Created by lizhe on 2022/12/21. // import Cocoa struct KMPrintPrinterModelOptions: OptionSet { let rawValue: Int static let none = KMPrintPrinterModelOptions(rawValue: 1 << 0) //无 static let blackAndWhite = KMPrintPrinterModelOptions(rawValue: 1 << 1) //黑白色 static let printOnBothSides = KMPrintPrinterModelOptions(rawValue: 1 << 2) //双面打印 static let all: KMPrintPrinterModelOptions = [.blackAndWhite, .printOnBothSides] } enum KMPrintPrinterOnBothSidesType: String, CaseIterable { case long = "Flip on long edge" case short = "Flip on short edge" } class KMPrintPrinterModel: NSObject { var name: String = NSPrinter.printerNames.first ?? "无打印机" //打印机名称 var copies: Int = 1 //份数 var options: KMPrintPrinterModelOptions = .none //打印类型 var onBothSidesType: KMPrintPrinterOnBothSidesType = .long //双面类型 }