12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // KMConvertWordWindowController.swift
- // PDF Reader Pro
- //
- // 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
- }
- }
- }
- }
|