// // KMConvertWordWindowController.swift // PDF Master // // Created by tangchao on 2022/12/6. // import Cocoa import ComPDFKit_Conversion // 转档 Word 窗口 class KMConvertWordWindowController: KMConvertBaseWindowController { override var fileExtension: String { return KMPDFConvert.pathExtension(.word) } override func initDefaultValue() { super.initDefaultValue() self.titleLabel.stringValue = NSLocalizedString("PDF to Word", comment: "") } override func initSettingView() -> KMConvertSettingView? { return KMConvertWordSettingView.createFromNib() } override func initConvert() -> KMPDFConvert { return KMPDFConvertWord() } override func convertModelAppendParams(convert: KMPDFConvert) { super.convertModelAppendParams(convert: convert) if let _convert = convert as? KMPDFConvertWord { let settingView: KMConvertWordSettingView = self.settingView as! KMConvertWordSettingView if (settingView.pageSettingSelectedIndex == 0) { // convert.isAllInOneSheet = false _convert.layoutOptions = .retainFlowingText } else { /// 流排 _convert.layoutOptions = .retainPageLayout } } } }