dinglingui 769a574a84 【2025】【综合】自测相关问题修改 17 giờ trước cách đây
..
AD 9ea3e293ad 【综合】远程逻辑新增DFP点击跳转比较表 4 tháng trước cách đây
AIInfo 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Account 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Analytics 94387ccc70 【2025】【综合】代码整理 1 tháng trước cách đây
Appearance 769a574a84 【2025】【综合】自测相关问题修改 17 giờ trước cách đây
AutoSave eaece0c133 【2025】【综合】自动保存逻辑完善 1 tuần trước cách đây
Batch 960c03e764 【2025】【综合】导入会员信息 1 tuần trước cách đây
ChromiumTabs 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
DigtalSignature 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Document 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Foundation Categories 47e426f3c8 【2025】【综合】代码整理 2 tháng trước cách đây
GuideInfo 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Home 4f68069a3b 【2025】【综合】代码整理 1 tháng trước cách đây
KMAdvertisement 960c03e764 【2025】【综合】导入会员信息 1 tuần trước cách đây
KMDeviceBrowserWindowController 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
KMLightMember 189c7ff035 【2025】【综合】代码规范整理 1 tháng trước cách đây
KMResourceDownload 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
MemberCenter 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
OC 28bfa343f5 【2025】【工具】OCR 页面比较多的文档内存问题修复 1 tuần trước cách đây
PDFTools 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
PDFWindowController 769a574a84 【2025】【综合】自测相关问题修改 17 giờ trước cách đây
Parsers a0560d5b30 【2025】【综合】代码整理 2 tháng trước cách đây
Purchase 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
UserFeekback 630b4e2abf 【2025】【综合】多语代码整理 17 giờ trước cách đây
Websocket 4ade2b7b4b 【工程名称更换】免费版本更换 1 năm trước cách đây
README.md fb5844edb0 【2025】移除批量相关代码 2 tuần trước cách đây

README.md

App 需要记录的信息汇总

  • 页签窗口控制器 KMBrowserWindowController
  • 页签窗口 KMBrowserWindowController
  • 文档 KMMainDocument
  • 首页页签内容控制器 KMHomeViewController
  • 阅读页签内容控制器 KMMainViewController
  • 页签操作可查看 KMBrowser

App 架构

  • MVC
  • MVC 目前存在 C 比较臃肿的弊端,但是也是可以使用的,比较臃肿的问题待后续优化.

多页签

  • 页签操作 KMBrowser [CTTabStripModel 实际操作对象]
  • 窗口控制器 KMBrowserWindowController
  • 窗口 KMBrowserWindow
  • 页签区域控制器 KMTabStripController
  • 页签区域 KMTabStripView
  • 页签控制器 CTTabController
  • 页签视图 CTTabView
  • 页签内容控制器 CTTabContentsController [KMHomeViewController + KMMainViewController 都是显示在其上]
  • 页签内容提供者 CTTabContents(文档 当前App对应的是 KMMainDocument)

  • 页签拖拽 CTTabStripDragController

  • 内存管理

  • KMBrowser [-> CTTabStripModel -> KMMainDocument] -> KMMainDocument -> KMBrowser

  • 环形内存引用 让内存不释放。在适当的时机断环来释放内存,避免循环引用.

  • KMBrowser -> KMBrowserWindowController 强引用 页签窗口控制器.

  • 事件传递

  • target-action [KMTabStripController -> CTTabController, CTTabController --> KMTabStripController(target)]

  • 响应者链 [NewTabButton]

  • 通知 [CTTabStripModel]

  • 代理 [KMBrowser -> CTTabStripModel, CTTabStripModel --> KMBrowser(delegate)]

  • 维护建议

  • 新增功能或修复bug,尽量通过重写类来处理,保证三方库内部尽可能少的改动.

Apple Event 开发注意项

  • NSAppleScript 开发注意项 [脚本开发]
  1. Apple Events 设置项 开启
  2. info.plist 新增一项 [Privacy - AppleEvents Sending Usage Description] 授权提示语,在请求系统授权时弹起的授权窗口里提示语.缺失会引起crash,App Store 版本也可能会被拒.
  3. 开启其他程序授权 xx.entitlements 新增一项 [com.apple.security.temporary-exception.apple-events]
  4. Office Word [com.microsoft.word]
  5. Office Excel [com.microsoft.excel]
  6. Office PPT [com.microsoft.powerpoint]
  7. ...
  8. 编码脚本执行 [可见: KMConvertPDFManager]
  • Office 转 PDF
  • 创建空白 PDF 文件
  • 开启 Office 程序,并把原文件路径和需要存储的路径 [空白PDF文件的路径] 传递给 Office 程序. [脚本执行]

  • 脚本执行时会有两处授权

  1. 开启 Office 程序需要授权,只授权一次. [授权后可以在 偏好设置->安全性与隐私->隐私->自动化 里查看授权情况] 2 Office 程序将数据保存为PDF文件时需要授权 [因空白PDF文件是 App的私有路径]
  • 脚本执行错误
  1. 没有授权 [可以在 偏好设置->安全性与隐私->隐私->自动化 里查看授权情况]
  2. Office 程序没有运行 [检查 NSAppleScript 开发注意项里的 1. 2. 3.] ...

KMDrawViewSDK_Mac.framework

drawView?.clear() 
drawView?.resetUndoManager()
操作时留意先后顺序,避免undo操作还可以点击

代码注释

//TODO: 标示有功能代码待编写 - //MARK: mark - //FIXME: 标示代码需要修正 - //!!!: 标示代码需要注意 - //???: 标示代码有疑问 -

App 主要模块的入口

首页

  • 打开文件 & 创建PDF KMCreatPDFView
  • 最近列表 KMHomeHistoryListView

页面编辑

  • 页面编辑【阅读页】
  • KMPDFEditViewController
  • 页面编辑【阅读页】自定义页面范围
  • KMPDFEditPageRangeWindowController
  • 页面编辑【阅读页】插入文件
  • KMPDFEditInsertPageWindow
  • 页面编辑【阅读页】提取
  • KMPDFEditExtractWindow
  • 页面编辑【阅读页】拆分
  • SplitWindowController

  • 插入 【首页快捷工具】

  • KMPDFInsertWindowController

  • 拆分 【首页快捷工具】

  • SplitWindowController

  • 页面编辑 【首页快捷工具】

  • KMPDFEditWindowController

OCR

  • 【首页快捷工具】
  • KMOCRPDFWindowController

AI

  • 概括 & 重写 & 校对 & 翻译
  • AIConfigWindowController
  • AI 购买窗口 AIPurchaseWindowController

合并

  • KMMergeWindowController

批量

  • KMBatchWindowController

图片转PDF

  • KMBatchOperateBaseWindowController

属性面板

  • 分割视图 KMSecondaryViewController
  • 入口 toggleSplitPDF

  • 【注释】

  • KMAnnotationPropertiesViewController

  • 签名 KMSignatureAnnotationViewController

  • 水印

  • 水印模板 KMBatchOperateAddWatermarkViewController

  • 水印模板编辑 KMWatermarkWindowController

  • 背景

  • 背景模板 KMBatchOperateAddWatermarkViewController

  • 背景模板编辑 KMBackgroundWindowController

  • 填写与签名

  • 日期 KMFillSignTextPanel

  • KMAnnotationSelfSignViewController

  • 编辑PDF

  • 文本 KMEditPDFTextPropertyViewController

  • 图片 KMEditImagePropertyViewController

What's New

  • KMFunctionGuideWindowController

信息

  • KMProfileInfoWindowController

幻灯片

  • 选项设置 SKPresentationOptionsSheetController

注释工具

  • 笔记 CPDFListAnnotationNoteWindowController
  • 便签 CPDFListEditAnnotationViewController

填写与签名

  • ✅、叉、矩形、线段、圆点注释 CSelfSignAnnotation
  • 日期注释 CSelfSignAnnotationFreeText
  • 签名注释:CPDFListSignatureAnnotation

数字签名

  • KMPDFDigitalSignViewController
  • 查看证书 DSignatureDetailsViewController

导入 [扫描仪 & 相册]

  • KMDeviceBrowserWindowController

笔记类型窗口

  • KMNotesPanelController

字体设置窗口

文件对比

  • 下方工具bar KMCompareToolbar

xxx

sign in the dashboard. to sign up

  • the **API **

  • the **API **

xxx

See "Samples" folder in this folder.

xxx