|
@@ -79,6 +79,7 @@ import Cocoa
|
|
|
case html = 3005
|
|
|
case conversion_text = 3006
|
|
|
case conversion_image = 3007
|
|
|
+ case conversion_imageToPDF = 3008
|
|
|
|
|
|
/// tool
|
|
|
case compress = 8000
|
|
@@ -478,6 +479,8 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
|
|
|
type = .conversion_text
|
|
|
} else if (item.btnTag == KMToolbarType.conversion_image.rawValue) {
|
|
|
type = .conversion_image
|
|
|
+ } else if (item.btnTag == KMToolbarType.conversion_imageToPDF.rawValue) {
|
|
|
+ type = .conversion_imageToPDF
|
|
|
}
|
|
|
self.delegate?.toolbarViewController?(self, clickChaildToolType: type, toolbar: item)
|
|
|
self._itemSetPromptFlag(item: item)
|
|
@@ -841,7 +844,8 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
KMToolbarToolProfileIdentifier,
|
|
|
KMToolbarFillSignSignatureIdentifier]
|
|
|
case .Conversion:
|
|
|
- return [KMToolbarConversionCreatePDFItemIdentifier,
|
|
|
+ return [
|
|
|
+// KMToolbarConversionCreatePDFItemIdentifier,
|
|
|
KMToolbarConversionWordItemIdentifier,
|
|
|
KMToolbarConversionExcelItemIdentifier,
|
|
|
KMToolbarConversionPPTItemIdentifier,
|
|
@@ -849,7 +853,7 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
KMToolbarConversionCSVItemIdentifier,
|
|
|
KMToolbarConversionHTMLItemIdentifier,
|
|
|
KMToolbarConversionTextItemIdentifier,
|
|
|
- KMToolbarConversionImageItemIdentifier,
|
|
|
+ KMToolbarConversionImageItemIdentifier, KMToolbarConversionImageToPDFItemIdentifier,
|
|
|
KMToolbarDividerItemIdentifier, KMToolbarConversionOCRIdentifier, KMToolbarConversionExportImageItemIdentifier]
|
|
|
case .ScanOCR:
|
|
|
return [KMToolbarToolEnhancedScanIdentifier,
|
|
@@ -1985,6 +1989,18 @@ extension KMToolbarViewController {
|
|
|
let menuItem = NSMenuItem.init(title: NSLocalizedString("To Text", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
menuItem.representedObject = identifier
|
|
|
item?.menuFormRepresentation = menuItem
|
|
|
+ } else if identifier == KMToolbarConversionImageItemIdentifier {
|
|
|
+ item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertText)
|
|
|
+ item?.target = self
|
|
|
+ item?.btnTag = KMToolbarType.conversion_imageToPDF.rawValue
|
|
|
+ item?.toolTip = NSLocalizedString("Image To PDF", comment: "")
|
|
|
+ item?.titleName = NSLocalizedString("Image To PDF", comment: "")
|
|
|
+ item?.boxImagePosition = .imageLeft
|
|
|
+ item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Image To PDF", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionImageItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertPDFToIMG)
|
|
|
item?.target = self
|