Browse Source

【2025】【Form】Button类型处理

niehaoyu 2 months ago
parent
commit
1d1e2582be

+ 5 - 5
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -112,7 +112,7 @@ public class ComponentSelect: ComponentBaseXibView {
         if index >= 0 && index < menuitemPropertys.count {
             let chooseIndex: Int = index
             let chooseProperty = menuitemPropertys[chooseIndex]
-
+            
             chooseItem(chooseProperty)
         }
     }
@@ -506,10 +506,10 @@ extension ComponentSelect: ComponentGroupDelegate {
     }
     
     public func componentGroupDidSelect(group: ComponentGroup?, menuItemProperty: ComponentMenuitemProperty?) {
-        chooseItem(menuItemProperty)
-        
-        delegate?.componentSelectDidSelect?(view: self, menuItemProperty: menuItemProperty)
-        
+        if selItemProperty != menuItemProperty {
+            chooseItem(menuItemProperty)
+            delegate?.componentSelectDidSelect?(view: self, menuItemProperty: menuItemProperty)
+        }
         window?.makeFirstResponder(nil)
     }
 }

+ 0 - 161
PDF Office/PDF Master/Class/Common/Category/NSString+KMExtension.swift

@@ -7,167 +7,6 @@
 
 import Foundation
 
-let SKAutoCheckFileUpdateKey = "SKAutoCheckFileUpdate"
-let SKAutoReloadFileUpdateKey = "SKAutoReloadFileUpdate"
-let SKTeXEditorPresetKey = "SKTeXEditorPreset"
-let SKTeXEditorArgumentsKey = "SKTeXEditorArguments"
-let SKTeXEditorCommandKey = "SKTeXEditorCommand"
-let SKPageBackgroundColorKey = "SKPageBackgroundColor"
-let SKLastOpenFileNamesKey = "SKLastOpenFileNames"
-let SKRememberLastPageViewedKey = "SKRememberLastPageViewed"
-let SKLastToolModeKey = "SKLastToolMode"
-let SKLastAnnotationModeKey = "SKLastAnnotationMode"
-let SKLastFormModeKey = "SKLastFormModeKey"
-let SKLastSelfSignModeKey = "SKLastSelfSignModeKey"
-let SKLastSecondarySelectsTextKey = "SKLastSecondarySelectsText"
-let SKImageInterpolationKey = "SKImageInterpolation"
-
-let SKAnchoredNoteIconTypeKey = "SKAnchoredNoteIconType"
-let SKCircleNoteDashPatternKey = "SKCircleNoteDashPattern"
-let SKDefaultNoteWidthKey = "SKDefaultNoteWidth"
-let SKDefaultNoteHeightKey = "SKDefaultNoteHeight"
-let SKSwatchColorsKey = "SKSwatchColors"
-let SKShowStatusBarKey = "SKShowStatusBar"
-let SKShowBookmarkStatusBarKey = "SKShowBookmarkStatusBar"
-let SKShowNotesStatusBarKey = "SKShowNotesStatusBar"
-let SKEnableAppleRemoteKey = "SKEnableAppleRemote"
-let SKAppleRemoteSwitchIndicationTimeoutKey = "SKAppleRemoteSwitchIndicationTimeout"
-let SKReadMissingNotesFromSkimFileOptionKey = "SKReadMissingNotesFromSkimFileOption"
-let SKReadNonMissingNotesFromSkimFileOptionKey = "SKReadNonMissingNotesFromSkimFileOption"
-let SKBlankAllScreensInFullScreenKey = "SKBlankAllScreensInFullScreen"
-let SKFullScreenNavigationOptionKey = "SKFullScreenNavigationOption"
-let SKPresentationNavigationOptionKey = "SKPresentationNavigationOption"
-let SKAutoHidePresentationContentsKey = "SKAutoHidePresentationContents"
-let SKUseNormalLevelForPresentationKey = "SKUseNormalLevelForPresentation"
-let SKAutoOpenDownloadsWindowKey = "SKAutoOpenDownloadsWindow"
-let SKAutoRemoveFinishedDownloadsKey = "SKAutoRemoveFinishedDownloads"
-let SKAutoCloseDownloadsWindowKey = "SKAutoCloseDownloadsWindow"
-let SKShouldSetCreatorCodeKey = "SKShouldSetCreatorCode"
-let SKSequentialPageNumberingKey = "SKSequentialPageNumbering"
-let SKDisablePinchZoomKey = "SKDisablePinchZoom"
-let SKDisableModificationDateKey = "SKDisableModificationDate"
-let SKDisableAnimationsKey = "SKDisableAnimations"
-let SKDisableUpdateContentsFromEnclosedTextKey = "SKDisableUpdateContentsFromEnclosedText"
-let SKCaseInsensitiveSearchKey = "SKCaseInsensitiveSearch"
-let SKWholeWordSearchKey = "SKWholeWordSearch"
-let SKCaseInsensitiveNoteSearchKey = "SKCaseInsensitiveNoteSearch"
-let SKCaseInsensitiveFindKey = "SKCaseInsensitiveFind"
-let SKDownloadsDirectoryKey = "SKDownloadsDirectory"
-let SKDisableSearchAfterSpotlighKey = "SKDisableSearchAfterSpotligh"
-let SKDisplayNoteBoundsKey = "SKDisplayNoteBounds"
-let SKDisplayPageBoundsKey = "SKDisplayPageBounds"
-
-let SKAnnotationTextWidgetFieldNameKey = "SKAnnotationTextWidgetFieldNameKey"
-let SKAnnotationTextWidgetDisplayKey = "SKAnnotationTextWidgetDisplayKey"
-let SKAnnotationTextWidgetPrintKey = "SKAnnotationTextWidgetPrintKey"
-let SKAnnotationTextWidgetFontColorKey = "SKAnnotationTextWidgetFontColorKey"
-let SKAnnotationTextWidgetBackgroundColorKey = "SKAnnotationTextWidgetBackgroundColorKey"
-
-let SKAnnotationTextWidgetAlignmenKey = "SKAnnotationTextWidgetAlignmenKey"
-let SKAnnotationTextMultilineKey = "SKAnnotationTextMultilineKey"
-let SKAnnotationTextStringValueKey = "SKAnnotationStringValueMultilineKey"
-
-let SKAnnotationRadioButtonWidgetFieldNameKey = "SKAnnotationRadioButtonWidgetFieldNameKey"
-let SKAnnotationRadioButtonWidgetDisplayKey = "SKAnnotationRadioButtonWidgetDisplayKey"
-let SKAnnotationRadioButtonWidgetPrintKey = "SKAnnotationRadioButtonWidgetPrintKey"
-let SKAnnotationRadioButtonWidgetBackgroundColorKey = "SKAnnotationRadioButtonWidgetBackgroundColorKey"
-let SKAnnotationRadioButtonWidgetSelectedKey = "SKAnnotationRadioButtonWidgetSelectedKey"
-let SKAnnotationRadioButtonWidgetAddTextKey = "SKAnnotationRadioButtonWidgetAddTextKey"
-let SKAnnotationRadioButtonWidgetFontNameKey = "SKAnnotationRadioButtonWidgetFontNameKey"
-let SKAnnotationRadioButtonWidgetFontColorKey = "SKAnnotationRadioButtonWidgetFontColorKey"
-let SKAnnotationRadioButtonWidgetFontSizeKey = "SKAnnotationRadioButtonWidgetFontSizeKey"
-let SKAnnotationRadioButtonWidgetOnStateValue = "SKAnnotationRadioButtonWidgetOnStateValue"
-
-let SKAnnotationCheckBoxWidgetFieldNameKey = "SKAnnotationCheckBoxWidgetFieldNameKey"
-let SKAnnotationCheckBoxWidgetDisplayKey = "SKAnnotationCheckBoxWidgetDisplayKey"
-let SKAnnotationCheckBoxWidgetPrintKey = "SKAnnotationCheckBoxWidgetPrintKey"
-let SKAnnotationCheckBoxWidgetBackgroundColorKey = "SKAnnotationCheckBoxWidgetBackgroundColorKey"
-let SKAnnotationCheckBoxWidgetSelectedKey = "SKAnnotationCheckBoxWidgetSelectedKey"
-let SKAnnotationCheckBoxWidgetAddTextKey = "SKAnnotationCheckBoxWidgetAddTextKey"
-let SKAnnotationCheckBoxWidgetFontNameKey = "SKAnnotationCheckBoxWidgetFontNameKey"
-let SKAnnotationCheckBoxWidgetFontColorKey = "SKAnnotationCheckBoxWidgetFontColorKey"
-let SKAnnotationCheckBoxWidgetFontSizeKey = "SKAnnotationCheckBoxWidgetFontSizeKey"
-
-let SKAnnotationActionButtonWidgetFieldNameKey = "SKAnnotationActionButtonWidgetFieldNameKey"
-let SKAnnotationActionButtonWidgetDisplayKey = "SKAnnotationActionButtonWidgetDisplayKey"
-let SKAnnotationActionButtonWidgetPrintKey = "SKAnnotationActionButtonWidgetPrintKey"
-let SKAnnotationActionButtonWidgetBackgroundColorKey = "SKAnnotationActionButtonWidgetBackgroundColorKey"
-let SKAnnotationActionButtonWidgetFontColorKey = "SKAnnotationActionButtonWidgetFontColorKey"
-let SKAnnotationActionButtonWidgetFontSizeKey = "SKAnnotationActionButtonWidgetFontSizeKey"
-let SKAnnotationActionButtonWidgetFontNameKey = "SKAnnotationActionButtonWidgetFontNameKey"
-let SKAnnotationActionButtonWidgetCaptionKey = "SKAnnotationActionButtonWidgetCaptionKey"
-let SKAnnotationActionButtonWidgetActionKey = "SKAnnotationActionButtonWidgetActionKey"
-let SKAnnotationActionButtonWidgetActionNameKey = "SKAnnotationActionButtonWidgetActionNameKey"
-let SKAnnotationActionButtonWidgetActionURLKey = "SKAnnotationActionButtonWidgetActionURLKey"
-
-let SKAnnotationChoiceListWidgetFieldNameKey = "SKAnnotationChoiceListWidgetFieldNameKey"
-let SKAnnotationChoiceListWidgetDisplayKey = "SKAnnotationChoiceListWidgetDisplayKey"
-let SKAnnotationChoiceListWidgetPrintKey = "SKAnnotationChoiceListWidgetPrintKey"
-let SKAnnotationChoiceListWidgetBackgroundColorKey = "SKAnnotationChoiceListWidgetBackgroundColorKey"
-let SKAnnotationChoiceListWidgetFontColorKey = "SKAnnotationChoiceListWidgetFontColorKey"
-let SKAnnotationChoiceListWidgetFontSizeKey = "SKAnnotationChoiceListWidgetFontSizeKey"
-let SKAnnotationChoiceListWidgetFontNameKey = "SKAnnotationChoiceListWidgetFontNameKey"
-let SKAnnotationChoiceListWidgetChoicesKey = "SKAnnotationChoiceListWidgetChoicesKey"
-
-let SKAnnotationChoiceWidgetFieldNameKey = "SKAnnotationChoiceWidgetFieldNameKey"
-let SKAnnotationChoiceWidgetDisplayKey = "SKAnnotationChoiceWidgetDisplayKey"
-let SKAnnotationChoiceWidgetPrintKey = "SKAnnotationChoiceWidgetPrintKey"
-let SKAnnotationChoiceWidgetBackgroundColorKey = "SKAnnotationChoiceWidgetBackgroundColorKey"
-let SKAnnotationChoiceWidgetFontColorKey = "SKAnnotationChoiceWidgetFontColorKey"
-let SKAnnotationChoiceWidgetFontSizeKey = "SKAnnotationChoiceWidgetFontSizeKey"
-let SKAnnotationChoiceWidgetFontNameKey = "SKAnnotationChoiceWidgetFontNameKey"
-let SKAnnotationChoiceWidgetChoicesKey = "SKAnnotationChoiceWidgetChoicesKey"
-
-let SKAnnotationSignatureWidgetFieldNameKey = "SKAnnotationSignatureWidgetFieldNameKey"
-let SKAnnotationSignatureWidgetDisplayKey = "SKAnnotationSignatureWidgetFieldNameKey"
-let SKAnnotationSignatureWidgetPrintKey = "SKAnnotationSignatureWidgetFieldNameKey"
-
-//Fill & Sign
-
-let SKAnnotationSelfSignDotColorKey = "CAnnotationSelfSignDotColor"
-let SKAnnotationSelfSignLineColorKey = "CAnnotationSelfSignLineColor"
-let SKAnnotationSelfSignCircleColorKey = "CAnnotationSelfSignCircleColor"
-let SKAnnotationSelfSignTureColorKey = "SKAnnotationSelfSignTureColorKey"
-let SKAnnotationSelfSignFalseColorKey = "CAnnotationSelfSignFalseColor"
-let SKAnnotationSelfSignPlaceHolderStringKey = "SKAnnotationSelfSignPlaceHolderStringKey"
-let SKAnnotationSelfSignDateFormatterKey = "CAnnotationSelfSignDateFormatter"
-let SKAnnotationSelfSignDateFormatterIncludeTimeKey = "CAnnotationSelfSignDateFormatterIncludeTime"
-
-
-let SKAnnotationSelfSignDotLineWidthKey = "SKAnnotationSelfSignDotLineWidthKey"
-let SKAnnotationSelfSignLineLineWidthKey = "CAnnotationSelfSignLineLineWidth"
-let SKAnnotationSelfSignCircleLineWidthKey = "CAnnotationSelfSignCircleLineWidth"
-let SKAnnotationSelfSignTureLineWidthKey = "CAnnotationSelfSignTureLineWidth"
-let SKAnnotationSelfSignFalseLineWidthKey = "CAnnotationSelfSignFalseLineWidth"
-
-let SKLastVersionLaunchedKey            = "SKLastVersionLaunched"
-
-//OCR
-let KMOCRPlanNumber = "KMOCRPlanNumber"
-
-//license key
-let KMPDFKitKey = "vEeYzYqkir/aYIfrBDmhQEj2omreQNEjmVvLFlAV82dFc/aIwVlR4TZX9zgHb2zFW9+cK5/DeiisEwS5yrto3CFY2Q9MqLwIATeSF1vlV0bhRLYexOw8Sabyzl9iOYufVyFQz68T7jCZVkXEKukJMi06Zpqwc5F/tGnrnrzkydk="
-let KMPDFKitSecret = "mG0c3O3Mzeu5dkZJW3gpqh188cTuhYlGRPrbR/gfX4rCrm/O2+fI9yUYXNZ/JY1KPbFCeKgG+lEVwrbGHrpAyXATqjrt8ApqRYhafFooQjwAFgayISwZT/pa4NjR459gu4aGVjtYuk+Uxs/kosIBwyxQV1SVCQFsC27oMGz5P/rBQYv0T/D0N0z+Um3U+I+tG7BHAIgXXXaVusko5CeqTkm+stgaO9rjBr8W89IPRRCg5dRM1r/xf9BsO0NNqcqQDBaBDLYysZFZsvpYi1vbvQ=="
-
-let KMPDFKit_FreeKey = "1vz4jXcu5aWfQMr627tGjHjWHG+72WKPzgwSoeGqDlRtLAxe4CTHas7qUep1D46CjreeqLWWV06cFepolm8wCBlZscJaV9/dCyDMi/zMTh47O+sIky0oYdusH/8+jyGruF4pgtinJ/oZg/P95jw4/E0HpoZ9AH9eGpD2XRy8mHk="
-
-let KMPDFKit_FreeSecret = "mG0c3O3Mzeu5dkZJW3gpqh188cTuhYlGRPrbR/gfX4rCrm/O2+fI9yUYXNZ/JY1KPbFCeKgG+lEVwrbGHrpAyXATqjrt8ApqRYhafFooQjwAFgayISwZT/pa4NjR459gu4aGVjtYuk+Uxs/kosIBwyxQV1SVCQFsC27oMGz5P/rBQYv0T/D0N0z+Um3U+I+tG7BHAIgXXXaVusko5CeqTvQgas5D7/+aJEhkQvgEI0O+1BYV01oFLnRch1j6tFihDymhFKcLuOq5fKgsuDdHcA=="
-
-
-let KMComPDFKit_ConversionKey = "rnGUG/o2Dn+g8hcnmxgCQDh0GgeLwyZVgSuM7ecR47T9S2bnW02rckX4KhZaRQuMNOMnEAmr+7KXodRRhgF3S21GjwvdzUQvegav3kg0oFVHqR9e7vsaSWVtpAjoJFL3pk6xsH8uLf13UTSAPZJkqm7nZCLwHL85fiVPcDJD8RE="
-
-let KMComPDFKit_ConversionSecret = "mG0c3O3Mzeu5dkZJW3gpqqFRGIktEUTr3N7MWERzNh/7rDlDXAYp6ebnHnHEdcFleiP4OkM17dhQ9pWvnVPbJOIDC/XIeZ7j/POUbhtIPbOZ3pnCWorSKPeQWqupmvSjMv7C2jvq4o0q6sQtN3jR4897KG6mIUGJSRuOsvjYroUBuvPdaghEu3X+XEDfWHsSGmmM2OPfZmckrGW/KP13rb8TdeaHIEX2khN2RJTdbnY="
-
-let KMComPDFKit_Conversion_FreeKey = "0GlqazsfP4IwQoWL/6baqg+CN7l67d9FF0N3U4bBSLhmvR60yAnkkBesqA8agcAaswc5ugjeuEvGnUqi7SLvz6k8f7LqcbDiVIQLTv57527J0AoKYSECIVvbiY9V1ITRv0GI+05iQtIRD9CPDVIoSf/TPiylxglXhnl6PeFazoA="
-
-let KMComPDFKit_Conversion_FreeSecret = "mG0c3O3Mzeu5dkZJW3gpqqFRGIktEUTr3N7MWERzNh/7rDlDXAYp6ebnHnHEdcFleiP4OkM17dhQ9pWvnVPbJOIDC/XIeZ7j/POUbhtIPbOZ3pnCWorSKPeQWqupmvSjMv7C2jvq4o0q6sQtN3jR4897KG6mIUGJSRuOsvjYroXP4neJlIQii5tjFEKC59L5S32wgJX2ceb3xBQSCnO9vtnsa41fJuMqWbPW2c3qJUemdtKP7E4eFYSl6tjgcetK"
-
-let KMNCompanyEamil = "support@pdfreaderpro.com"
-
-let KMNAppName = "PDF Reader Pro"
-
-let KMNCompanyWebsite = "https://www.pdfreaderpro.com"
-
 extension NSString {
     
     //标识符

+ 13 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/Form/CPDFButtonWidgetAnnotation+PDFListView.swift

@@ -359,4 +359,17 @@ extension CPDFButtonWidgetAnnotation {
         
         CPDFAnnotationConfig.setDefaultFloatValue(size, toKey: SKAnnotationTextWidgetFontSizeKey)
     }
+    
+    class func update(_ annotations: [CPDFButtonWidgetAnnotation], mouseUpAction action: CPDFAction?, PDFView pdfView: CPDFListView?) {
+        guard let pdfView = pdfView else {
+            return
+        }
+        for annotation in annotations {
+            annotation.setMouseUpAction(action)
+        }
+        pdfView.setNeedsDisplayMultiAnnotations(annotations)
+        
+    }
+    
+    
 }

+ 160 - 0
PDF Office/PDF Master/Class/URLManager/KMURLConfigManager.swift

@@ -8,6 +8,166 @@
 import Foundation
 
 
+let SKAutoCheckFileUpdateKey = "SKAutoCheckFileUpdate"
+let SKAutoReloadFileUpdateKey = "SKAutoReloadFileUpdate"
+let SKTeXEditorPresetKey = "SKTeXEditorPreset"
+let SKTeXEditorArgumentsKey = "SKTeXEditorArguments"
+let SKTeXEditorCommandKey = "SKTeXEditorCommand"
+let SKPageBackgroundColorKey = "SKPageBackgroundColor"
+let SKLastOpenFileNamesKey = "SKLastOpenFileNames"
+let SKRememberLastPageViewedKey = "SKRememberLastPageViewed"
+let SKLastToolModeKey = "SKLastToolMode"
+let SKLastAnnotationModeKey = "SKLastAnnotationMode"
+let SKLastFormModeKey = "SKLastFormModeKey"
+let SKLastSelfSignModeKey = "SKLastSelfSignModeKey"
+let SKLastSecondarySelectsTextKey = "SKLastSecondarySelectsText"
+let SKImageInterpolationKey = "SKImageInterpolation"
+
+let SKAnchoredNoteIconTypeKey = "SKAnchoredNoteIconType"
+let SKCircleNoteDashPatternKey = "SKCircleNoteDashPattern"
+let SKDefaultNoteWidthKey = "SKDefaultNoteWidth"
+let SKDefaultNoteHeightKey = "SKDefaultNoteHeight"
+let SKSwatchColorsKey = "SKSwatchColors"
+let SKShowStatusBarKey = "SKShowStatusBar"
+let SKShowBookmarkStatusBarKey = "SKShowBookmarkStatusBar"
+let SKShowNotesStatusBarKey = "SKShowNotesStatusBar"
+let SKEnableAppleRemoteKey = "SKEnableAppleRemote"
+let SKAppleRemoteSwitchIndicationTimeoutKey = "SKAppleRemoteSwitchIndicationTimeout"
+let SKReadMissingNotesFromSkimFileOptionKey = "SKReadMissingNotesFromSkimFileOption"
+let SKReadNonMissingNotesFromSkimFileOptionKey = "SKReadNonMissingNotesFromSkimFileOption"
+let SKBlankAllScreensInFullScreenKey = "SKBlankAllScreensInFullScreen"
+let SKFullScreenNavigationOptionKey = "SKFullScreenNavigationOption"
+let SKPresentationNavigationOptionKey = "SKPresentationNavigationOption"
+let SKAutoHidePresentationContentsKey = "SKAutoHidePresentationContents"
+let SKUseNormalLevelForPresentationKey = "SKUseNormalLevelForPresentation"
+let SKAutoOpenDownloadsWindowKey = "SKAutoOpenDownloadsWindow"
+let SKAutoRemoveFinishedDownloadsKey = "SKAutoRemoveFinishedDownloads"
+let SKAutoCloseDownloadsWindowKey = "SKAutoCloseDownloadsWindow"
+let SKShouldSetCreatorCodeKey = "SKShouldSetCreatorCode"
+let SKSequentialPageNumberingKey = "SKSequentialPageNumbering"
+let SKDisablePinchZoomKey = "SKDisablePinchZoom"
+let SKDisableModificationDateKey = "SKDisableModificationDate"
+let SKDisableAnimationsKey = "SKDisableAnimations"
+let SKDisableUpdateContentsFromEnclosedTextKey = "SKDisableUpdateContentsFromEnclosedText"
+let SKCaseInsensitiveSearchKey = "SKCaseInsensitiveSearch"
+let SKWholeWordSearchKey = "SKWholeWordSearch"
+let SKCaseInsensitiveNoteSearchKey = "SKCaseInsensitiveNoteSearch"
+let SKCaseInsensitiveFindKey = "SKCaseInsensitiveFind"
+let SKDownloadsDirectoryKey = "SKDownloadsDirectory"
+let SKDisableSearchAfterSpotlighKey = "SKDisableSearchAfterSpotligh"
+let SKDisplayNoteBoundsKey = "SKDisplayNoteBounds"
+let SKDisplayPageBoundsKey = "SKDisplayPageBounds"
+
+let SKAnnotationTextWidgetFieldNameKey = "SKAnnotationTextWidgetFieldNameKey"
+let SKAnnotationTextWidgetDisplayKey = "SKAnnotationTextWidgetDisplayKey"
+let SKAnnotationTextWidgetPrintKey = "SKAnnotationTextWidgetPrintKey"
+let SKAnnotationTextWidgetFontColorKey = "SKAnnotationTextWidgetFontColorKey"
+let SKAnnotationTextWidgetBackgroundColorKey = "SKAnnotationTextWidgetBackgroundColorKey"
+
+let SKAnnotationTextWidgetAlignmenKey = "SKAnnotationTextWidgetAlignmenKey"
+let SKAnnotationTextMultilineKey = "SKAnnotationTextMultilineKey"
+let SKAnnotationTextStringValueKey = "SKAnnotationStringValueMultilineKey"
+
+let SKAnnotationRadioButtonWidgetFieldNameKey = "SKAnnotationRadioButtonWidgetFieldNameKey"
+let SKAnnotationRadioButtonWidgetDisplayKey = "SKAnnotationRadioButtonWidgetDisplayKey"
+let SKAnnotationRadioButtonWidgetPrintKey = "SKAnnotationRadioButtonWidgetPrintKey"
+let SKAnnotationRadioButtonWidgetBackgroundColorKey = "SKAnnotationRadioButtonWidgetBackgroundColorKey"
+let SKAnnotationRadioButtonWidgetSelectedKey = "SKAnnotationRadioButtonWidgetSelectedKey"
+let SKAnnotationRadioButtonWidgetAddTextKey = "SKAnnotationRadioButtonWidgetAddTextKey"
+let SKAnnotationRadioButtonWidgetFontNameKey = "SKAnnotationRadioButtonWidgetFontNameKey"
+let SKAnnotationRadioButtonWidgetFontColorKey = "SKAnnotationRadioButtonWidgetFontColorKey"
+let SKAnnotationRadioButtonWidgetFontSizeKey = "SKAnnotationRadioButtonWidgetFontSizeKey"
+let SKAnnotationRadioButtonWidgetOnStateValue = "SKAnnotationRadioButtonWidgetOnStateValue"
+
+let SKAnnotationCheckBoxWidgetFieldNameKey = "SKAnnotationCheckBoxWidgetFieldNameKey"
+let SKAnnotationCheckBoxWidgetDisplayKey = "SKAnnotationCheckBoxWidgetDisplayKey"
+let SKAnnotationCheckBoxWidgetPrintKey = "SKAnnotationCheckBoxWidgetPrintKey"
+let SKAnnotationCheckBoxWidgetBackgroundColorKey = "SKAnnotationCheckBoxWidgetBackgroundColorKey"
+let SKAnnotationCheckBoxWidgetSelectedKey = "SKAnnotationCheckBoxWidgetSelectedKey"
+let SKAnnotationCheckBoxWidgetAddTextKey = "SKAnnotationCheckBoxWidgetAddTextKey"
+let SKAnnotationCheckBoxWidgetFontNameKey = "SKAnnotationCheckBoxWidgetFontNameKey"
+let SKAnnotationCheckBoxWidgetFontColorKey = "SKAnnotationCheckBoxWidgetFontColorKey"
+let SKAnnotationCheckBoxWidgetFontSizeKey = "SKAnnotationCheckBoxWidgetFontSizeKey"
+
+let SKAnnotationActionButtonWidgetFieldNameKey = "SKAnnotationActionButtonWidgetFieldNameKey"
+let SKAnnotationActionButtonWidgetDisplayKey = "SKAnnotationActionButtonWidgetDisplayKey"
+let SKAnnotationActionButtonWidgetPrintKey = "SKAnnotationActionButtonWidgetPrintKey"
+let SKAnnotationActionButtonWidgetBackgroundColorKey = "SKAnnotationActionButtonWidgetBackgroundColorKey"
+let SKAnnotationActionButtonWidgetFontColorKey = "SKAnnotationActionButtonWidgetFontColorKey"
+let SKAnnotationActionButtonWidgetFontSizeKey = "SKAnnotationActionButtonWidgetFontSizeKey"
+let SKAnnotationActionButtonWidgetFontNameKey = "SKAnnotationActionButtonWidgetFontNameKey"
+let SKAnnotationActionButtonWidgetCaptionKey = "SKAnnotationActionButtonWidgetCaptionKey"
+let SKAnnotationActionButtonWidgetActionKey = "SKAnnotationActionButtonWidgetActionKey"
+let SKAnnotationActionButtonWidgetActionNameKey = "SKAnnotationActionButtonWidgetActionNameKey"
+let SKAnnotationActionButtonWidgetActionURLKey = "SKAnnotationActionButtonWidgetActionURLKey"
+
+let SKAnnotationChoiceListWidgetFieldNameKey = "SKAnnotationChoiceListWidgetFieldNameKey"
+let SKAnnotationChoiceListWidgetDisplayKey = "SKAnnotationChoiceListWidgetDisplayKey"
+let SKAnnotationChoiceListWidgetPrintKey = "SKAnnotationChoiceListWidgetPrintKey"
+let SKAnnotationChoiceListWidgetBackgroundColorKey = "SKAnnotationChoiceListWidgetBackgroundColorKey"
+let SKAnnotationChoiceListWidgetFontColorKey = "SKAnnotationChoiceListWidgetFontColorKey"
+let SKAnnotationChoiceListWidgetFontSizeKey = "SKAnnotationChoiceListWidgetFontSizeKey"
+let SKAnnotationChoiceListWidgetFontNameKey = "SKAnnotationChoiceListWidgetFontNameKey"
+let SKAnnotationChoiceListWidgetChoicesKey = "SKAnnotationChoiceListWidgetChoicesKey"
+
+let SKAnnotationChoiceWidgetFieldNameKey = "SKAnnotationChoiceWidgetFieldNameKey"
+let SKAnnotationChoiceWidgetDisplayKey = "SKAnnotationChoiceWidgetDisplayKey"
+let SKAnnotationChoiceWidgetPrintKey = "SKAnnotationChoiceWidgetPrintKey"
+let SKAnnotationChoiceWidgetBackgroundColorKey = "SKAnnotationChoiceWidgetBackgroundColorKey"
+let SKAnnotationChoiceWidgetFontColorKey = "SKAnnotationChoiceWidgetFontColorKey"
+let SKAnnotationChoiceWidgetFontSizeKey = "SKAnnotationChoiceWidgetFontSizeKey"
+let SKAnnotationChoiceWidgetFontNameKey = "SKAnnotationChoiceWidgetFontNameKey"
+let SKAnnotationChoiceWidgetChoicesKey = "SKAnnotationChoiceWidgetChoicesKey"
+
+let SKAnnotationSignatureWidgetFieldNameKey = "SKAnnotationSignatureWidgetFieldNameKey"
+let SKAnnotationSignatureWidgetDisplayKey = "SKAnnotationSignatureWidgetFieldNameKey"
+let SKAnnotationSignatureWidgetPrintKey = "SKAnnotationSignatureWidgetFieldNameKey"
+
+//Fill & Sign
+
+let SKAnnotationSelfSignDotColorKey = "CAnnotationSelfSignDotColor"
+let SKAnnotationSelfSignLineColorKey = "CAnnotationSelfSignLineColor"
+let SKAnnotationSelfSignCircleColorKey = "CAnnotationSelfSignCircleColor"
+let SKAnnotationSelfSignTureColorKey = "SKAnnotationSelfSignTureColorKey"
+let SKAnnotationSelfSignFalseColorKey = "CAnnotationSelfSignFalseColor"
+let SKAnnotationSelfSignPlaceHolderStringKey = "SKAnnotationSelfSignPlaceHolderStringKey"
+let SKAnnotationSelfSignDateFormatterKey = "CAnnotationSelfSignDateFormatter"
+let SKAnnotationSelfSignDateFormatterIncludeTimeKey = "CAnnotationSelfSignDateFormatterIncludeTime"
+
+
+let SKAnnotationSelfSignDotLineWidthKey = "SKAnnotationSelfSignDotLineWidthKey"
+let SKAnnotationSelfSignLineLineWidthKey = "CAnnotationSelfSignLineLineWidth"
+let SKAnnotationSelfSignCircleLineWidthKey = "CAnnotationSelfSignCircleLineWidth"
+let SKAnnotationSelfSignTureLineWidthKey = "CAnnotationSelfSignTureLineWidth"
+let SKAnnotationSelfSignFalseLineWidthKey = "CAnnotationSelfSignFalseLineWidth"
+
+let SKLastVersionLaunchedKey            = "SKLastVersionLaunched"
+
+//OCR
+let KMOCRPlanNumber = "KMOCRPlanNumber"
+
+//license key
+let KMPDFKitKey = "vEeYzYqkir/aYIfrBDmhQEj2omreQNEjmVvLFlAV82dFc/aIwVlR4TZX9zgHb2zFW9+cK5/DeiisEwS5yrto3CFY2Q9MqLwIATeSF1vlV0bhRLYexOw8Sabyzl9iOYufVyFQz68T7jCZVkXEKukJMi06Zpqwc5F/tGnrnrzkydk="
+let KMPDFKitSecret = "mG0c3O3Mzeu5dkZJW3gpqh188cTuhYlGRPrbR/gfX4rCrm/O2+fI9yUYXNZ/JY1KPbFCeKgG+lEVwrbGHrpAyXATqjrt8ApqRYhafFooQjwAFgayISwZT/pa4NjR459gu4aGVjtYuk+Uxs/kosIBwyxQV1SVCQFsC27oMGz5P/rBQYv0T/D0N0z+Um3U+I+tG7BHAIgXXXaVusko5CeqTkm+stgaO9rjBr8W89IPRRCg5dRM1r/xf9BsO0NNqcqQDBaBDLYysZFZsvpYi1vbvQ=="
+
+let KMPDFKit_FreeKey = "1vz4jXcu5aWfQMr627tGjHjWHG+72WKPzgwSoeGqDlRtLAxe4CTHas7qUep1D46CjreeqLWWV06cFepolm8wCBlZscJaV9/dCyDMi/zMTh47O+sIky0oYdusH/8+jyGruF4pgtinJ/oZg/P95jw4/E0HpoZ9AH9eGpD2XRy8mHk="
+
+let KMPDFKit_FreeSecret = "mG0c3O3Mzeu5dkZJW3gpqh188cTuhYlGRPrbR/gfX4rCrm/O2+fI9yUYXNZ/JY1KPbFCeKgG+lEVwrbGHrpAyXATqjrt8ApqRYhafFooQjwAFgayISwZT/pa4NjR459gu4aGVjtYuk+Uxs/kosIBwyxQV1SVCQFsC27oMGz5P/rBQYv0T/D0N0z+Um3U+I+tG7BHAIgXXXaVusko5CeqTvQgas5D7/+aJEhkQvgEI0O+1BYV01oFLnRch1j6tFihDymhFKcLuOq5fKgsuDdHcA=="
+
+
+let KMComPDFKit_ConversionKey = "rnGUG/o2Dn+g8hcnmxgCQDh0GgeLwyZVgSuM7ecR47T9S2bnW02rckX4KhZaRQuMNOMnEAmr+7KXodRRhgF3S21GjwvdzUQvegav3kg0oFVHqR9e7vsaSWVtpAjoJFL3pk6xsH8uLf13UTSAPZJkqm7nZCLwHL85fiVPcDJD8RE="
+
+let KMComPDFKit_ConversionSecret = "mG0c3O3Mzeu5dkZJW3gpqqFRGIktEUTr3N7MWERzNh/7rDlDXAYp6ebnHnHEdcFleiP4OkM17dhQ9pWvnVPbJOIDC/XIeZ7j/POUbhtIPbOZ3pnCWorSKPeQWqupmvSjMv7C2jvq4o0q6sQtN3jR4897KG6mIUGJSRuOsvjYroUBuvPdaghEu3X+XEDfWHsSGmmM2OPfZmckrGW/KP13rb8TdeaHIEX2khN2RJTdbnY="
+
+let KMComPDFKit_Conversion_FreeKey = "0GlqazsfP4IwQoWL/6baqg+CN7l67d9FF0N3U4bBSLhmvR60yAnkkBesqA8agcAaswc5ugjeuEvGnUqi7SLvz6k8f7LqcbDiVIQLTv57527J0AoKYSECIVvbiY9V1ITRv0GI+05iQtIRD9CPDVIoSf/TPiylxglXhnl6PeFazoA="
+
+let KMComPDFKit_Conversion_FreeSecret = "mG0c3O3Mzeu5dkZJW3gpqqFRGIktEUTr3N7MWERzNh/7rDlDXAYp6ebnHnHEdcFleiP4OkM17dhQ9pWvnVPbJOIDC/XIeZ7j/POUbhtIPbOZ3pnCWorSKPeQWqupmvSjMv7C2jvq4o0q6sQtN3jR4897KG6mIUGJSRuOsvjYroXP4neJlIQii5tjFEKC59L5S32wgJX2ceb3xBQSCnO9vtnsa41fJuMqWbPW2c3qJUemdtKP7E4eFYSl6tjgcetK"
+
+let KMNCompanyEamil = "support@pdfreaderpro.com"
+
+let KMNAppName = "PDF Reader Pro"
+
+let KMNCompanyWebsite = "https://www.pdfreaderpro.com"
 
 let APPMain_Link = NSLocalizedString("https://www.pdfreaderpro.com", comment: "")
 

+ 96 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/RightSideController/Views/Forms/Forms_Button/FormsButtonController.swift

@@ -297,6 +297,9 @@ class FormsButtonController: NSViewController {
         var fontName: String?
         var fontStyle: String?
         var fontSize: CGFloat?
+        
+        var actionType: Int = 0
+        var actionURLString: String?
          
         if let annotation = firstAnnotation {
             //General
@@ -335,6 +338,22 @@ class FormsButtonController: NSViewController {
             fontSize = annotation.fontSize
             
             //Action
+            
+            if let urlAction = annotation.action() as? CPDFURLAction {
+                let actionUrlPath = urlAction.url() ?? ""
+                if actionUrlPath.hasPrefix("http://") || actionUrlPath.hasPrefix("https://") {
+                    actionType = 1
+                    var urlString = actionUrlPath.replacingOccurrences(of: "http://", with: "")
+                    urlString = actionUrlPath.replacingOccurrences(of: "https://", with: "")
+                    actionURLString = urlString
+                } else if actionUrlPath.hasPrefix("mailto:") {
+                    actionType = 0
+                    let urlString = actionUrlPath.components(separatedBy: "mailto:")[1]
+                    actionURLString = urlString
+                }
+            } else {
+                actionType = 2
+            }
         }
         
         if let value = name {
@@ -400,8 +419,23 @@ class FormsButtonController: NSViewController {
         fontSizeSelect.reloadData()
         
         //Action
-        
-        
+        selectActionSelect.selectItemAtIndex(actionType)
+        selectActionSelect.reloadData()
+        
+        actionResultBGView.isHidden = false
+        if actionType == 0 {
+            actionResultLabel.stringValue = KMLocalizedString("Send Email To")
+            actionResultInput.properties.placeholder = KMNCompanyEamil
+        } else if actionType == 1 {
+            actionResultLabel.stringValue = KMLocalizedString("Add Website")
+            actionResultInput.properties.placeholder = KMNCompanyWebsite
+        } else if actionType == 2 {
+            actionResultBGView.isHidden = true
+        }
+        if let value = actionURLString {
+            actionResultInput.properties.text = value
+        }
+        actionResultInput.reloadData()
         
     }
      
@@ -437,6 +471,32 @@ extension FormsButtonController: ComponentInputDelegate {
             CPDFButtonWidgetAnnotation.update(annotations, fieldName: inputView.properties.text, PDFView: pdfView)
         } else if inputView == tagInput {
             CPDFButtonWidgetAnnotation.update(annotations, caption: inputView.properties.text, PDFView: pdfView)
+        } else if inputView == actionResultInput {
+            if selectActionSelect.indexOfSelect() == 0 {
+                var url: String?
+                if actionResultInput.properties.text.hasPrefix("mailto:") {
+                    url = actionResultInput.properties.text
+                } else {
+                    url = "mailto:\(actionResultInput.properties.text)"
+                }
+                if let url = url {
+                    let action = CPDFURLAction(url: url)
+                    CPDFButtonWidgetAnnotation.update(annotations, mouseUpAction: action, PDFView: pdfView)
+                }
+            } else if selectActionSelect.indexOfSelect() == 1 {
+                var url: String?
+                
+                if actionResultInput.properties.text.hasPrefix("https://") {
+                    url = actionResultInput.properties.text
+                } else {
+                    url = "https://\(actionResultInput.properties.text)"
+                }
+                
+                if let url = url {
+                    let action = CPDFURLAction(url: url)
+                    CPDFButtonWidgetAnnotation.update(annotations, mouseUpAction: action, PDFView: pdfView)
+                }
+            }
         }
         reloadData()
     }
@@ -497,6 +557,40 @@ extension FormsButtonController: ComponentSelectDelegate {
                 } else if view?.indexOfSelect() == 3 {
                     CPDFButtonWidgetAnnotation.update(annotations, state: .HideAndPrint, PDFView: pdfView)
                 }
+            } else if view == selectActionSelect {
+                actionResultInput.properties.text = ""
+                actionResultInput.reloadData()
+                
+                if selectActionSelect.indexOfSelect() == 0 {
+                    var url: String?
+                    if actionResultInput.properties.text.hasPrefix("mailto:") {
+                        url = actionResultInput.properties.text
+                    } else {
+                        url = "mailto:\(actionResultInput.properties.text)"
+                    }
+                    if let url = url {
+                        let action = CPDFURLAction(url: url)
+                        CPDFButtonWidgetAnnotation.update(annotations, mouseUpAction: action, PDFView: pdfView)
+                    }
+                } else if selectActionSelect.indexOfSelect() == 1 {
+                    var url: String?
+                    
+                    if actionResultInput.properties.text.hasPrefix("https://") {
+                        url = actionResultInput.properties.text
+                    } else {
+                        url = "https://\(actionResultInput.properties.text)"
+                    }
+                    
+                    if let url = url {
+                        let action = CPDFURLAction(url: url)
+                        CPDFButtonWidgetAnnotation.update(annotations, mouseUpAction: action, PDFView: pdfView)
+                    }
+                } else if selectActionSelect.indexOfSelect() == 2 {
+                    let action = CPDFNamedAction(name: .print)
+                    CPDFButtonWidgetAnnotation.update(annotations, mouseUpAction: action, PDFView: pdfView)
+                }
+                CPDFButtonWidgetAnnotation.update(annotations, caption: tagInput.properties.text, PDFView: pdfView)
+                
             }
             reloadData()
         }