1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // KMConvertHtmlWindowController.swift
- // PDF Reader Pro
- //
- // Created by User-Tangchao on 2024/10/29.
- //
- import Cocoa
- class KMConvertHtmlWindowController: KMConvertBaseWindowController {
- override var fileExtension: String {
- return KMPDFConvert.pathExtension(.html)
- }
-
- override func initContentView() {
- super.initContentView()
-
- self.titleLabel.stringValue = NSLocalizedString("PDF to HTML", comment: "")
- }
-
- override func initSettingView() -> KMConvertSettingView? {
- return KMConvertHtmlSettingView.html_createFromNib()
- }
-
- override func initConvert() -> KMPDFConvert {
- return KMPDFConvertHTML()
- }
-
- override func convertModelAppendParams(convert: KMPDFConvert) {
- super.convertModelAppendParams(convert: convert)
-
- if let _convert = convert as? KMPDFConvertHTML {
- let settingView: KMConvertHtmlSettingView = self.settingView as! KMConvertHtmlSettingView
- let pageIndex = settingView.pageIndex
- if (pageIndex == 0) {
- _convert.paneOptions = .singlePage
- } else if pageIndex == 1 {
- _convert.paneOptions = .singlePageNavigationByBookmarks
- } else if pageIndex == 2 {
- _convert.paneOptions = .multiplePages
- } else if pageIndex == 3 {
- _convert.paneOptions = .multiplePagesSplitByBookmarks
- }
- }
- }
- }
|