Forráskód Böngészése

【2025】【Edit】水印模块优化,更换PDFSDK

niehaoyu 4 hónapja
szülő
commit
15d3540041
49 módosított fájl, 949 hozzáadás és 494 törlés
  1. 1 2
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Button/ComponentButton.swift
  2. 4 0
      PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift
  3. BIN
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit
  4. 5 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFAnnotation.h
  5. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBackground.h
  6. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBookmark.h
  7. 47 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBorderEffect.h
  8. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFChoiceWidgetAnnotation.h
  9. 11 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFCircleAnnotation.h
  10. 0 8
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFDocument+Protected.h
  11. 25 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFDocument.h
  12. 4 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFFreeTextAnnotation.h
  13. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFHeaderFooter.h
  14. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFInkAnnotation.h
  15. 6 8
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFKitConfig+Private.h
  16. 4 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFLineAnnotation.h
  17. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFMarkupAnnotation.h
  18. 9 9
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFMeasureInfo.h
  19. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFOutline.h
  20. 152 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPage+Private.h
  21. 1 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPage.h
  22. 40 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPageMetalView.h
  23. 67 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPageView_Mac.h
  24. 20 4
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPolygonAnnotation.h
  25. 3 3
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPolylineAnnotation.h
  26. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFRedactAnnotation.h
  27. 23 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSignatureAnnotation.h
  28. 28 5
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSignatureWidgetAnnotation.h
  29. 10 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSquareAnnotation.h
  30. 23 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFStampAnnotation.h
  31. 1 1
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFTextWidgetAnnotation.h
  32. 75 17
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFView+Editing.h
  33. 34 6
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFView.h
  34. 5 5
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFWatermark.h
  35. 5 5
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFWidgetAnnotation.h
  36. 1 0
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/ComPDFKit.h
  37. 2 2
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Resources/Info.plist
  38. 105 61
      PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources
  39. 2 5
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift
  40. 1 13
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Controller/KMWatermarkPropertyController.swift
  41. 18 7
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/KMWatermarkController.swift
  42. 22 18
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.swift
  43. 5 5
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.xib
  44. 18 2
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMPDFWatermarkData.swift
  45. 138 201
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMWatermarkManager.swift
  46. 8 5
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateController.swift
  47. 1 1
      PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateItem.swift
  48. 1 0
      PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift
  49. 10 73
      PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

+ 1 - 2
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Button/ComponentButton.swift

@@ -313,13 +313,12 @@ public class ComponentButton: ComponentBaseXibView {
     public override func mouseUp(with event: NSEvent) {
         
         if properties.isDisabled == false {
-            
             if properties.keepPressState == false {
                 properties.state = .hover
                 
                 refreshUI()
             }
-            
+            window?.makeFirstResponder(self)
             if let target = target, let action = action {
                 _ = target.perform(action, with: self)
             }

+ 4 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/Select/ComponentSelect.swift

@@ -230,7 +230,11 @@ public class ComponentSelect: ComponentBaseXibView {
             item.itemSelected = false
             if item == selItemProperty {
                 item.itemSelected = true
+            } else if item.text == properties.text {
+                item.itemSelected = true
+                selItemProperty = item
             }
+            
             if item.type == .normal {
                 viewHeight += 36
             } else if item.type == .divider {

BIN
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 5 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFAnnotation.h

@@ -125,7 +125,7 @@ typedef NS_OPTIONS(NSInteger, CPDFAnnotationFlags) {
  *
  * @discussion Textual content is typically associated with CPDFTextAnnotation and CPDFFreeTextAnnotation annotations.
  */
-@property (nonatomic,retain) NSString *contents;
+@property (nonatomic,strong) NSString *contents;
 
 /**
  * Method to get / set the stroke thickness for the annotation.
@@ -140,7 +140,7 @@ typedef NS_OPTIONS(NSInteger, CPDFAnnotationFlags) {
  * @discussion For the "geometry" annotations (Circle, Ink, Line, Square), the border indicates the line width and whether to draw with a dash pattern or solid pattern.
  * CPDFAnnotation markup types (Highlight, Strikethrough, Underline) ignores the border.
  */
-@property (nonatomic,retain) CPDFBorder *border;
+@property (nonatomic,strong) CPDFBorder *border;
 
 /**
  * Method to get / set the opacity for the annotation.
@@ -151,7 +151,7 @@ typedef NS_OPTIONS(NSInteger, CPDFAnnotationFlags) {
  * Method to get / set the color for the annotation.
  * @discussion For many annotations ("Circle", "Square") the stroke color. Used for other annotations as well.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *color;
+@property (nonatomic,strong) CPDFKitPlatformColor *color;
 
 /**
  * remove color(Set it to transparent, or set SetColor: to nil)
@@ -212,6 +212,8 @@ typedef NS_OPTIONS(NSInteger, CPDFAnnotationFlags) {
  */
 - (void)updateAppearanceStream;
 
+- (void)updateAnnotationRotationAppearanceStream;
+
 #pragma mark - Reply
 
 // Create Reply Annotation

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBackground.h

@@ -34,7 +34,7 @@ typedef NS_ENUM(NSInteger, CPDFBackgroundType) {
 /**
  * Method to get / set the color of the background.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *color;
+@property (nonatomic,strong) CPDFKitPlatformColor *color;
 
 /**
  * Method to get / set the scale of the background.
@@ -54,7 +54,7 @@ typedef NS_ENUM(NSInteger, CPDFBackgroundType) {
 /**
  * Method to get / set the page range of the background by string, such as "0,3,5-7".
  */
-@property (nonatomic,retain) NSString *pageString;
+@property (nonatomic,strong) NSString *pageString;
 
 /**
  * Method to get / set the vertical alignment of the background.

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBookmark.h

@@ -31,11 +31,11 @@
 /**
  * Method to get / set the label for the bookmark.
  */
-@property (nonatomic,retain) NSString *label;
+@property (nonatomic,strong) NSString *label;
 
 /**
  * Method to get / set the date for the bookmark.
  */
-@property (nonatomic,retain) NSDate *date;
+@property (nonatomic,strong) NSDate *date;
 
 @end

+ 47 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFBorderEffect.h

@@ -0,0 +1,47 @@
+//
+//  CPDFBorderEffect.h
+//  ComPDFKit
+//
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ *  The effect intensity ranges from 0 to 2
+ *  Strength is 0 The style is not a cloud
+ */
+typedef NS_ENUM(NSInteger, CPDFIntensityType) {
+    CPDFIntensityTypeZero = 0,
+    CPDFIntensityTypeOne,
+    CPDFIntensityTypeTwo
+};
+
+typedef NS_ENUM(NSInteger, CPDFBorderEffectType) {
+    CPDFBorderEffectTypeSolid,  // Corresponding 'S'
+    CPDFBorderEffectTypeCloudy  // Corresponding 'C'
+};
+
+@interface CPDFBorderEffect : NSObject
+
+/**
+ *  Setting the border effect strength
+ */
+@property (nonatomic, assign) CPDFIntensityType intensityType;
+
+/**
+ *  Setting boundary type
+ *  S is the boundary effect defined by BS, and C is cloudy
+ */
+@property (nonatomic, assign) CPDFBorderEffectType borderEffectType;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFChoiceWidgetAnnotation.h

@@ -14,8 +14,8 @@
 
 @interface CPDFChoiceWidgetItem : NSObject
 
-@property (nonatomic,retain) NSString *value;
-@property (nonatomic,retain) NSString *string;
+@property (nonatomic,strong) NSString *value;
+@property (nonatomic,strong) NSString *string;
 
 @end
 
@@ -41,7 +41,7 @@
 /**
  * Returns an array of CPDFChoiceWidgetItem that represent the items available in the list or pop-up menu of the choice widget annotation.
  */
-@property (nonatomic,retain) NSArray<CPDFChoiceWidgetItem *> *items;
+@property (nonatomic,strong) NSArray<CPDFChoiceWidgetItem *> *items;
 
 @property (nonatomic,assign) NSInteger selectItemAtIndex;
 

+ 11 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFCircleAnnotation.h

@@ -12,6 +12,8 @@
 
 #import <ComPDFKit/CPDFAnnotation.h>
 
+@class CPDFBorderEffect;
+
 /**
  * A CPDFCircleAnnotation object displays an ellipse on a page.
  *
@@ -29,11 +31,19 @@
 /**
  * Method to get / set the fill color used for drawing the annotation.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *interiorColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *interiorColor;
 
 /**
  * remove interior Color(Set it to transparent, or set SetInteriorColor: to nil)
  */
 - (BOOL)removeInteriorColor;
 
+#pragma mark -  Border Effect
+
+/**
+ * Method to get / set the  used for border Effect drawing the annotation.
+ * Cloud border effect for setting annotation
+ */
+@property (nonatomic,strong) CPDFBorderEffect * _Nullable borderEffect;
+
 @end

+ 0 - 8
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFDocument+Protected.h

@@ -12,18 +12,12 @@
 
 #import <ComPDFKit/CPDFDocument.h>
 
-typedef NSString *CPDFDocumentOptimizeOption NS_STRING_ENUM;
-
-extern CPDFDocumentOptimizeOption const CPDFDocumentImageQualityOption; // NSNumber for the image quality.
-
 @class CPDFSignature, CPDFSignatureWidgetAnnotation;
 
 @interface CPDFDocument (Protected)
 
 - (void)setPasswordOptions:(NSDictionary<CPDFDocumentWriteOption, id> *)options DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
 
-- (BOOL)isImageDocument;
-
 #pragma mark - Accessors
 
 - (Class)pageClass;
@@ -47,9 +41,7 @@ extern CPDFDocumentOptimizeOption const CPDFDocumentImageQualityOption; // NSNum
 - (BOOL)exportWidgetDataXFDFPath:(NSString *)xfdfPath DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
 - (BOOL)importWidgetDataWithXFDFPath:(NSString *)xfdfPath DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
 
-#pragma mark - Optimize
 
-- (BOOL)writeOptimizeToURL:(NSURL *)url withOptions:(NSDictionary<CPDFDocumentOptimizeOption, id> *)options;
 
 #pragma mark - Extract
 

+ 25 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFDocument.h

@@ -87,6 +87,11 @@ typedef NS_ENUM(NSInteger, CPDFSignaturePermissions) {
     CPDFSignaturePermissionsAnnotationFillSign,
 };
 
+
+typedef NSString *CPDFDocumentOptimizeOption NS_STRING_ENUM;
+
+extern CPDFDocumentOptimizeOption const CPDFDocumentImageQualityOption; // NSNumber for the image quality.
+
 typedef NSString *CPDFDocumentAttribute NS_STRING_ENUM;
 
 extern CPDFDocumentAttribute const CPDFDocumentTitleAttribute;             // NSString containing document title.
@@ -143,7 +148,7 @@ extern CPDFDocumentWriteOption const CPDFDocumentAllowsFormFieldEntryOption;
  *
  * @see CPDFDocumentDelegate
  */
-@property (nonatomic,assign) id<CPDFDocumentDelegate> delegate;
+@property (nonatomic,weak) id<CPDFDocumentDelegate> delegate;
 
 /**
  * The URL for the document.
@@ -183,6 +188,11 @@ extern CPDFDocumentWriteOption const CPDFDocumentAllowsFormFieldEntryOption;
  */
 @property (nonatomic,readonly) BOOL isLocked;
 
+/**
+ * A Boolean value indicating whether the document is image.
+ */
+- (BOOL)isImageDocument;
+
 /**
  * Attempts to unlock an encrypted document.
  *
@@ -295,6 +305,18 @@ extern CPDFDocumentWriteOption const CPDFDocumentAllowsFormFieldEntryOption;
  */
 - (BOOL)writeDecryptToURL:(NSURL *)url isSaveFontSubset:(BOOL)isSaveFontSubset;
 
+#pragma mark - Optimize
+
+/**
+ * Compress Document
+ * param CPDFDocumentOptimizeOptionRange : 1~120, Default is 30.0.The higher the value, the better the quality of the picture
+ */
+- (void)writeOptimizeToURL:(NSURL *)url
+               withOptions:(NSDictionary<CPDFDocumentOptimizeOption, id> *)options
+           progressHandler:(void (^_Nullable)(float cPageIndex, float totalPageIndex))progressHandler
+             cancelHandler:(BOOL (^_Nullable)(void))cancelHandler
+         completionHandler:(void (^_Nullable)(BOOL finished))completionHandler;
+
 #pragma mark - Attributes
 
 /**
@@ -693,6 +715,8 @@ extern CPDFDocumentWriteOption const CPDFDocumentAllowsFormFieldEntryOption;
 
 @interface CPDFDocument (Deprecated)
 
+- (BOOL)writeOptimizeToURL:(NSURL *)url withOptions:(NSDictionary<CPDFDocumentOptimizeOption, id> *)options DEPRECATED_MSG_ATTRIBUTE("Use writeOptimizeToURL:withOptions:progressHandler:cancelHandler:completionHandler:");
+
 - (BOOL)writeToURL:(NSURL *)url DEPRECATED_MSG_ATTRIBUTE("Use writeToURL:isSaveFontSubset:");
 
 - (BOOL)writeToURL:(NSURL *)url withOptions:(NSDictionary<CPDFDocumentWriteOption, id> *)options DEPRECATED_MSG_ATTRIBUTE("Use writeToURL:withOptions:isSaveFontSubset:");

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFFreeTextAnnotation.h

@@ -25,13 +25,13 @@
  * Method to get the font used for the annotation’s text field.
  * Set freetext after manually updateAppearanceStream
  */
-@property (nonatomic,retain) CPDFKitPlatformFont *font DEPRECATED_MSG_ATTRIBUTE("use setCFont: and setFontSize:");
+@property (nonatomic,strong) CPDFKitPlatformFont *font DEPRECATED_MSG_ATTRIBUTE("use setCFont: and setFontSize:");
 
 /**
  * Method to set the font name used for the annotation’s text field.
  * Set freetext after manually updateAppearanceStream
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s text field.
@@ -43,7 +43,7 @@
  * Method to get / set the font color used in the text field of the annotation.
  * Set freetext after manually updateAppearanceStream
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *fontColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *fontColor;
 
 /**
  * Method to get / set the horizontal alignment of text within the bounds of the annotation.
@@ -57,6 +57,6 @@
  * Method to get / set the border color used for the form field.
  * Set freetext after manually updateAppearanceStream
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *borderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *borderColor;
 
 @end

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFHeaderFooter.h

@@ -22,7 +22,7 @@
 /**
  * Method to get / set the page range of the header & footer by string, such as "0,3,5-7".
  */
-@property (nonatomic,retain) NSString *pageString;
+@property (nonatomic,strong) NSString *pageString;
 
 /**
  * Method to get / set the margins of the header & footer.

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFInkAnnotation.h

@@ -23,6 +23,6 @@
 /**
  * Method to get / set an array containing the points that make up an annotation.
  */
-@property (nonatomic,retain) NSArray<NSArray *> *paths;
+@property (nonatomic,strong) NSArray<NSArray *> *paths;
 
 @end

+ 6 - 8
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFKitConfig+Private.h

@@ -18,7 +18,6 @@ typedef NS_ENUM(NSInteger, FreeHandPenStyle) {
 };
 
 @interface CPDFKitConfig () {
-    dispatch_queue_t _queue;
     dispatch_queue_t _searchQueue;
 }
 
@@ -29,6 +28,7 @@ typedef NS_ENUM(NSInteger, FreeHandPenStyle) {
 @property (nonatomic,assign) CGFloat  shapeThickness;
 @property (nonatomic,assign) BOOL     drawFillColor;
 @property (nonatomic,assign) BOOL     drawBorderColor;
+@property (nonatomic,assign) BOOL     automaticTestMode;
 
 @property (nonatomic,assign) FreeHandPenStyle freehandPenType;
 @property (nonatomic,assign) CGFloat pencilOpcity;
@@ -36,19 +36,17 @@ typedef NS_ENUM(NSInteger, FreeHandPenStyle) {
 @property (nonatomic,assign) CGFloat pencilSize;
 @property (nonatomic,assign) CGFloat micPenSize;
 
-@property (nonatomic,retain) CPDFKitPlatformColor  *typeWriteColor;
-@property (nonatomic,retain) NSString *typeWriteFontName;
+@property (nonatomic,strong) CPDFKitPlatformColor  *typeWriteColor;
+@property (nonatomic,strong) NSString *typeWriteFontName;
 @property (nonatomic,assign) CGFloat   typeWriteFontSize;
 @property (nonatomic,assign) CGFloat   typeWriteOpacity;
 
 @property (nonatomic,assign) BOOL  isShowFormRequiredFlagColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
-@property (nonatomic,retain) CPDFKitPlatformColor  *formRequiredFlagColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
-@property (nonatomic,retain) CPDFKitPlatformColor  *enableFormFieldHighlightColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
-@property (nonatomic,retain) CPDFKitPlatformColor  *enableLinkFieldHighlightColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
+@property (nonatomic,strong) CPDFKitPlatformColor  *formRequiredFlagColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
+@property (nonatomic,strong) CPDFKitPlatformColor  *enableFormFieldHighlightColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
+@property (nonatomic,strong) CPDFKitPlatformColor  *enableLinkFieldHighlightColor DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
 @property (nonatomic,assign) BOOL isShowReadOnlySignatureAnnotation DEPRECATED_MSG_ATTRIBUTE("The api is currently in beta and Untested");
 
-- (dispatch_queue_t)queue;
-
 - (dispatch_queue_t)searchQueue;
 
 @end

+ 4 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFLineAnnotation.h

@@ -78,7 +78,7 @@ typedef NS_ENUM(NSInteger, CPDFLineStyle) {
  *
  * @discussion The ornament at the end of a line is optional (for more information, see the Adobe PDF Specification 1.4).
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *interiorColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *interiorColor;
 
 /**
  * remove interior Color(Set it to transparent, or set SetInteriorColor: to nil)
@@ -93,7 +93,7 @@ typedef NS_ENUM(NSInteger, CPDFLineStyle) {
 /**
  * Method to set the font  used for the annotation’s measure text field.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s measure text field.
@@ -103,7 +103,7 @@ typedef NS_ENUM(NSInteger, CPDFLineStyle) {
 /**
  * Method to get / set the font color used in the measure text field of the annotation.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *fontColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *fontColor;
 
 /**
  * Method to get / set the measure info of the annotation after added to page.
@@ -111,6 +111,6 @@ typedef NS_ENUM(NSInteger, CPDFLineStyle) {
  * @discussion The measurement properties of a annotation cannot be cleared by setting the measurement properties of the annotation to empty
  * Set MeasureInfo: This information will not be effective until it is added to the page
  */
-@property (nonatomic,retain) CPDFDistanceMeasureInfo * _Nullable measureInfo;
+@property (nonatomic,strong) CPDFDistanceMeasureInfo * _Nullable measureInfo;
 
 @end

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFMarkupAnnotation.h

@@ -39,7 +39,7 @@ typedef NS_ENUM(NSInteger, CPDFMarkupType) {
  * the next point will be the upper right, the third point will represent the lower left of the text and the last point the lower right.
  * Page space is a coordinate system with the origin at the lower-left corner of the current page.
  */
-@property (nonatomic,retain) NSArray *quadrilateralPoints;
+@property (nonatomic,strong) NSArray *quadrilateralPoints;
 
 /**
  * Gets the markup style.

+ 9 - 9
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFMeasureInfo.h

@@ -77,15 +77,15 @@ typedef NS_OPTIONS(NSInteger, CPDFCaptionType) {
 /**
  *  Setting the decimal symbol in the measurement property value
  */
-@property (nonatomic,retain) NSString *decimalSymbol;
+@property (nonatomic,strong) NSString *decimalSymbol;
 /**
  *  Setting the thousand symbol in the measurement property value
  */
-@property (nonatomic,retain) NSString *thousandSymbol;
+@property (nonatomic,strong) NSString *thousandSymbol;
 /**
  *  Setting the decimal part display mode in the measurement property value
  */
-@property (nonatomic,retain) NSString *display;
+@property (nonatomic,strong) NSString *display;
 /**
  *  Setting the precision in the measurement property value
  */
@@ -93,29 +93,29 @@ typedef NS_OPTIONS(NSInteger, CPDFCaptionType) {
 /**
  *  Setting the unit prefix in the measurement property value
  */
-@property (nonatomic,retain) NSString *unitPrefix;
+@property (nonatomic,strong) NSString *unitPrefix;
 /**
  *  Setting the unit suffix in the measurement property value
  */
-@property (nonatomic,retain) NSString *unitSuffix;
+@property (nonatomic,strong) NSString *unitSuffix;
 /**
  *  Setting the unit position, units before/after the calculation result, before P, after S
  */
-@property (nonatomic,retain) NSString *unitPosition;
+@property (nonatomic,strong) NSString *unitPosition;
 /**
  *  Setting the scale in the measurement property value
  */
 @property (nonatomic,assign) CGFloat rulerBase;
 
-@property (nonatomic,retain) NSString *rulerBaseUnit;
+@property (nonatomic,strong) NSString *rulerBaseUnit;
 
 @property (nonatomic,assign) CGFloat rulerTranslate;
 
-@property (nonatomic,retain) NSString *rulerTranslateUnit;
+@property (nonatomic,strong) NSString *rulerTranslateUnit;
 /**
  *  Setting the format value in the measurement property value
  */
-@property (nonatomic,retain) NSString *formatValue;
+@property (nonatomic,strong) NSString *formatValue;
 /**
  *  Setting the CPDFCaptionType in the measurement property value
  */

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFOutline.h

@@ -52,7 +52,7 @@
  *
  * @discussion The root outline serves only as a container for the outlines it owns; it does not have a label.
  */
-@property (nonatomic,retain) NSString *label;
+@property (nonatomic,strong) NSString *label;
 
 /**
  * Method to get / set the destination associated with the outline.
@@ -63,7 +63,7 @@
  * Note that if the associated action is a CPDFGoToAction, this method returns the destination from the CPDFGoToAction object.
  * However, it is better to use the action method for this purpose.
  */
-@property (nonatomic,retain) CPDFDestination *destination;
+@property (nonatomic,strong) CPDFDestination *destination;
 
 /**
  * Method to get / set the action performed when users click the outline.
@@ -73,7 +73,7 @@
  * If the CPDFOutline object has a destination, instead of an action, action returns a CPDFGoToAction object (this is equivalent to calling destination on the CPDFOutline object).
  * For other action types, action returns the appropriate PDF Kit action type object, such as CPDFURLAction.
  */
-@property (nonatomic,retain) CPDFAction *action;
+@property (nonatomic,strong) CPDFAction *action;
 
 /**
  * Returns the child outline object at the specified index.

+ 152 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPage+Private.h

@@ -0,0 +1,152 @@
+//
+//  CPDFPage+Private.h
+//  ComPDFKit
+//
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import "CPDFPage.h"
+#import "CPDFPage+Protected.h"
+
+#import "PSOPDFPage.h"
+#import "PSOPDFTextPage.h"
+#import "PSOPDFTextPageFind.h"
+#import "PSOPDFEditPage.h"
+#import "CPDFDocument.h"
+
+#define CPDFDisplayBoundsBox -1
+#define CPDFDisplayBoundsCropBox -2
+
+struct CPDFPageDrawOptions {
+    CPDFKitPlatformColor *backgroundColor = nil;
+    BOOL darkMode = NO;
+    BOOL noText = NO;
+    BOOL drawAnnotation = NO;
+};
+
+@class CPDFTextWidgetAnnotation;
+
+@interface CPDFPage () {
+    PSOPDFPage *_page;
+    PSOPDFTextPage *_textPage;
+    PSOPDFEditPage *_editPage;
+    PSO_EDITPAGE_CALLBACK _callBack;
+    
+    PSO_PAGE_CALLBACK _drawCallBack;
+}
+
+#pragma mark - Initializers
+
+- (instancetype)initWithDocument:(CPDFDocument *)document pageIndex:(NSUInteger)index;
+
+#pragma mark - Accessors
+
+@property (nonatomic,assign) CPDFDocument *document;
+
+@property (nonatomic,readonly) BOOL flagCropBounds;
+
+@property (nonatomic,assign) CGRect cropBounds;
+
+@property (nonatomic,readonly) CGSize cropSize;
+
+@property (nonatomic,assign) BOOL isHaveCommitEditing;
+
+#pragma mark - Annotations
+
+@property (nonatomic,strong) NSArray<CPDFAnnotation *> *annotations;
+
+- (NSArray<CPDFTextWidgetAnnotation *> *)textWidgets;
+
+- (CPDFAnnotation *)annotationAtIndex:(NSInteger)index;
+
+#pragma mark - Conversion
+
+- (CGAffineTransform)transformForBox:(CPDFDisplayBox)box;
+
+- (CGAffineTransform)transformForBox:(CPDFDisplayBox)box inRect:(CGRect)rect;
+
+- (CGPoint)convertPointToPage:(CGPoint)point inRect:(CGRect)rect forBox:(CPDFDisplayBox)box;
+
+- (CGRect)convertRectToPage:(CGRect)bounds inRect:(CGRect)rect forBox:(CPDFDisplayBox)box;
+
+- (CGPoint)convertPointFromPage:(CGPoint)point inRect:(CGRect)rect forBox:(CPDFDisplayBox)box;
+
+- (CGRect)convertRectFromPage:(CGRect)bounds inRect:(CGRect)rect forBox:(CPDFDisplayBox)box;
+
+#pragma mark - Rendering
+
+- (void)drawWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context options:(CPDFPageDrawOptions)options;
+
+- (void)drawWithBox:(CPDFDisplayBox)box rect:(CGRect)rect scaleFactor:(CGFloat)scaleFactor options:(CPDFPageDrawOptions)options completion:(void (^)(CGImageRef imageRef))completion;
+
+- (void)drawEditWithBox:(CPDFDisplayBox)box toContext:(CGContextRef)context options:(CPDFPageDrawOptions)options;
+
+- (void)drawEditWithBox:(CPDFDisplayBox)box rect:(CGRect)rect scaleFactor:(CGFloat)scaleFactor options:(CPDFPageDrawOptions)options completion:(void (^)(CGImageRef imageRef))completion;
+
+@property (nonatomic,assign) BOOL isCancelDrawImage;
+
+- (void)drawImageWithBox:(CPDFDisplayBox)box
+                   scale:(CGFloat)scale
+         backgroundColor:(CPDFKitPlatformColor *)color
+                darkMode:(BOOL)darkMode
+       completionHandler:(void (^)(CPDFKitPlatformImage *image))handler;
+
+- (void)drawTiledImageWithBox:(CPDFDisplayBox)box
+                         clip:(CGRect)clip
+                        scale:(CGFloat)scale
+              backgroundColor:(CPDFKitPlatformColor *)color
+                     darkMode:(BOOL)darkMode
+            completionHandler:(void (^)(CPDFKitPlatformImage *image))handler;
+
+- (void)cancelDrawImage;
+
+#pragma mark - Find
+
+- (PSOPDFTextPageFind *)beginFindString:(NSString *)string fromIndex:(NSInteger)index withOptions:(NSInteger)options;
+
+- (CPDFSelection *)nextFindString:(PSOPDFTextPageFind *)textPageFind;
+
+- (CPDFSelection *)nextFindString:(PSOPDFTextPageFind *)textPageFind page:(CPDFPage *)page;
+
+- (void)cancelFindString:(PSOPDFTextPageFind *)textPageFind;
+
+- (CPDFSelection *)findNextPageString:(NSString *)string page:(CPDFPage *)page withOptions:(NSInteger)options index:(NSInteger)index;
+
+- (CPDFSelection *)findPrevPageString:(NSString *)string page:(CPDFPage *)page withOptions:(NSInteger)options index:(NSInteger)index;
+
+- (void)cancelFindEditPageString;
+
+#pragma mark - Edit
+
+@property (nonatomic,assign) BOOL isEdited;
+
+- (PSOPDFEditPage *)editPage;
+
+- (PSOPDFEditPage *)initEditPage;
+
+- (void)beginEditing;
+
+- (void)discardEditing;
+
+- (void)commitEditing;
+
+- (void)endEditing;
+
+#pragma mark - Private
+
+- (PSOPDFPage *)page;
+
+- (PSOPDFTextPage *)textPage;
+
+- (void)psoPageRelease;
+
+- (void)textPageRelease;
+
+- (void)editPageRelease;
+
+@end

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPage.h

@@ -113,6 +113,7 @@ extern NSNotificationName const CPDFPageDidFindSearchChangeNotification;
  * @discussion The elements of the array will most likely be typed to subclasses of the CPDFAnnotation class.
  */
 @property (nonatomic,readonly) NSArray<CPDFAnnotation *> *annotations;
+- (void)reloadAnnotations;
 
 /**
  * Adds the specified annotation object to the page.

+ 40 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPageMetalView.h

@@ -0,0 +1,40 @@
+//
+//  CPDFPageMetalView.h
+//  ComPDFKit
+//
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <Foundation/Foundation.h>
+#import "CPDFKitPlatform.h"
+#import "CPDFPage+Private.h"
+#import "CPDFView.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface CPDFPageMetalView : CPDFKitPlatformView
+@property (nonatomic, strong) CPDFPage *page;
+@property (nonatomic, assign) CPDFDisplayBox displayBox;
+@property (nonatomic, assign) CPDFPageDrawOptions options;
+@property (nonatomic, assign) CGFloat scaleFactor;
+//@property (nonatomic, assign) CPDFView *pdfView;
+@property (nonatomic, assign) CPDFDisplayMode model;
+@property (nonatomic, strong) CPDFKitPlatformColor *displayModeCustomColor;
+
+@property (nonatomic,assign) CPDFViewScrollState scrollState;
+@property (nonatomic,assign) CPDFViewScaleState scaleState;
+
+/**
+ 默认render只渲染page不包含参数设置
+ */
+- (void)renderNeedReset:(BOOL)needReset completion:(void (^)(void))completion;
+- (void)clearRender;
+- (void)updateVisibleRect;
+- (void)updateHighlightAnnotationLayer;
+@end
+
+NS_ASSUME_NONNULL_END

+ 67 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPageView_Mac.h

@@ -0,0 +1,67 @@
+//
+//  CPDFPageView_Mac.h
+//  ComPDFKit
+//
+//  Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
+#import <Cocoa/Cocoa.h>
+#import "CPDFScrollViewCell_Mac.h"
+
+@class CPDFView, CPDFPage, CPDFPageView;
+
+@protocol CPDFPageViewLayerLoadingDelegate <NSObject>
+
+@optional
+
+- (void)PDFViewPageAnnotationLayerDidBeginRendering:(CPDFPageView *)pdfPageView;
+
+- (void)PDFViewPageAnnotationLayerDidEndRendering:(CPDFPageView *)pdfPageView;
+
+- (void)PDFViewPageContentLayerDidBeginRendering:(CPDFPageView *)pdfPageView;
+
+- (void)PDFViewPageContentLayerDidEndRendering:(CPDFPageView *)pdfPageView;
+
+@end
+
+@interface CPDFPageView : CPDFScrollViewCell
+
+#pragma mark - Accessors
+
+@property (nonatomic,weak)   CPDFView *pdfView;
+
+@property (nonatomic,strong) CPDFPage *page;
+
+@property (nonatomic, assign) NSInteger pageIndex;
+
+@property (nonatomic, weak) id<CPDFPageViewLayerLoadingDelegate> loadingDelegate;
+
+#pragma mark - Display
+
+- (void)setNeedsDisplayPageLayer;
+- (void)setNeedsDisplayAnnotationLayer;
+
+- (void)setNeedsDisplayDrawPageLayer;
+- (void)updateHighlightAnnotationLayer;
+
+- (void)renderNeedReset:(BOOL)needReset;
+- (void)updateVisibleRect;
+
+- (BOOL)isLayerFinshedDisplay;
+
+#pragma mark - Conversion
+
+- (CGPoint)convertPointToPage:(CGPoint)point;
+
+- (CGRect)convertRectToPage:(CGRect)rect;
+
+- (CGPoint)convertPointFromPage:(CGPoint)point;
+
+- (CGRect)convertRectFromPage:(CGRect)rect;
+
+@end

+ 20 - 4
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPolygonAnnotation.h

@@ -15,6 +15,7 @@
 
 @class CPDFFont;
 @class CPDFAreaMeasureInfo;
+@class CPDFBorderEffect;
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -43,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN
  *
  * @discussion The ornament at the end of a line is optional (for more information, see the Adobe PDF Specification 1.4).
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *interiorColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *interiorColor;
 
 /**
  * remove interior Color(Set it to transparent, or set SetInteriorColor: to nil)
@@ -58,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * Method to set the font name used for the annotation’s measure text field.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s measure text field.
@@ -68,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * Method to get / set the font color used in th measure text field of the annotation.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *fontColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *fontColor;
 
 /**
  * Method to get the measure info of the annotation after added to page.
@@ -76,7 +77,22 @@ NS_ASSUME_NONNULL_BEGIN
  * @discussion The measurement properties of a annotation cannot be cleared by setting the measurement properties of the annotation to empty
  * Set MeasureInfo: This information will not be effective until it is added to the page
  */
-@property (nonatomic,retain) CPDFAreaMeasureInfo *_Nullable measureInfo;
+@property (nonatomic,strong) CPDFAreaMeasureInfo *_Nullable measureInfo;
+
+#pragma mark -  Border Effect
+
+/**
+ * Method to get / set the  used for border Effect drawing the annotation.
+ * Cloud border effect for setting annotation
+ */
+@property (nonatomic,strong) CPDFBorderEffect * _Nullable borderEffect;
+
+/**
+ * Method to get / set the  used for border Effect drawing the annotation.
+ * If true, the parent view handles the vertices enclosed event; if false, the polygon savePoints Spot Encirclement Area itself handles the event
+ * Note: This property is for configuration purposes and will not affect the internal implementation of the SDK.
+ */
+@property (nonatomic,readwrite) BOOL polygonEncloseHandler;
 
 @end
 

+ 3 - 3
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFPolylineAnnotation.h

@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * Method to set the font name used for the annotation’s measure text field.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s measure text field.
@@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN
 /**
  * Method to get / set the font color used in the measure text field of the annotation.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *fontColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *fontColor;
 
 /**
  * Method to get the measure info of the measure annotation after added to page.
@@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN
  * @discussion The measurement properties of a annotation cannot be cleared by setting the measurement properties of the annotation to empty
  * Set MeasureInfo: This information will not be effective until it is added to the page
  */
-@property (nonatomic,retain) CPDFPerimeterMeasureInfo * _Nullable measureInfo;
+@property (nonatomic,strong) CPDFPerimeterMeasureInfo * _Nullable measureInfo;
 
 @end
 

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFRedactAnnotation.h

@@ -56,7 +56,7 @@
 /**
  * Method to set the font name used for the annotation’s text field.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s text field.

+ 23 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSignatureAnnotation.h

@@ -18,4 +18,27 @@
 
 - (void)signature;
 
+/**
+ * Method to get / set the all rect vertex points after rotation.
+ *
+ * @discussion Vertex points of the current page.
+ */
+- (void)setSaveRectRotationPoints:(NSArray<NSValue *> *)saveRectRotationPoints;
+- (NSArray<NSValue *> *)saveRectRotationPoints;
+
+/**
+ * Method to get / set the  rect befer rotation.
+ *
+ * @discussion rect of the current page.
+ */
+- (void)setSaveSourceRect:(CGRect)saveSourceRect;
+- (CGRect)saveSourceRect;
+
+/**
+ * Sets the rotation angle for the annotation in degrees.
+ *
+ * @discussion Rotation on a annotation. Must be -180 ~ 180.
+ */
+@property (nonatomic,assign) NSInteger annotationRotation;
+
 @end

+ 28 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSignatureWidgetAnnotation.h

@@ -27,7 +27,7 @@
 
 @interface CPDFSignatureConfig : NSObject
 
-@property (nonatomic,retain) NSArray<CPDFSignatureConfigItem *> *contents;
+@property (nonatomic,strong) NSArray<CPDFSignatureConfigItem *> *contents;
 
 @property (nonatomic,assign) BOOL isDrawKey;
 @property (nonatomic,assign) BOOL isDrawLogo;
@@ -35,11 +35,11 @@
 @property (nonatomic,assign) BOOL isContentAlginLeft;
 
 @property (nonatomic,copy) NSString *text;
-@property (nonatomic,retain) CPDFKitPlatformImage *image;
-@property (nonatomic,retain) CPDFKitPlatformImage *logo;
+@property (nonatomic,strong) CPDFKitPlatformImage *image;
+@property (nonatomic,strong) CPDFKitPlatformImage *logo;
 
-@property (nonatomic,retain) CPDFKitPlatformColor *contentsColor;
-@property (nonatomic,retain) CPDFKitPlatformColor *textColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *contentsColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *textColor;
 
 @end
 
@@ -69,6 +69,29 @@
  */
 - (void)signAppearanceConfig:(CPDFSignatureConfig *)config ;
 
+/**
+ * Method to get / set the all rect vertex points after rotation.
+ *
+ * @discussion Vertex points of the current page.
+ */
+- (void)setSaveRectRotationPoints:(NSArray<NSValue *> *)saveRectRotationPoints;
+- (NSArray<NSValue *> *)saveRectRotationPoints;
+
+/**
+ * Method to get / set the  rect befer rotation.
+ *
+ * @discussion rect of the current page.
+ */
+- (void)setSaveSourceRect:(CGRect)saveSourceRect;
+- (CGRect)saveSourceRect;
+
+/**
+ * Sets the rotation angle for the annotation in degrees.
+ *
+ * @discussion Rotation on a annotation. Must be -180 ~ 180.
+ */
+@property (nonatomic,assign) NSInteger annotationRotation;
+
 @end
 
 @interface CPDFSignatureWidgetAnnotation (Deprecated)

+ 10 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFSquareAnnotation.h

@@ -14,6 +14,7 @@
 
 @class CPDFFont;
 @class CPDFAreaMeasureInfo;
+@class CPDFBorderEffect;
 
 /**
  * A CPDFSquareAnnotation object displays a rectangle on a page.
@@ -32,11 +33,19 @@
 /**
  * Method to get / set the fill color used for drawing the annotation.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *interiorColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *interiorColor;
 
 /**
  * remove interior Color(Set it to transparent, or set SetInteriorColor: to nil)
  */
 - (BOOL)removeInteriorColor;
 
+#pragma mark -  Border Effect
+
+/**
+ * Method to get / set the  used for border Effect drawing the annotation.
+ * Cloud border effect for setting annotation
+ */
+@property (nonatomic,strong) CPDFBorderEffect * _Nullable borderEffect;
+
 @end

+ 23 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFStampAnnotation.h

@@ -75,4 +75,27 @@ typedef NS_ENUM(NSInteger, CPDFStampShape) {
  */
 - (CPDFKitPlatformImage *)stampImage;
 
+/**
+ * Method to get / set the all rect vertex points after rotation.
+ *
+ * @discussion Vertex points of the current page.
+ */
+- (void)setSaveRectRotationPoints:(NSArray<NSValue *> *)saveRectRotationPoints;
+- (NSArray<NSValue *> *)saveRectRotationPoints;
+
+/**
+ * Method to get / set the  rect befer rotation.
+ *
+ * @discussion rect of the current page.
+ */
+- (void)setSaveSourceRect:(CGRect)saveSourceRect;
+- (CGRect)saveSourceRect;
+
+/**
+ * Sets the rotation angle for the annotation in degrees.
+ *
+ * @discussion Rotation on a annotation. Must be -180 ~ 180.
+ */
+@property (nonatomic,assign) NSInteger annotationRotation;
+
 @end

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFTextWidgetAnnotation.h

@@ -22,7 +22,7 @@
 /**
  * String value associated with text field.
  */
-@property (nonatomic,retain) NSString *stringValue;
+@property (nonatomic,strong) NSString *stringValue;
 
 /**
  * Alignment of text. Supported: NSLeftTextAlignment, NSRightTextAlignment and NSCenterTextAlignment.

+ 75 - 17
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFView+Editing.h

@@ -21,6 +21,7 @@ typedef NS_OPTIONS(NSInteger, CAddEditingAreaType) {
 typedef NS_OPTIONS(NSInteger, CEditingLoadType) {
     CEditingLoadTypeText =            (1UL << 0),
     CEditingLoadTypeImage =           (1UL << 1),
+    CEditingLoadTypePath =            (1UL << 2),
 };
 
 typedef NS_OPTIONS(NSInteger, CEditingLocation) {
@@ -48,9 +49,13 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 
 @interface CEditAttributes : NSObject
 
-@property (nonatomic,retain) NSFont * _Nonnull font;
+@property (nonatomic,strong) NSFont * _Nonnull font DEPRECATED_MSG_ATTRIBUTE("use setCFont:setFontSize:");
 
-@property (nonatomic,retain) NSColor *_Nonnull fontColor;
+@property (nonatomic,strong) CPDFFont * _Nonnull cFont;
+
+@property (nonatomic,assign) CGFloat fontSize;
+
+@property (nonatomic,strong) NSColor *_Nonnull fontColor;
 
 @property (nonatomic,assign) BOOL isBold;
 
@@ -67,7 +72,7 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 /**
  *Color when dotted line is not selected
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *editingBorderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *editingBorderColor;
 
 /**
  *The border color selected when the mouse is swiped
@@ -77,7 +82,7 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 /**
  * Select Block color + Move reference color
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *editingSelectionBorderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *editingSelectionBorderColor;
 
 /**
  *Image Support Expansion And Scaling (does it support 8-point drag and drop)
@@ -107,62 +112,67 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 /**
  * Hover border color of mouse placed text block.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *mouseHoverBorderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *mouseHoverBorderColor;
 
 /**
  * Hover border width of mouse placed text block.
  */
-@property (nonatomic,retain) NSNumber *mouseHoverBorderWidth;
+@property (nonatomic,strong) NSNumber *mouseHoverBorderWidth;
 
 /**
  * Dotted array of mouse hover text blocks.
  */
-@property (nonatomic,retain) NSArray * mouseHoverBorderDashPattern;
+@property (nonatomic,strong) NSArray * mouseHoverBorderDashPattern;
 
 /**
  * Mouse over the color of the dotted line of the corresponding block
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *editingHoverBorderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *editingHoverBorderColor;
 
 /**
  * Fill the color when adding text
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *addEditAreaColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *addEditAreaColor;
+
+/**
+ * The text color when adding text Area
+ */
+@property (nonatomic,strong) CPDFKitPlatformColor *addEditAreaTextColor;
 
 /**
  * The fill color of the block when moved
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *editAreaMoveFillColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *editAreaMoveFillColor;
 
 /**
  * The size of the dotted box
  */
-@property (nonatomic,retain) NSNumber *editingCenterRadius;
+@property (nonatomic,strong) NSNumber *editingCenterRadius;
 
 /**
  * Block distance from the dotted box
  */
-@property (nonatomic,retain) NSNumber *editAreaMargin;
+@property (nonatomic,strong) NSNumber *editAreaMargin;
 
 /**
  * Border width of the text code block.
  */
-@property (nonatomic,retain) NSNumber *editingBorderWidth;
+@property (nonatomic,strong) NSNumber *editingBorderWidth;
 
 /**
  * Array of dashed lines of the text code block.
  */
-@property (nonatomic,retain) NSArray * editingBorderDashPattern;
+@property (nonatomic,strong) NSArray * editingBorderDashPattern;
 
 /**
  * Border width when the mouse is swiped.
  */
-@property (nonatomic,retain) NSNumber *editingMouseSelectionBorderWidth;
+@property (nonatomic,strong) NSNumber *editingMouseSelectionBorderWidth;
 
 /**
  * Array of dashed lines when the mouse is swiped.
  */
-@property (nonatomic,retain) NSArray * editingMouseSelectionBorderDashPattern;
+@property (nonatomic,strong) NSArray * editingMouseSelectionBorderDashPattern;
 
 /**
  * Array of dashed lines when the mouse is swipe end.
@@ -188,7 +198,7 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 /**
  * Gets the position size of the text block.
  */
-@property (nonatomic,readonly) CGRect bounds;
+@property (nonatomic,assign) CGRect bounds;
 
 /**
  * Gets the current selection.
@@ -205,6 +215,16 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
  */
 - (BOOL)IsImageArea;
 
+/**
+ * Whether it is path code block.
+ */
+- (BOOL)IsPathArea;
+
+/**
+ * Update Area Content after set bounds in Editing Model.
+ */
+- (void)updateEditingAreasBounds;
+
 @end
 
 #pragma mark - CPDFEditTextArea
@@ -232,6 +252,11 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
  */
 @property (nonatomic,assign) BOOL isCropMode;
 
+/**
+ * Proportional scaling mode or not.
+ */
+@property (nonatomic,assign) BOOL proportionalScaling;
+
 @property (nonatomic,readonly) NSImage *thumbnailImage;
 
 /**
@@ -241,6 +266,27 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
 
 @end
 
+#pragma mark - CPDFEditPathArea
+
+@interface CPDFEditPathArea : CPDFEditArea
+
+/**
+ * Crop region (x, y, width, height).
+ */
+@property (nonatomic,readonly) CGRect cropRect;
+
+/**
+ * Crop mode or not.
+ */
+@property (nonatomic,assign) BOOL isCropMode;
+
+/**
+ * Proportional scaling mode or not.
+ */
+@property (nonatomic,assign) BOOL proportionalScaling;
+
+@end
+
 #pragma mark - CPDFView+Editing
 
 @interface CPDFView (Editing)
@@ -512,6 +558,18 @@ typedef NS_OPTIONS(NSInteger, CEditingSelectState) {
  */
 - (BOOL)setCurrentSelectionIsItalic:(BOOL)isItalic withTextArea:(CPDFEditTextArea *)editArea;
 
+/** Sets the currently selected text show underline.
+ * @param showUnderline Whether to display underline, YES indicates setting display, NO indicates deleting
+ * @param textArea The area of the text selected
+ */
+- (BOOL)setCurrentSelectionShowUnderline:(BOOL)showUnderline withTextArea:(CPDFEditTextArea *)textArea;
+
+/** Sets the currently selected text show strikeout.
+ * @param showStrikeout Whether to display strikeout, YES indicates setting display, NO indicates deleting
+ * @param textArea The area of the text selected
+ */
+- (BOOL)setCurrentSelectionShowStrikeout:(BOOL)showStrikeout withTextArea:(CPDFEditTextArea *)textArea;
+
 /**
  * Gets the alignment of a text block or a piece of text.
  */

+ 34 - 6
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFView.h

@@ -14,6 +14,12 @@
 #import <ComPDFKit/CPDFPage.h>
 
 extern NSNotificationName const CPDFViewDocumentChangedNotification;
+extern NSNotificationName const CPDFViewPageAnnotationDidBeginRenderingNotification;
+extern NSNotificationName const CPDFViewPageAnnotationDidEndRenderingNotification;
+extern NSNotificationName const CPDFViewPageContentDidBeginRenderingNotification;
+extern NSNotificationName const CPDFViewPageContentDidEndRenderingNotification;
+extern NSNotificationName const CPDFViewEditingPageContentDidBeginRenderingNotification;
+extern NSNotificationName const CPDFViewEditingPageContentDidEndRenderingNotification;
 extern NSNotificationName const CPDFViewPageChangedNotification;
 extern NSNotificationName const CPDFViewScaleChangedNotification;
 extern NSNotificationName const CPDFViewSelectionChangedNotification;
@@ -46,6 +52,7 @@ typedef NS_OPTIONS(NSInteger, CPDFAreaOfInterest) {
     CPDFImageArea =         (1UL << 8),
 };
 
+@class CPDFView, CPDFDocument, CPDFPage, CPDFSelection, CPDFFreeTextAnnotation, CPDFDestination, CPDFAction,CPDFEditArea,CPDFEditImageArea,CPDFBorder,CPDFEditPathArea;
 typedef NS_ENUM(NSInteger, CPDFViewScrollState) {
     CPDFViewScrollStateBegin,
     CPDFViewScrollStateScrolling,
@@ -66,6 +73,18 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 
 - (void)PDFViewDocumentDidLoaded:(CPDFView *)pdfView;
 
+- (void)PDFViewPageAnnotationDidBeginRendering:(CPDFView *)pdfView;
+
+- (void)PDFViewPageAnnotationDidEndRendering:(CPDFView *)pdfView;
+
+- (void)PDFViewPageContentDidBeginRendering:(CPDFView *)pdfView;
+
+- (void)PDFViewPageContentDidEndRendering:(CPDFView *)pdfView;
+
+- (void)PDFViewEditingPageContentDidBeginRendering:(CPDFView *)pdfView;
+
+- (void)PDFViewEditingPageContentDidEndRendering:(CPDFView *)pdfView;
+
 - (void)PDFViewCurrentPageDidChanged:(CPDFView *)pdfView;
 
 - (void)PDFViewScaleDidChanged:(CPDFView *)pdfView;
@@ -98,6 +117,8 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 
 - (void)PDFViewEditingDoubleClick:(CPDFView *)pdfView imageArea:(CPDFEditArea *)editArea;
 
+- (void)PDFViewEditingDoubleClick:(CPDFView *)pdfView pathArea:(CPDFEditArea *)editArea;
+
 - (void)PDFViewEditingAddTextArea:(CPDFView *)pdfView addPage:(CPDFPage *)page addRect:(CGRect)rect;
 
 - (void)PDFViewEditingAddImageArea:(CPDFView *)pdfView addPage:(CPDFPage *)page addRect:(CGRect)rect;
@@ -110,6 +131,8 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 
 - (void)PDFViewEditingExitCropMode:(CPDFView *)pdfView forEditingArea:(CPDFEditImageArea *)editingArea;
 
+- (void)PDFViewEditingExitCropMode:(CPDFView *)pdfView forPathEditingArea:(CPDFEditPathArea *)editingArea;
+
 - (CPDFKitPlatformImage *)PDFViewAsBookBookmark;
 
 @end
@@ -118,11 +141,11 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 #pragma mark - Document
 
 // Methods for associating a CPDFDocument with a CPDFView.
-@property (nonatomic,retain) CPDFDocument *document;
+@property (nonatomic,strong) CPDFDocument *document;
 
 #pragma mark - Accessors
 
-@property (nonatomic,assign) id<CPDFViewDelegate> delegate;
+@property (nonatomic,weak) id<CPDFViewDelegate> delegate;
 
 // Set the layout direction, either vertical or horizontal, for the given display mode
 // Defaults to vertical layout (CPDFDisplayDirectionVertical).
@@ -137,7 +160,7 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 /**
  * If displayMode is CPDFDisplayModeCustom, you may customize the color of the page rendering.
  */
-@property (nonatomic,retain) NSColor *displayModeCustomColor;
+@property (nonatomic,strong) NSColor *displayModeCustomColor;
 
 /**
  * A Boolean value indicating whether the view is displaying page crop.
@@ -175,7 +198,7 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 
 @property (nonatomic, readonly) CGFloat maximumScaleFactor;
 
-@property (nonatomic,retain) NSColor *backgroundColor;
+@property (nonatomic,strong) NSColor *backgroundColor;
 
 /**
  * The current scale factor for the view.
@@ -219,11 +242,11 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
  */
 @property (nonatomic,assign) BOOL textSelectionMode;
 
-@property (nonatomic,retain) CPDFSelection *currentSelection;
+@property (nonatomic,strong) CPDFSelection *currentSelection;
 
 - (void)clearSelection;
 
-@property (nonatomic,retain) NSArray<CPDFSelection*> *highlightedSelections;
+@property (nonatomic,strong) NSArray<CPDFSelection*> *highlightedSelections;
 
 /**
  * Returns a CPDFDestination object representing the current page and the current point in the view specified in page space.
@@ -280,12 +303,17 @@ typedef NS_ENUM(NSInteger, CPDFViewScaleState) {
 
 - (void)setNeedsDisplayAnnotationViewForVisiblePages;
 
+- (void)updateHighLightAnnotationView;
+
 - (void)setNeedsDisplayForPage:(CPDFPage *)page;
 
 - (void)setNeedsDisplayPageViewForPage:(CPDFPage *)page;
 
 - (void)setNeedsDisplayAnnotationViewForPage:(CPDFPage *)page;
 
+
+- (BOOL)isFinshedDisplay;
+
 - (void)updateHighLightAnnotationViewForPage:(CPDFPage *)page;
 
 - (void)updateRender:(BOOL)reset;

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFWatermark.h

@@ -66,7 +66,7 @@ typedef NS_ENUM(NSInteger, CPDFWatermarkHorizontalPosition) {
  *
  * @discussion The text font for the watermark; may return NULL if the watermark was created with image.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to set the text font size for the watermark (image watermark does not work).
@@ -81,17 +81,17 @@ typedef NS_ENUM(NSInteger, CPDFWatermarkHorizontalPosition) {
  * @discussion The text font for the watermark; may return NULL if the watermark was created with image.
  * Default Font : Helvetica 24
  */
-@property (nonatomic,retain) CPDFKitPlatformFont *textFont DEPRECATED_MSG_ATTRIBUTE("use setCFont:fontSize:");
+@property (nonatomic,strong) CPDFKitPlatformFont *textFont DEPRECATED_MSG_ATTRIBUTE("use setCFont:setFontSize:");
 
 /**
  * Method to get / set the text color for the watermark (image watermark does not work).
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *textColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *textColor;
 
 /**
  * Method to get / set the image for the watermark (text watermark does not work).
  */
-@property (nonatomic,retain) CPDFKitPlatformImage *image;
+@property (nonatomic,strong) CPDFKitPlatformImage *image;
 
 /**
  * Method to get / set the scale factor for the watermark.
@@ -126,7 +126,7 @@ typedef NS_ENUM(NSInteger, CPDFWatermarkHorizontalPosition) {
  *
  * @discussion A page range string, Such as "0,3,5-7".
  */
-@property (nonatomic,retain) NSString *pageString;
+@property (nonatomic,strong) NSString *pageString;
 
 /**
  * Method to get / set the vertical position for the watermark.

+ 5 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFWidgetAnnotation.h

@@ -22,12 +22,12 @@
 /**
  * Method to get / set the border color used for the form field.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *borderColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *borderColor;
 
 /**
  * Method to ge t/ set the background color used for the form field.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *backgroundColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *backgroundColor;
 
 /**
  * remove backgroundColor(Set it to transparent, or set SetBackgroundColor: to nil)
@@ -40,7 +40,7 @@
 /**
  * Method to set the font name used for the annotation’s form field.
  */
-@property (nonatomic,retain) CPDFFont *cFont;
+@property (nonatomic,strong) CPDFFont *cFont;
 
 /**
  * Method to get the font size used for the annotation’s form field.
@@ -50,13 +50,13 @@
 /**
  * Method to get / set the font used for the form field.
  */
-@property (nonatomic,retain) CPDFKitPlatformFont *font DEPRECATED_MSG_ATTRIBUTE("use setCFont:fontSize:");
+@property (nonatomic,strong) CPDFKitPlatformFont *font DEPRECATED_MSG_ATTRIBUTE("use setCFont:fontSize:");
 
 
 /**
  * Method to get / set the font color used for the form field.
  */
-@property (nonatomic,retain) CPDFKitPlatformColor *fontColor;
+@property (nonatomic,strong) CPDFKitPlatformColor *fontColor;
 
 /**
  * Internal name for the field.

+ 1 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/ComPDFKit.h

@@ -61,6 +61,7 @@
 #import <ComPDFKit/CPDFPolygonAnnotation.h>
 #import <ComPDFKit/CPDFPerimeterMeasureInfo.h>
 #import <ComPDFKit/CPDFAreaMeasureInfo.h>
+#import <ComPDFKit/CPDFBorderEffect.h>
 
 #import <ComPDFKit/CPDFWidgetAnnotation.h>
 #import <ComPDFKit/CPDFButtonWidgetAnnotation.h>

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Resources/Info.plist

@@ -17,13 +17,13 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.1.2</string>
+	<string>2.2.0</string>
 	<key>CFBundleSupportedPlatforms</key>
 	<array>
 		<string>MacOSX</string>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>2102</string>
+	<string>2200</string>
 	<key>DTCompiler</key>
 	<string>com.apple.compilers.llvm.clang.1_0</string>
 	<key>DTPlatformBuild</key>

+ 105 - 61
PDF Office/PDF Master/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources

@@ -46,7 +46,7 @@
 		</data>
 		<key>Resources/Info.plist</key>
 		<data>
-		l06W1gff2/uygg0wyZnBzGkBRf4=
+		s+LRDesmHHues519KQPS6Fgg3IA=
 		</data>
 		<key>Resources/default.metallib</key>
 		<data>
@@ -240,11 +240,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			DRXRwLGfD4ltsNSMkGasvIbsQvw=
+			/N2G6BumM+ORlTVcjVAABJTJYRA=
 			</data>
 			<key>hash2</key>
 			<data>
-			nu+tKNw+UtNFsC8IuFAGhmQdPDpN8f7RmA7VT5Ofl0A=
+			RplosrojBFf4QzNc6Kd9NEQ+c0lhwC0TzSjbssbPgmE=
 			</data>
 		</dict>
 		<key>Headers/CPDFAreaMeasureInfo.h</key>
@@ -262,11 +262,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			D3BzLgkbnhkc2b/k9GBj0d5Yi7Y=
+			qaATtmiFMwnrDGP9uTIBwl2bjOc=
 			</data>
 			<key>hash2</key>
 			<data>
-			O83SXSg15WtdkA3UNYcu/uJiYU8RCe7mBNo5HZzYgsI=
+			f+bvcrYRem0FSf9BoqJCcL6rqYz3jblkGbeBcQJ2iKw=
 			</data>
 		</dict>
 		<key>Headers/CPDFBates.h</key>
@@ -284,11 +284,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			Zv7Lx85t2af9qQ6JiL+iZ32LXuQ=
+			R5MBeut7uzXoWjDMjhNqKIZxAzk=
 			</data>
 			<key>hash2</key>
 			<data>
-			ByHO0klKjiAth2zRKt4Pwsk/KEL0H46I7EOvUjubNDQ=
+			Or045Cs/I7MWqm8ETc26+g/qLyxHmta2hfQ8CWnm7AM=
 			</data>
 		</dict>
 		<key>Headers/CPDFBorder.h</key>
@@ -302,6 +302,17 @@
 			xKV9QKIk5bMkyLY2Q+9uKjZKLZfW22tKN0damsc4SG8=
 			</data>
 		</dict>
+		<key>Headers/CPDFBorderEffect.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			BNO92Qb5cztyXNsBRijcmYLLiW4=
+			</data>
+			<key>hash2</key>
+			<data>
+			jDMEYECF1ok6B12rySeeLU0kT42KLlq+JdtwgCqB6Lo=
+			</data>
+		</dict>
 		<key>Headers/CPDFButtonWidgetAnnotation+Utilities.h</key>
 		<dict>
 			<key>hash</key>
@@ -339,22 +350,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			2wPRucY5nNLWPsUfA6M8jE4yPEU=
+			rt4YwQRt5isoKHlXfjOFPOcoXaw=
 			</data>
 			<key>hash2</key>
 			<data>
-			WCI5N5tzvSj6BlMqgzEs4iOtBVOTisSSXqu0KuXjNY4=
+			ACl1Q/yqJFSGI3Cuf0gZaYBb/PpswTsMVIWEXhqknLc=
 			</data>
 		</dict>
 		<key>Headers/CPDFCircleAnnotation.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			ipbi91uAXK7fSen33m0EH7rLJu0=
+			gTJqDP8Sq5Hnw8D7Z9NX+8LLauk=
 			</data>
 			<key>hash2</key>
 			<data>
-			xky0dM2NknLptjqdxq7e9A5FhUWSYkh2PTbaUPEew+c=
+			4Q1pGVj9uBCW0RjBp43thsNBNOHlLNSnE6SHMA4q+qs=
 			</data>
 		</dict>
 		<key>Headers/CPDFCompareContent.h</key>
@@ -427,11 +438,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			IXZbObwJShjAeM2NlwhR5/dymwc=
+			T5mG7JvaG+4TuovZpPBOzB6hsrM=
 			</data>
 			<key>hash2</key>
 			<data>
-			mC85l6VQ5v3XS2jKPtVpSq33qS723tz2YYh8sIU9VGg=
+			4bIBaMJWyD7F477/ihy9VhUCQDSFcN12pM+rdlIUiic=
 			</data>
 		</dict>
 		<key>Headers/CPDFDocument+Utilities.h</key>
@@ -449,11 +460,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			IRraHiEKIrpafzsIG6Nc0wSw2b0=
+			XhZJKpgzV170H7+JlTNXmvDKV28=
 			</data>
 			<key>hash2</key>
 			<data>
-			xnuTrYCMEavy7c6F7BQBzV7K3VCbL18UHqFkRQYSYQw=
+			hx+o7Pm7qSpmEYr2wZ2oNi6CuOLtD2ls9CFES+mv1oE=
 			</data>
 		</dict>
 		<key>Headers/CPDFFont.h</key>
@@ -471,11 +482,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			cwq7+4DrWYulUiqZ0bYXZaGQWus=
+			WCA38cnrdWQZcXxpru84eG/kItU=
 			</data>
 			<key>hash2</key>
 			<data>
-			3uBsZYU835gblpXSESsAATsXosj1EKOry3EGf9EUg30=
+			LQRGbKiKm7ETA7d3aeACxn6CK7kb1Uk2KQ9tRCxT2yI=
 			</data>
 		</dict>
 		<key>Headers/CPDFGoToAction.h</key>
@@ -493,11 +504,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			0N+b56B9BbR2+iEyKdkdH3K/9DA=
+			Mkyl84LiBQSDwsyMz3UWlPV/2M0=
 			</data>
 			<key>hash2</key>
 			<data>
-			GGYVIMd2U8Fqzaxg9XyJJVUvpKi14s43ZtQlSHQ/9o0=
+			jvIintW8o65rxfCLzUTiSAAeO+Xseze5cImr5OnrX6w=
 			</data>
 		</dict>
 		<key>Headers/CPDFInkAnnotation+Protected.h</key>
@@ -526,11 +537,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			ox0TTSMaTtggR8VYPrDMFMuNxJE=
+			Ld+Sj8wMz5gwNN/vpHONat/cnF8=
 			</data>
 			<key>hash2</key>
 			<data>
-			P8hakEYuBXwqgcaZWxMCtK9XyhGxjviXYJz8QvwAg1U=
+			UXXS8u+oYwbFRAWn0PlDYiV8U8DfWeSDIRNDK2AmmxY=
 			</data>
 		</dict>
 		<key>Headers/CPDFKit.h</key>
@@ -548,11 +559,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			T4k8hYAkAThENAXZcs60rO7FgBg=
+			QU40PNSdsDL5SPxPBh9vMbKOCwc=
 			</data>
 			<key>hash2</key>
 			<data>
-			VII5xrtUiAoMwxDeZDGyHgCm+pH9E3GPT6aAoCS9QJs=
+			5TiHsxCowb0uqlweaj6gOdu3OrvfgTWGEEpZpPkP0kg=
 			</data>
 		</dict>
 		<key>Headers/CPDFKitConfig.h</key>
@@ -581,11 +592,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			73KKa6zOoMvhraFOZQ+oVT6+IcU=
+			GAU4mQJLIqwBtZk+PXQRDyI1rgQ=
 			</data>
 			<key>hash2</key>
 			<data>
-			qQ1GPf8px8oQaD7XpndNHGCqOKXB71y+YT/GI1NfZjw=
+			ZanGsGVwRux9Jfm+2JQGnVGPVam+XyJOPEA9AAJ8z5Q=
 			</data>
 		</dict>
 		<key>Headers/CPDFLinkAnnotation+Utilities.h</key>
@@ -614,22 +625,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			2cNNFsutyfB+NWKDNH8Q9Xok8rk=
+			Vz4kGBTT3144hDTYJ+8tX7zz0+s=
 			</data>
 			<key>hash2</key>
 			<data>
-			vxDUAGKjJOhu+xuiNfvG7OYwlwTzDaYvVCXKpxbDgLQ=
+			4yknb5ge6cC6+Al8d9JqopNR2mRhpzmfMjvxzk2yh80=
 			</data>
 		</dict>
 		<key>Headers/CPDFMeasureInfo.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			EDQBLviS5iLClkWxkSDaM3kBzhE=
+			CeZ7WTOQ/esiYaTp7rG0LSoeHjA=
 			</data>
 			<key>hash2</key>
 			<data>
-			5Ow1Lx8GJo+X10Q3Mmm2BlcN8VEZmT/VuruuEb0lDvE=
+			i3oMWfOIL/p6TO78VJJ8xhNf5SfUyntLZiKR6zPGktM=
 			</data>
 		</dict>
 		<key>Headers/CPDFMovieAnnotation.h</key>
@@ -669,11 +680,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			BGejIIX0PaFkyH4VDYDGmepwMEU=
+			JD21EFijwF7OyRDJwSC0BPM/BlM=
+			</data>
+			<key>hash2</key>
+			<data>
+			FWWaBEl9MY/FGOhJfWaNDiHdHiDHwFBaFsb2mIrA8r4=
+			</data>
+		</dict>
+		<key>Headers/CPDFPage+Private.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			MhxErymHfD8M5WwABUcurOR7We0=
 			</data>
 			<key>hash2</key>
 			<data>
-			SRXrLMSoaCgwvIXvIeeKtdr4C7bazOG9S7Yoshq2k6w=
+			y1uwgIyjXZU3HE8oZsiWJHtSu88esRnVWa/Sp38tyFs=
 			</data>
 		</dict>
 		<key>Headers/CPDFPage+Protected.h</key>
@@ -702,11 +724,33 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			wGAQ9FwI32zVA06DPlwcTuKxatI=
+			3S7+LDUVrge/5W4Fz/xf6QpwX8I=
+			</data>
+			<key>hash2</key>
+			<data>
+			8/VDFt/lwjuWPC9Khu6a9kpPEFjg/8V0OG1dVMGnZzE=
+			</data>
+		</dict>
+		<key>Headers/CPDFPageMetalView.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			KGjgUrXClbXjFoQ13T5ykL3Q0Lk=
+			</data>
+			<key>hash2</key>
+			<data>
+			mMYbUT36RYTyGOo6gaZuKKdPzZ2hiG0QQdNTec1TXfk=
+			</data>
+		</dict>
+		<key>Headers/CPDFPageView_Mac.h</key>
+		<dict>
+			<key>hash</key>
+			<data>
+			TPEKhaqDt5LStP1M9kg5BEYOyTE=
 			</data>
 			<key>hash2</key>
 			<data>
-			GTx1InyXyY+FfXrgraYEaDI2YPQ9syYJc4FojNn3Lb0=
+			M3hpHAxJ2ssGrzT1MOfncRiw7a5FPYM67PciKArurRc=
 			</data>
 		</dict>
 		<key>Headers/CPDFPerimeterMeasureInfo.h</key>
@@ -724,33 +768,33 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			9vZtwOE66eYggRqCI3W0NOPQDiM=
+			PnkVDGC8XNR0uMYpnK68jsaiiH8=
 			</data>
 			<key>hash2</key>
 			<data>
-			b0FQ0JdVyIC9J9AuOF1pPqvu2mOVLdg6E46+xvr3vIc=
+			WDXHj440Cl8CplLN6bu9MlNzl1F06bfudF3wUUdpBxI=
 			</data>
 		</dict>
 		<key>Headers/CPDFPolylineAnnotation.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			bNsH6G015k07jzruKMRBt+iiDPM=
+			eyJNaPHi2R4+D7ClImEH77mtyKw=
 			</data>
 			<key>hash2</key>
 			<data>
-			0QgqlNIDWOmGkooThQS8VgRi3LAcov27YP+Wvq/1ef8=
+			FLrx4SYizfdWsnngqgwwmBtVwz5PUrESdAKbZCBbvrs=
 			</data>
 		</dict>
 		<key>Headers/CPDFRedactAnnotation.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			5JHZVF4EOGaSakZFPmyknI4T2+M=
+			yW3npBda7BGNYQunHH+TxGHL8a4=
 			</data>
 			<key>hash2</key>
 			<data>
-			2egE7RZ90bwxBzyRtFQhHtm9JBk8U4DFbxi2lH+Lnn4=
+			z1SLfXYfzbn+a6p9k82KghOVliBmyfUMJTaNnuEkDG4=
 			</data>
 		</dict>
 		<key>Headers/CPDFResetFormAction.h</key>
@@ -823,22 +867,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			jPYXte4zMLAzbAfWOYrPPF0UD0c=
+			8g2xcW2WjGqxyVgWW8E7ZXDwA7g=
 			</data>
 			<key>hash2</key>
 			<data>
-			FMJiyE6H6f/7jBR/6bBV0WUpXh30oZnvIb1FscW0ILU=
+			br6WjWg6lvFvvpQGhDKaaQVqrHs7qlrqieCzXsGkLR4=
 			</data>
 		</dict>
 		<key>Headers/CPDFSignatureWidgetAnnotation.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			37En1FqMd69tgp9FOe2diRQ5PIo=
+			9bnzXk6G28ThSPWaGk5/UMl19lg=
 			</data>
 			<key>hash2</key>
 			<data>
-			OTzJE1nH02QTyDyuTf4fOGqHZFqSJvsBW0I0T+0T4Zo=
+			ZEZbz9Bk6YrY+GYojYlNY7FC/08QpF25shj8dhU5lvQ=
 			</data>
 		</dict>
 		<key>Headers/CPDFSoundAnnotation.h</key>
@@ -856,22 +900,22 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			HSXEhUN8ndXJLQOwdyNmOHdOFwk=
+			hxXYTLHiXwAFLY3R+NN7vjNW69M=
 			</data>
 			<key>hash2</key>
 			<data>
-			s+NbTFQbkp/dwg+kcgS6GeOVPAMrk70UuNt+sQp6MLY=
+			4UaAWAKMLD0DtiXq15B1Iy4RHe7C4vtT9g+rdl4dins=
 			</data>
 		</dict>
 		<key>Headers/CPDFStampAnnotation.h</key>
 		<dict>
 			<key>hash</key>
 			<data>
-			aUbsESyUX2zG9ZyOccEk2XfPTSw=
+			5mO/Vz88+K01FnOva9gDQ8aPIhM=
 			</data>
 			<key>hash2</key>
 			<data>
-			rLkXIK4UuRu2mJCO08Ar+V6nW61kTuWvEfT5VIYxKkg=
+			QJpWlZRllFlynyu6ZxpvTYbvJOw8u0TTJNYuR/YoNP8=
 			</data>
 		</dict>
 		<key>Headers/CPDFSubmitAction.h</key>
@@ -922,11 +966,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			C56e3CLrvPL3Gr2CFmoviuSrYXc=
+			uf3D0pcYr17gIfmozUxXvFJ8qrY=
 			</data>
 			<key>hash2</key>
 			<data>
-			PdNbAlubExjDckb3b68v9GzcW7yKH0GSLXITmb8T7j0=
+			fV0dxBVW4S5NtrGbvY2bRowpYdhrg4Xx5G8Z2BvK85Y=
 			</data>
 		</dict>
 		<key>Headers/CPDFURLAction.h</key>
@@ -966,11 +1010,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			3K9ber4T/ByGhsVUS2f29HK65HA=
+			zqRKd5vICTWLP84bqeLiSiwlGxo=
 			</data>
 			<key>hash2</key>
 			<data>
-			wBQIg/G1Gafi33rHLUxYbiLnHDyOXFysb6guFftfzwE=
+			CjCyRf4+JqXiPrUa0CO7mKZYiF4wqP43DBln+czNgIY=
 			</data>
 		</dict>
 		<key>Headers/CPDFView+Utilities.h</key>
@@ -988,11 +1032,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			89H9OcjZmq7fxmDX5Acs6BcgIjA=
+			QB2w4pIbwq0irsfbqwfoULu/53Q=
 			</data>
 			<key>hash2</key>
 			<data>
-			ANm4tJYJezHX+COz5RDPL7qKjugQTr8/lgapm28+xcs=
+			2GxHeg7b00kASGfAgfwRzHYk1JTLVCYxmLyFcgubvvk=
 			</data>
 		</dict>
 		<key>Headers/CPDFWatermark+Protected.h</key>
@@ -1010,11 +1054,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			3l5S/T1hzZiCE4WPo4UZNOCw1q8=
+			wEya4/lvBwog2/pjGLP3pY+PVSQ=
 			</data>
 			<key>hash2</key>
 			<data>
-			+UrfM1ftU+Co/wDDT48PQ1NIi5alUnT0QfxHqA438Ms=
+			fIqxeg9vstVifMhgpZwD7YWJaz6q008TBjOLKigR3Ec=
 			</data>
 		</dict>
 		<key>Headers/CPDFWidgetAnnotation+Protected.h</key>
@@ -1032,11 +1076,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			XIOv98gbizrRpU155wBV2asthiM=
+			0/3DhX6Ol4kLxynV84tzmMwPwOk=
 			</data>
 			<key>hash2</key>
 			<data>
-			SL6gNtUQF57K98s8avS/iLaj4RY7uG1++xnAtUomrio=
+			kiYwPKv36pegW+kKa0q+eWvUA1yp6aIvtEtwB7+3adQ=
 			</data>
 		</dict>
 		<key>Headers/CTaskQueueManager.h</key>
@@ -1054,11 +1098,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			p5a1kEdDH3FuibZKLtll5J1dVpY=
+			iHtpayRTkdnJHp9zar0LEKVMFlg=
 			</data>
 			<key>hash2</key>
 			<data>
-			18WmgRCd8NPfbBSrWbKY0VfBVs3WWkbQsjqUIXD7PZQ=
+			7xVPYAp3mibi4zyo5FxD0G8izcQ1tjBNiOPTPYWOJLE=
 			</data>
 		</dict>
 		<key>Modules/module.modulemap</key>
@@ -1186,11 +1230,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			l06W1gff2/uygg0wyZnBzGkBRf4=
+			s+LRDesmHHues519KQPS6Fgg3IA=
 			</data>
 			<key>hash2</key>
 			<data>
-			JKxh92/g+tdQbh/croSj/Ua2nJqkEf6TsNg86gvvNEM=
+			C/NHla1BfoG+h822rED/X0su48pTBnbGMH5Sv9DJftM=
 			</data>
 		</dict>
 		<key>Resources/default.metallib</key>

+ 2 - 5
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift

@@ -242,16 +242,13 @@ class KMBackgroundPropertyController: NSViewController {
         typeTabs.refreshItems()
         
         //Text
-        
         fontColorGroup.currentColor = backgroundData.color
         fontColorGroup.refreshUI()
-        
-        
+         
         //File
         fileInputView.properties.text = backgroundData.imagePath ?? ""
         fileInputView.reloadData()
-        
-        
+         
         //Appearance
         appearance_RotateSelect.properties.text = String(format: "%.0f", backgroundData.rotation) + "°"
         appearance_RotateSelect.reloadData()

+ 1 - 13
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/Controller/KMWatermarkPropertyController.swift

@@ -194,19 +194,7 @@ extension KMWatermarkPropertyController: KMWatermarkAdjectiveListControllerDeleg
             if (result == .alertSecondButtonReturn) { /// 取消
                 return
             }
-            if (textController.isEqual(to: controller)) { /// 文本
-                let result = KMWatermarkManager.defaultManager.removeAllTextWatermarks()
-                if (result) {
-                    controller.datas.removeAll()
-                    controller.refreshUI()
-                }
-            } else if (fileController.isEqual(to: controller)) { /// 文件
-                let result = KMWatermarkManager.defaultManager.removeAllFileWatermarks()
-                if (result) {
-                    controller.datas.removeAll()
-                    controller.refreshUI()
-                }
-            }
+         
         }
     }
 }

+ 18 - 7
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/KMWatermarkController.swift

@@ -104,7 +104,7 @@ class KMWatermarkController: NSViewController {
         }
     }
     
-    func refreshWaterMark() {
+    func refreshPDFDocumentWaterMark() {
         guard let model = currentWatermarkData else { return }
         
         let document = documentPreview.pdfDocument
@@ -163,7 +163,7 @@ extension KMWatermarkController: KMNWatermarkPropertyControllerDelegate {
         
         currentWatermarkData = controller.watermarkData
         
-        refreshWaterMark()
+        refreshPDFDocumentWaterMark()
                 
         delegate?.kmWatermarkControllerDidWatermarkUpdated?(self)
         
@@ -199,16 +199,19 @@ extension KMWatermarkController: KMNWatermarkPropertyControllerDelegate {
         removeWatermark(currentWatermarkData?.watermark)
         currentWatermarkData = templatesController.selectedWatermark
         
-        refreshWaterMark()
+        refreshPDFDocumentWaterMark()
 
     }
     
     func watermarkPropertyControllerCancelTemplateEdit(_ controller: KMNWatermarkPropertyController) {
         removeWatermark(currentWatermarkData?.watermark)
         
-        currentWatermarkData = controller.watermarkData
+        currentWatermarkData = nil
+        refreshPDFDocumentWaterMark()
         
         editSubType = .template
+        delegate?.kmWatermarkControllerDidUpdateMode?(self)
+        
         resetUI()
         
         templatesController.reloadData()
@@ -217,14 +220,18 @@ extension KMWatermarkController: KMNWatermarkPropertyControllerDelegate {
     
 }
 
+//MARK: - KMNWatermarkTemplateControllerDelegate
 extension KMWatermarkController: KMNWatermarkTemplateControllerDelegate {
     func templateControllerDidAddWatermarkData(_ controller: KMNWatermarkTemplateController) {
         editSubType = .add
+        delegate?.kmWatermarkControllerDidUpdateMode?(self)
        
         resetUI()
         
+        propertyController.watermarkData = KMPDFWatermarkData.defaultData()
         currentWatermarkData = propertyController.watermarkData
-        refreshWaterMark()
+
+        refreshPDFDocumentWaterMark()
         
         delegate?.kmWatermarkControllerDidWatermarkUpdated?(self)
         
@@ -234,13 +241,17 @@ extension KMWatermarkController: KMNWatermarkTemplateControllerDelegate {
         removeWatermark(currentWatermarkData?.watermark)
         
         editSubType = .edit
+        delegate?.kmWatermarkControllerDidUpdateMode?(self)
+        
         resetUI()
         
         propertyController.watermarkData = watermark
         propertyController.originalDataDict = KMWatermarkManager.defaultManager.parseWaterMark(model: watermark)
         
         currentWatermarkData = propertyController.watermarkData
-        refreshWaterMark()
+        refreshPDFDocumentWaterMark()
+        
+        templatesController.selectedWatermark = nil
         
         delegate?.kmWatermarkControllerDidWatermarkUpdated?(self)
     }
@@ -251,7 +262,7 @@ extension KMWatermarkController: KMNWatermarkTemplateControllerDelegate {
         
         currentWatermarkData = controller.selectedWatermark
         
-        refreshWaterMark()
+        refreshPDFDocumentWaterMark()
                 
         delegate?.kmWatermarkControllerDidWatermarkUpdated?(self)
     }

+ 22 - 18
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.swift

@@ -320,9 +320,13 @@ class KMNWatermarkPropertyController: NSViewController {
         text_textareaView.properties.text = watermarkData.text ?? ""
         text_textareaView.reloadData()
         
-        let styleNames = CPDFFont.fontNames(forFamilyName: watermarkData.fontName)
-        print("styleNames=\(styleNames)")
+        if let index = familyNames.firstIndex(of: watermarkData.fontName) {
+            fontNameSelect.selectItemAtIndex(index)
+        }
+        fontNameSelect.properties.text = watermarkData.fontName
+        fontNameSelect.reloadData()
         
+        let styleNames = CPDFFont.fontNames(forFamilyName: watermarkData.fontName)
         var menuItemArr: [ComponentMenuitemProperty] = []
         for string in styleNames {
             let item = ComponentMenuitemProperty(type: .normal, text: string, identifier: string)
@@ -337,6 +341,10 @@ class KMNWatermarkPropertyController: NSViewController {
             fontStyleSelect.reloadData()
         }
         
+        let fontSizeStr = String(format: "%.0f", watermarkData.fontSize)
+        if let index = KMWatermarkManager.getFontSize().firstIndex(of: fontSizeStr) {
+            fontSizeSelect.selectItemAtIndex(index)
+        }
         fontSizeSelect.properties.text = String(format: "%.0f", watermarkData.fontSize) + " pt"
         fontSizeSelect.properties.isDisabled = false
         if watermarkData.isScale {
@@ -347,12 +355,10 @@ class KMNWatermarkPropertyController: NSViewController {
         fontColorGroup.currentColor = watermarkData.textColor
         fontColorGroup.refreshUI()
         
-        
         //File
         fileInputView.properties.text = watermarkData.imagePath ?? ""
         fileInputView.reloadData()
         
-        
         //Appearance
         appearance_RotateSelect.properties.text = String(format: "%.0f", watermarkData.rotation) + "°"
         appearance_RotateSelect.reloadData()
@@ -376,7 +382,6 @@ class KMNWatermarkPropertyController: NSViewController {
         appearanceBottomPageRadio.properties.checkboxType = watermarkData.isFront ? .normal : .selected
         appearanceBottomPageRadio.reloadData()
  
-        
         //Position
         positionXInput.properties.text = String(format: "%.0f", watermarkData.tx)
         positionXInput.reloadData()
@@ -495,9 +500,6 @@ class KMNWatermarkPropertyController: NSViewController {
             
             DispatchQueue.main.async {
                 weakSelf.watermarkData.watermarkName = string ?? ""
-                let image = KMWatermarkManager.defaultManager.drawImageAtpageRect(rect: CGRectMake(0, 0, 136, 181), data: weakSelf.watermarkData)
-                weakSelf.watermarkData.resultImage = image
-                
                 if KMWatermarkManager.defaultManager.addWatermark(watermark: weakSelf.watermarkData) == true {
                     weakSelf.delegate?.watermarkPropertyControllerSaveTemplateSuccess?(weakSelf, weakSelf.watermarkData)
                 }
@@ -520,25 +522,25 @@ class KMNWatermarkPropertyController: NSViewController {
                 guard let url = openPanel.url else { return }
                 let filePath = url.path
                 
+                let outFolder = KMWatermarkManager.defaultManager.watermarkImageFolder
+                let fileName = filePath.getLastComponentDeleteExtension
+                 
                 if filePath.extension.lowercased() == ".pdf" {
                     let pdf = CPDFDocument(url: url)
                     guard !pdf!.isEncrypted else { return }
                     
                     if let image = self.generateThumbnail(for: url) {
-                        let outFolder = KMWatermarkManager.defaultManager.watermarkFolderPath?.stringByAppendingPathComponent(("temp/" + self.watermarkData.tag))
-                        if (FileManager.default.fileExists(atPath: outFolder!) == false) {
-                            try?FileManager.default.createDirectory(atPath: outFolder!, withIntermediateDirectories: true)
-                        }
-                        let fileName = filePath.getLastComponentDeleteExtension
+                    
                         if let outFolderPath = outFolder?.stringByAppendingPathComponent(fileName + ".png") {
                             try?image.pngData()?.write(to: URL(fileURLWithPath: outFolderPath))
                             
                             if FileManager.default.fileExists(atPath: outFolderPath) {
                                 self.watermarkData.imagePath = outFolderPath
-                                self.delegate?.watermarkPropertyControllerDidUpdate?(self)
-                                
-                                self.reloadData()
                             }
+                            self.isEditModeChanged = true
+                            self.delegate?.watermarkPropertyControllerDidUpdate?(self)
+                            
+                            self.reloadData()
                         }
                     }
                 } else {
@@ -556,13 +558,15 @@ class KMNWatermarkPropertyController: NSViewController {
                         }
                         return
                     }
-                    self.watermarkData.imagePath = url.path
+                    if let resultPath = outFolder?.stringByAppendingPathComponent(fileName + ".png") {
+                        try?FileManager.default.copyItem(atPath: url.path, toPath: resultPath)
+                        self.watermarkData.imagePath = resultPath
+                    }
                     
                     self.isEditModeChanged = true
                     self.delegate?.watermarkPropertyControllerDidUpdate?(self)
                     
                     self.reloadData()
-
                 }
             }
         }

+ 5 - 5
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/KMNWatermarkPropertyController.xib

@@ -65,7 +65,7 @@
                                         <constraint firstAttribute="width" constant="24" id="V6G-e8-fcR"/>
                                     </constraints>
                                 </customView>
-                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jkG-Uv-4gv">
+                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jkG-Uv-4gv">
                                     <rect key="frame" x="88" y="12" width="98" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Add Watermark" id="7Za-QS-Sai">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -207,7 +207,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="5EC-ec-yKw">
                                             <rect key="frame" x="0.0" y="184" width="232" height="40"/>
                                             <subviews>
-                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zph-wi-6i3">
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Zph-wi-6i3">
                                                     <rect key="frame" x="-2" y="12" width="77" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Appearance" id="34Z-Ne-M34">
                                                         <font key="font" usesAppearanceFont="YES"/>
@@ -322,7 +322,7 @@
                                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="wp3-Sk-MRP">
                                             <rect key="frame" x="0.0" y="152" width="232" height="40"/>
                                             <subviews>
-                                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gTg-8Q-bmp">
+                                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gTg-8Q-bmp">
                                                     <rect key="frame" x="-2" y="12" width="85" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Position(mm)" id="oaL-Vx-zTi">
                                                         <font key="font" usesAppearanceFont="YES"/>
@@ -344,7 +344,7 @@
                                                 <constraint firstAttribute="height" constant="72" id="pLe-tX-JlT"/>
                                             </constraints>
                                         </customView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qVQ-To-3Au">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qVQ-To-3Au">
                                             <rect key="frame" x="119" y="128" width="17" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="X:" id="zUo-XG-CKN">
                                                 <font key="font" usesAppearanceFont="YES"/>
@@ -359,7 +359,7 @@
                                                 <constraint firstAttribute="width" constant="96" id="mzL-IX-KEf"/>
                                             </constraints>
                                         </customView>
-                                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yrr-gh-114">
+                                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yrr-gh-114">
                                             <rect key="frame" x="120" y="88" width="16" height="16"/>
                                             <textFieldCell key="cell" lineBreakMode="clipping" title="Y:" id="kZA-Cu-HgA">
                                                 <font key="font" usesAppearanceFont="YES"/>

+ 18 - 2
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMPDFWatermarkData.swift

@@ -43,8 +43,6 @@ import Cocoa
     
     var watermark: CPDFWatermark?
     
-    var resultImage: NSImage? //效果图
-    
     class func defaultData() -> KMPDFWatermarkData {
         let data = KMPDFWatermarkData()
         data.watermarkType = .text
@@ -94,6 +92,15 @@ import Cocoa
         return [colorA, colorB, colorC, colorD, colorE]
     }
     
+    func modelPreviewImage() -> NSImage? {
+        if let resultPath = KMWatermarkManager.defaultManager.watermarkImageFolder?.stringByAppendingPathComponent((self.tag + ".png")) {
+            if let image = NSImage(contentsOfFile: resultPath) {
+                return image
+            }
+        }
+        return nil
+    }
+    
     func image() -> NSImage? {
         if let imagePath = self.imagePath {
             if let image = NSImage(contentsOfFile: imagePath) {
@@ -103,6 +110,15 @@ import Cocoa
         return nil
     }
     
+    //更新预览图
+    func updatePreviewImage() {
+        if let resultPath = KMWatermarkManager.defaultManager.watermarkImageFolder?.stringByAppendingPathComponent((self.tag + ".png")) {
+            if let image = KMWatermarkManager.defaultManager.drawImageAtpageRect(rect: CGRectMake(0, 0, 136, 181), data: self) {   
+                try?image.pngData()?.write(to: URL(fileURLWithPath: resultPath))
+            }
+        }
+    }
+    
     class func returnWaterMarkWith(_ model: KMPDFWatermarkData, _ document: CPDFDocument) -> CPDFWatermark {
         var watermark = CPDFWatermark()
         

+ 138 - 201
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMWatermarkManager.swift

@@ -50,32 +50,42 @@ class KMWatermarkManager: NSObject {
     
     let watermarkPlistPath = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.applicationSupportDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last?.stringByAppendingPathComponent(Bundle.main.bundleIdentifier!).stringByAppendingPathComponent("watermark").stringByAppendingPathComponent("watermark.plist")
     
+    let watermarkImageFolder = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.applicationSupportDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last?.stringByAppendingPathComponent(Bundle.main.bundleIdentifier!).stringByAppendingPathComponent("watermark").stringByAppendingPathComponent("image")
+    
     static let defaultManager = KMWatermarkManager()
     
     var watermarks: Array<KMPDFWatermarkData> = []
     
     override init() {
         super.init()
+        
+#if DEBUG
+        print("watermarkPlistPath=\(watermarkPlistPath ?? "")")
+#endif
+        
+        if (!FileManager.default.fileExists(atPath: watermarkFolderPath!)) {
+            try?FileManager.default.createDirectory(atPath: watermarkFolderPath!, withIntermediateDirectories: true, attributes: nil)
+        }
+        
+        if (!FileManager.default.fileExists(atPath: watermarkImageFolder!)) {
+            let create: ()? = try?FileManager.default.createDirectory(atPath: watermarkImageFolder!, withIntermediateDirectories: false)
+        }
+        
         if (FileManager.default.fileExists(atPath: watermarkPlistPath!)) {
             let dataDict = NSDictionary(contentsOfFile: watermarkPlistPath!)
             for keyIndex in 0 ..< (dataDict?.allKeys.count ?? 0) {
                 let key: String = dataDict?.allKeys[keyIndex] as! String
-                let watermarkDict: NSDictionary = dataDict?.object(forKey: key) as! NSDictionary
                 
+                let watermarkDict: NSDictionary = dataDict?.object(forKey: key) as! NSDictionary
                 let model = parseDictionary(dict: watermarkDict)
-                let image = self.drawImageAtpageRect(rect: CGRectMake(0, 0, 136, 181), data: model)
-                model.resultImage = image
-                
-                self.watermarks.append(model)
+                watermarks.append(model)
             }
-            self.watermarks.sort(){$0.tag > $1.tag}
-            
-#if DEBUG
-            print("watermarkPlistPath=\(watermarkPlistPath ?? "")")
-#endif
+            watermarks.sort(){$0.tag > $1.tag}
+           
         }
     }
     
+    //MARK: - 增删改查
     func addWatermark(watermark: KMPDFWatermarkData) -> Bool {
         if (!FileManager.default.fileExists(atPath: watermarkFolderPath!)) {
             let create: ()? = try?FileManager.default.createDirectory(atPath: watermarkFolderPath!, withIntermediateDirectories: true, attributes: nil)
@@ -85,10 +95,7 @@ class KMWatermarkManager: NSObject {
         }
         
         if (!FileManager.default.fileExists(atPath: watermarkPlistPath!)) {
-            let create = try?FileManager.default.createFile(atPath: watermarkPlistPath!, contents: nil)
-            if (create == nil) {
-                return false
-            }
+            FileManager.default.createFile(atPath: watermarkPlistPath!, contents: nil)
         }
         
         let dict = NSDictionary(contentsOfFile: watermarkPlistPath!)
@@ -101,10 +108,6 @@ class KMWatermarkManager: NSObject {
         
         let watermarkDict = self.parseWaterMark(model: watermark)
         if (watermarkDict.isEmpty) {
-            let alert = NSAlert()
-            alert.alertStyle = .critical
-            alert.messageText = NSLocalizedString("文件\(watermark.imagePath?.lastPathComponent)已损坏", comment: "")
-            alert.runModal()
             return false
         }
         
@@ -122,6 +125,7 @@ class KMWatermarkManager: NSObject {
             } else {
                 self.watermarks.insert(watermark, at: 0)
             }
+            watermark.updatePreviewImage()
         }
         return result
     }
@@ -135,10 +139,7 @@ class KMWatermarkManager: NSObject {
         }
         
         if (!FileManager.default.fileExists(atPath: watermarkPlistPath!)) {
-            let create = try?FileManager.default.createFile(atPath: watermarkPlistPath!, contents: nil)
-            if (create == nil) {
-                return false
-            }
+            FileManager.default.createFile(atPath: watermarkPlistPath!, contents: nil)
         }
         
         var flagModel: KMPDFWatermarkData!
@@ -163,20 +164,17 @@ class KMWatermarkManager: NSObject {
         
         let watermarkDict = self.parseWaterMark(model: watermark)
         if (watermarkDict.isEmpty) {
-            let alert = NSAlert()
-            alert.alertStyle = .critical
-            alert.messageText = NSLocalizedString("文件\(watermark.imagePath?.lastPathComponent)已损坏", comment: "")
-            alert.runModal()
             return false
         }
         
         newDict.setObject(watermarkDict, forKey: flagModel.tag as NSCopying)
         let result = newDict.write(toFile: watermarkPlistPath!, atomically: true)
         if (result) {
-            let index = self.watermarks.index(of: flagModel)
-            self.watermarks[index!] = watermark
+            if let index = self.watermarks.firstIndex(of: flagModel) {
+                self.watermarks[index] = watermark
+            }
+            watermark.updatePreviewImage()
         }
-        
         return result
     }
     
@@ -232,72 +230,128 @@ class KMWatermarkManager: NSObject {
         return result
     }
     
-    func removeAllTextWatermarks() -> Bool {
-        if (!FileManager.default.fileExists(atPath: watermarkPlistPath!)) {
-            return false
-        }
+    //MARK: - private
+    func setDictToWatermarK(dict: NSDictionary, _ model: KMPDFWatermarkData) {
         
-        let dictionary = NSDictionary(contentsOfFile: watermarkPlistPath!)
-        var newDictionary: NSMutableDictionary!
-        if (dictionary != nil) {
-            newDictionary = NSMutableDictionary(dictionary: dictionary!)
-        } else {
-            newDictionary = NSMutableDictionary()
-        }
+        model.watermarkType = (dict.object(forKey: KMWatermarkKey.watermarkType.rawValue) as? CPDFWatermarkType) ?? .text
         
-        let count = self.watermarks.count-1
-        var deleteArray: Array<KMPDFWatermarkData> = []
-        for i in 0 ... count {
-            let model = self.watermarks[i]
-            if (model.watermarkType == .text) {
-                newDictionary.removeObject(forKey: model.tag as Any)
-                deleteArray.append(model)
+        model.text = (dict.object(forKey: KMWatermarkKey.text.rawValue) as? String)
+        model.fontName = (dict.object(forKey: KMWatermarkKey.textFontName.rawValue) as? String) ?? ""
+        model.fontStyle = (dict.object(forKey: KMWatermarkKey.textfontStyle.rawValue) as? String) ?? ""
+        model.fontSize = (dict.object(forKey: KMWatermarkKey.textFontSize.rawValue) as? CGFloat) ?? 12
+ 
+        if let pathValue = dict.object(forKey: KMWatermarkKey.imagePath.rawValue) {
+            let path = watermarkFolderPath?.stringByAppendingPathComponent(pathValue as! String)
+            if (FileManager.default.fileExists(atPath: path!)) {
+                model.imagePath = path ?? ""
             }
         }
-        
-        let result = newDictionary.write(toFile: watermarkPlistPath!, atomically: true)
-        if (result) {
-            for model in deleteArray {
-                self.watermarks.removeObject(model)
-            }
+         
+        model.isScale = (dict.object(forKey: KMWatermarkKey.isScale.rawValue) as? Bool) ?? false
+        model.scale = (dict.object(forKey: KMWatermarkKey.scale.rawValue) as? CGFloat) ?? 1
+        model.rotation = dict.object(forKey: KMWatermarkKey.rotate.rawValue) as? CGFloat ?? 0
+        model.opacity = (dict.object(forKey: KMWatermarkKey.opacity.rawValue) as? CGFloat) ?? 1
+        model.verticalPosition = (dict.object(forKey: KMWatermarkKey.verticalMode.rawValue) as? CPDFWatermarkVerticalPosition) ?? .center
+        model.ty = dict.object(forKey: KMWatermarkKey.verticalSpace.rawValue) as? CGFloat ?? 0
+        model.horizontalPosition = (dict.object(forKey: KMWatermarkKey.horizontalMode.rawValue) as? CPDFWatermarkHorizontalPosition) ?? .center
+        model.tx = dict.object(forKey: KMWatermarkKey.horizontalSpace.rawValue) as? CGFloat ?? 0
+        if let textColorKey = dict.object(forKey: KMWatermarkKey.textColor.rawValue) as? String {
+            model.textColor = NSColor.km_init(hex: textColorKey)
+        } else {
+            let red: CGFloat = dict.object(forKey: KMWatermarkKey.red.rawValue) as? CGFloat ?? 0
+            let green: CGFloat = dict.object(forKey: KMWatermarkKey.green.rawValue) as? CGFloat ?? 0
+            let blue: CGFloat = dict.object(forKey: KMWatermarkKey.blue.rawValue) as? CGFloat ?? 0
+            model.textColor = NSColor(red: red, green: green, blue: blue, alpha: 1.0)
         }
+        model.isFront = (dict.object(forKey: KMWatermarkKey.isFront.rawValue) as? Bool) ?? false
+        model.isTilePage = (dict.object(forKey: KMWatermarkKey.isTile.rawValue) as? Bool) ?? false
+        model.horizontalSpacing = (dict.object(forKey: KMWatermarkKey.tileHorizontalSpace.rawValue) as? CGFloat) ?? 0
+        model.verticalSpacing = (dict.object(forKey: KMWatermarkKey.tileVerticalSpace.rawValue) as? CGFloat) ?? 0
+        model.tag = (dict.object(forKey: KMWatermarkKey.tag.rawValue) as? String) ?? ""
+        model.watermarkName = (dict.object(forKey: KMWatermarkKey.watermarkName.rawValue) as? String) ?? ""
         
-        return result
     }
     
-    func removeAllFileWatermarks() -> Bool {
-        if (!FileManager.default.fileExists(atPath: watermarkPlistPath!)) {
-            return false
+    //MARK: - Parse
+    func parseWaterMark(model: KMPDFWatermarkData) -> Dictionary<String, Any> {
+        
+        var dict: [String : Any] = [:]
+        
+        if model.watermarkType == .text {
+            dict[KMWatermarkKey.watermarkType.rawValue] = "0"
+        } else if model.watermarkType == .image {
+            dict[KMWatermarkKey.watermarkType.rawValue] = "1"
         }
         
-        let dictionary = NSDictionary(contentsOfFile: watermarkPlistPath!)
-        var newDictionary: NSMutableDictionary!
-        if (dictionary != nil) {
-            newDictionary = NSMutableDictionary(dictionary: dictionary!)
-        } else {
-            newDictionary = NSMutableDictionary()
+        if let text = model.text {
+            dict[KMWatermarkKey.text.rawValue] = text
+        }
+        dict[KMWatermarkKey.textFontName.rawValue] = model.fontName
+        dict[KMWatermarkKey.textfontStyle.rawValue] = model.fontStyle
+        dict[KMWatermarkKey.textFontSize.rawValue] = model.fontSize
+        if let imagePath = model.imagePath {
+            dict[KMWatermarkKey.imagePath.rawValue] = imagePath
         }
+        dict[KMWatermarkKey.isFront.rawValue] = model.isFront
+        dict[KMWatermarkKey.isScale.rawValue] = model.isScale
+        dict[KMWatermarkKey.scale.rawValue] = model.scale
+        dict[KMWatermarkKey.opacity.rawValue] = model.opacity
+        dict[KMWatermarkKey.rotate.rawValue] = model.rotation
+        dict[KMWatermarkKey.verticalMode.rawValue] = model.verticalPosition.rawValue
+        dict[KMWatermarkKey.verticalSpace.rawValue] = model.ty
+        dict[KMWatermarkKey.horizontalMode.rawValue] = model.horizontalPosition.rawValue
+        dict[KMWatermarkKey.horizontalSpace.rawValue] = model.tx
+        dict[KMWatermarkKey.textColor.rawValue] = model.textColor.toHex()
+        dict[KMWatermarkKey.isTile.rawValue] = model.isTilePage
+        dict[KMWatermarkKey.tileVerticalSpace.rawValue] = model.verticalSpacing
+        dict[KMWatermarkKey.tileHorizontalSpace.rawValue] = model.horizontalSpacing
+        dict[KMWatermarkKey.tag.rawValue] = model.tag
+        dict[KMWatermarkKey.watermarkName.rawValue] = model.watermarkName
         
-        let count = self.watermarks.count-1
-        var deleteArray: Array<KMPDFWatermarkData> = []
-        for i in 0 ... count {
-            let model = self.watermarks[i]
-            if (model.image != nil) {
-                newDictionary.removeObject(forKey: model.tag as Any)
-                deleteArray.append(model)
-            }
+        return dict
+    }
+    
+    private func parseDictionary(dict: NSDictionary) -> KMPDFWatermarkData {
+        let model = KMPDFWatermarkData()
+         
+        model.watermarkType = (dict.object(forKey: KMWatermarkKey.watermarkType.rawValue) as? CPDFWatermarkType) ?? .text
+        
+        model.text = (dict.object(forKey: KMWatermarkKey.text.rawValue) as? String)
+        model.fontName = (dict.object(forKey: KMWatermarkKey.textFontName.rawValue) as? String) ?? ""
+        model.fontStyle = (dict.object(forKey: KMWatermarkKey.textfontStyle.rawValue) as? String) ?? ""
+        model.fontSize = (dict.object(forKey: KMWatermarkKey.textFontSize.rawValue) as? CGFloat) ?? 12
+ 
+        if let pathValue = dict.object(forKey: KMWatermarkKey.imagePath.rawValue) {
+            model.imagePath = pathValue as? String
         }
         
-        let result = newDictionary.write(toFile: watermarkPlistPath!, atomically: true)
-        if (result) {
-            for model in deleteArray {
-                self.watermarks.removeObject(model)
-            }
+        model.isScale = (dict.object(forKey: KMWatermarkKey.isScale.rawValue) as? Bool) ?? false
+        model.scale = (dict.object(forKey: KMWatermarkKey.scale.rawValue) as? CGFloat) ?? 1
+        model.rotation = dict.object(forKey: KMWatermarkKey.rotate.rawValue) as? CGFloat ?? 0
+        model.opacity = (dict.object(forKey: KMWatermarkKey.opacity.rawValue) as? CGFloat) ?? 1
+        model.verticalPosition = (dict.object(forKey: KMWatermarkKey.verticalMode.rawValue) as? CPDFWatermarkVerticalPosition) ?? .center
+        model.ty = dict.object(forKey: KMWatermarkKey.verticalSpace.rawValue) as? CGFloat ?? 0
+        model.horizontalPosition = (dict.object(forKey: KMWatermarkKey.horizontalMode.rawValue) as? CPDFWatermarkHorizontalPosition) ?? .center
+        model.tx = dict.object(forKey: KMWatermarkKey.horizontalSpace.rawValue) as? CGFloat ?? 0
+        if let textColorKey = dict.object(forKey: KMWatermarkKey.textColor.rawValue) as? String {
+            model.textColor = NSColor.km_init(hex: textColorKey)
+        } else {
+            let red: CGFloat = dict.object(forKey: KMWatermarkKey.red.rawValue) as? CGFloat ?? 0
+            let green: CGFloat = dict.object(forKey: KMWatermarkKey.green.rawValue) as? CGFloat ?? 0
+            let blue: CGFloat = dict.object(forKey: KMWatermarkKey.blue.rawValue) as? CGFloat ?? 0
+            model.textColor = NSColor(red: red, green: green, blue: blue, alpha: 1.0)
         }
+        model.isFront = (dict.object(forKey: KMWatermarkKey.isFront.rawValue) as? Bool) ?? false
+        model.isTilePage = (dict.object(forKey: KMWatermarkKey.isTile.rawValue) as? Bool) ?? false
+        model.horizontalSpacing = (dict.object(forKey: KMWatermarkKey.tileHorizontalSpace.rawValue) as? CGFloat) ?? 0
+        model.verticalSpacing = (dict.object(forKey: KMWatermarkKey.tileVerticalSpace.rawValue) as? CGFloat) ?? 0
+        model.tag = (dict.object(forKey: KMWatermarkKey.tag.rawValue) as? String) ?? ""
+        model.watermarkName = (dict.object(forKey: KMWatermarkKey.watermarkName.rawValue) as? String) ?? ""
         
-        return result
+        return model
     }
-    
+     
+    //MARK: - Getter
     func drawImageAtpageRect(rect: NSRect, data: KMPDFWatermarkData) -> NSImage? {
         var size = NSZeroSize
         let text: String = data.text ?? ""
@@ -498,129 +552,12 @@ class KMWatermarkManager: NSObject {
         return image
     }
     
-    //MARK: - private
-    func setDictToWatermarK(dict: NSDictionary, _ model: KMPDFWatermarkData) {
-        
-        model.watermarkType = (dict.object(forKey: KMWatermarkKey.watermarkType.rawValue) as? CPDFWatermarkType) ?? .text
-        
-        model.text = (dict.object(forKey: KMWatermarkKey.text.rawValue) as? String)
-        model.fontName = (dict.object(forKey: KMWatermarkKey.textFontName.rawValue) as? String) ?? ""
-        model.fontStyle = (dict.object(forKey: KMWatermarkKey.textfontStyle.rawValue) as? String) ?? ""
-        model.fontSize = (dict.object(forKey: KMWatermarkKey.textFontSize.rawValue) as? CGFloat) ?? 12
- 
-        if let pathValue = dict.object(forKey: KMWatermarkKey.imagePath.rawValue) {
-            let path = watermarkFolderPath?.stringByAppendingPathComponent(pathValue as! String)
-            if (FileManager.default.fileExists(atPath: path!)) {
-                model.imagePath = path ?? ""
-            }
-        }
-         
-        model.isScale = (dict.object(forKey: KMWatermarkKey.isScale.rawValue) as? Bool) ?? false
-        model.scale = (dict.object(forKey: KMWatermarkKey.scale.rawValue) as? CGFloat) ?? 1
-        model.rotation = dict.object(forKey: KMWatermarkKey.rotate.rawValue) as? CGFloat ?? 0
-        model.opacity = (dict.object(forKey: KMWatermarkKey.opacity.rawValue) as? CGFloat) ?? 1
-        model.verticalPosition = (dict.object(forKey: KMWatermarkKey.verticalMode.rawValue) as? CPDFWatermarkVerticalPosition) ?? .center
-        model.ty = dict.object(forKey: KMWatermarkKey.verticalSpace.rawValue) as? CGFloat ?? 0
-        model.horizontalPosition = (dict.object(forKey: KMWatermarkKey.horizontalMode.rawValue) as? CPDFWatermarkHorizontalPosition) ?? .center
-        model.tx = dict.object(forKey: KMWatermarkKey.horizontalSpace.rawValue) as? CGFloat ?? 0
-        if let textColorKey = dict.object(forKey: KMWatermarkKey.textColor.rawValue) as? String {
-            model.textColor = NSColor.km_init(hex: textColorKey)
-        } else {
-            let red: CGFloat = dict.object(forKey: KMWatermarkKey.red.rawValue) as? CGFloat ?? 0
-            let green: CGFloat = dict.object(forKey: KMWatermarkKey.green.rawValue) as? CGFloat ?? 0
-            let blue: CGFloat = dict.object(forKey: KMWatermarkKey.blue.rawValue) as? CGFloat ?? 0
-            model.textColor = NSColor(red: red, green: green, blue: blue, alpha: 1.0)
-        }
-        model.isFront = (dict.object(forKey: KMWatermarkKey.isFront.rawValue) as? Bool) ?? false
-        model.isTilePage = (dict.object(forKey: KMWatermarkKey.isTile.rawValue) as? Bool) ?? false
-        model.horizontalSpacing = (dict.object(forKey: KMWatermarkKey.tileHorizontalSpace.rawValue) as? CGFloat) ?? 0
-        model.verticalSpacing = (dict.object(forKey: KMWatermarkKey.tileVerticalSpace.rawValue) as? CGFloat) ?? 0
-        model.tag = (dict.object(forKey: KMWatermarkKey.tag.rawValue) as? String) ?? ""
-        model.watermarkName = (dict.object(forKey: KMWatermarkKey.watermarkName.rawValue) as? String) ?? ""
-        
-    }
-    
-    func parseWaterMark(model: KMPDFWatermarkData) -> Dictionary<String, Any> {
-        
-        var dict: [String : Any] = [:]
-        
-        if model.watermarkType == .text {
-            dict[KMWatermarkKey.watermarkType.rawValue] = "0"
-        } else if model.watermarkType == .image {
-            dict[KMWatermarkKey.watermarkType.rawValue] = "1"
-        }
-        
-        if let text = model.text {
-            dict[KMWatermarkKey.text.rawValue] = text
-        }
-        dict[KMWatermarkKey.textFontName.rawValue] = model.fontName
-        dict[KMWatermarkKey.textfontStyle.rawValue] = model.fontStyle
-        dict[KMWatermarkKey.textFontSize.rawValue] = model.fontSize
-
-        if let imagePath = model.imagePath {
-            dict[KMWatermarkKey.imagePath.rawValue] = model.imagePath
-        }
-         
-        dict[KMWatermarkKey.isFront.rawValue] = model.isFront
-        dict[KMWatermarkKey.isScale.rawValue] = model.isScale
-        dict[KMWatermarkKey.scale.rawValue] = model.scale
-        dict[KMWatermarkKey.opacity.rawValue] = model.opacity
-        dict[KMWatermarkKey.rotate.rawValue] = model.rotation
-        dict[KMWatermarkKey.verticalMode.rawValue] = model.verticalPosition.rawValue
-        dict[KMWatermarkKey.verticalSpace.rawValue] = model.ty
-        dict[KMWatermarkKey.horizontalMode.rawValue] = model.horizontalPosition.rawValue
-        dict[KMWatermarkKey.horizontalSpace.rawValue] = model.tx
-        dict[KMWatermarkKey.textColor.rawValue] = model.textColor.toHex()
-        dict[KMWatermarkKey.isTile.rawValue] = model.isTilePage
-        dict[KMWatermarkKey.tileVerticalSpace.rawValue] = model.verticalSpacing
-        dict[KMWatermarkKey.tileHorizontalSpace.rawValue] = model.horizontalSpacing
-        dict[KMWatermarkKey.tag.rawValue] = model.tag
-        dict[KMWatermarkKey.watermarkName.rawValue] = model.watermarkName
-        
-        return dict
-    }
-    
-    private func parseDictionary(dict: NSDictionary) -> KMPDFWatermarkData {
-        let model = KMPDFWatermarkData()
-         
-        model.watermarkType = (dict.object(forKey: KMWatermarkKey.watermarkType.rawValue) as? CPDFWatermarkType) ?? .text
-        
-        model.text = (dict.object(forKey: KMWatermarkKey.text.rawValue) as? String)
-        model.fontName = (dict.object(forKey: KMWatermarkKey.textFontName.rawValue) as? String) ?? ""
-        model.fontStyle = (dict.object(forKey: KMWatermarkKey.textfontStyle.rawValue) as? String) ?? ""
-        model.fontSize = (dict.object(forKey: KMWatermarkKey.textFontSize.rawValue) as? CGFloat) ?? 12
- 
-        if let pathValue = dict.object(forKey: KMWatermarkKey.imagePath.rawValue) {
-            let path = watermarkFolderPath?.stringByAppendingPathComponent(pathValue as! String)
-            if (FileManager.default.fileExists(atPath: path!)) {
-                model.imagePath = path ?? ""
-            }
-        }
-         
-        model.isScale = (dict.object(forKey: KMWatermarkKey.isScale.rawValue) as? Bool) ?? false
-        model.scale = (dict.object(forKey: KMWatermarkKey.scale.rawValue) as? CGFloat) ?? 1
-        model.rotation = dict.object(forKey: KMWatermarkKey.rotate.rawValue) as? CGFloat ?? 0
-        model.opacity = (dict.object(forKey: KMWatermarkKey.opacity.rawValue) as? CGFloat) ?? 1
-        model.verticalPosition = (dict.object(forKey: KMWatermarkKey.verticalMode.rawValue) as? CPDFWatermarkVerticalPosition) ?? .center
-        model.ty = dict.object(forKey: KMWatermarkKey.verticalSpace.rawValue) as? CGFloat ?? 0
-        model.horizontalPosition = (dict.object(forKey: KMWatermarkKey.horizontalMode.rawValue) as? CPDFWatermarkHorizontalPosition) ?? .center
-        model.tx = dict.object(forKey: KMWatermarkKey.horizontalSpace.rawValue) as? CGFloat ?? 0
-        if let textColorKey = dict.object(forKey: KMWatermarkKey.textColor.rawValue) as? String {
-            model.textColor = NSColor.km_init(hex: textColorKey)
-        } else {
-            let red: CGFloat = dict.object(forKey: KMWatermarkKey.red.rawValue) as? CGFloat ?? 0
-            let green: CGFloat = dict.object(forKey: KMWatermarkKey.green.rawValue) as? CGFloat ?? 0
-            let blue: CGFloat = dict.object(forKey: KMWatermarkKey.blue.rawValue) as? CGFloat ?? 0
-            model.textColor = NSColor(red: red, green: green, blue: blue, alpha: 1.0)
-        }
-        model.isFront = (dict.object(forKey: KMWatermarkKey.isFront.rawValue) as? Bool) ?? false
-        model.isTilePage = (dict.object(forKey: KMWatermarkKey.isTile.rawValue) as? Bool) ?? false
-        model.horizontalSpacing = (dict.object(forKey: KMWatermarkKey.tileHorizontalSpace.rawValue) as? CGFloat) ?? 0
-        model.verticalSpacing = (dict.object(forKey: KMWatermarkKey.tileVerticalSpace.rawValue) as? CGFloat) ?? 0
-        model.tag = (dict.object(forKey: KMWatermarkKey.tag.rawValue) as? String) ?? ""
-        model.watermarkName = (dict.object(forKey: KMWatermarkKey.watermarkName.rawValue) as? String) ?? ""
-        
-        return model
+    class func getFontSize() -> [String] {
+        return ["6","8","10","12","14",
+                "16","18","20","22","24",
+                "26","28","30","32","34",
+                "36","40","48","64","80",
+                "96","112"]
     }
     
     func fetchAvailableName() -> String {

+ 8 - 5
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateController.swift

@@ -75,7 +75,9 @@ class KMNWatermarkTemplateController: NSViewController {
     
     //刷新所有数据
     public func reloadData() {
-        
+        for item in KMWatermarkManager.defaultManager.watermarks {
+            print(item.text ?? "")
+        }
         if KMWatermarkManager.defaultManager.watermarks.count == 0 {
             collectionView.isHidden = true
             emptyView.isHidden = false
@@ -105,7 +107,6 @@ class KMNWatermarkTemplateController: NSViewController {
     
     private func collectionViewSelectedChanged() {
         let indexs = collectionView.selectionIndexPaths
-        
         if indexs.count > 0 {
             for index in indexs {
                 let data = KMWatermarkManager.defaultManager.watermarks[index.item]
@@ -114,7 +115,6 @@ class KMNWatermarkTemplateController: NSViewController {
         } else {
             selectedWatermark = nil
         }
-        
         delegate?.templateControllerDidSelectedChanged?(self)
     }
     
@@ -152,7 +152,6 @@ extension KMNWatermarkTemplateController: NSCollectionViewDelegate, NSCollection
     }
     
     public func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
-        
         return CGSize(width: 168, height: 237)
     }
     
@@ -197,7 +196,11 @@ extension KMNWatermarkTemplateController: kmNWatermarkTemplateItemDelegate {
             alert.beginSheetModal(for: NSApp.mainWindow!) { (response) in
                 if response == .alertFirstButtonReturn {
                     let _ = KMWatermarkManager.defaultManager.removeWatermark(watermark: watermark)
-                    
+                    if watermark == self.selectedWatermark {
+                        self.selectedWatermark = nil
+                        
+                        self.delegate?.templateControllerDidSelectedChanged?(self)
+                    }
                     self.reloadData()
                 }
             }

+ 1 - 1
PDF Office/PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Templates/KMNWatermarkTemplateItem.swift

@@ -49,7 +49,7 @@ class KMNWatermarkTemplateItem: NSCollectionViewItem {
     
     func reloadData() {
         if let watermark = watermark {
-            watermarkItem.properties.icon = KMWatermarkManager.defaultManager.drawImageAtpageRect(rect: self.view.bounds, data: watermark)
+            watermarkItem.properties.icon = watermark.modelPreviewImage()
             watermarkItem.properties.state = isSelected ? .pressed : .normal
             watermarkItem.properties.text = watermark.watermarkName
             watermarkItem.reloadData()

+ 1 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -1652,6 +1652,7 @@ extension KMMainViewController: KMEditToolbarViewDelegate {
 extension KMMainViewController: KMWatermarkControllerDelegate {
     func kmWatermarkControllerDidUpdateMode(_ view: KMWatermarkController) {
         editToolbarView?.editSubType = view.editSubType
+        editToolbarView?.reloadData()
         
     }
     

+ 10 - 73
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2663,54 +2663,6 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "3E9E33D9-DB88-4685-9A89-1E0C54373506"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "PDF Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMPDFWatermarkData.swift"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "153"
-            endingLineNumber = "153"
-            landmarkName = "isWatermarkModelChanged()"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "3E9E33D9-DB88-4685-9A89-1E0C54373506 - 50932d32d034c2be"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMPDFWatermarkData.isWatermarkModelChanged() -&gt; Swift.Bool"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMPDFWatermarkData.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "153"
-                  endingLineNumber = "153"
-                  offsetFromSymbolStart = "80">
-               </Location>
-               <Location
-                  uuid = "3E9E33D9-DB88-4685-9A89-1E0C54373506 - 50932d32d034c2be"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMPDFWatermarkData.isWatermarkModelChanged() -&gt; Swift.Bool"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/EditTool/Watermark/New/Views/Model/KMPDFWatermarkData.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "153"
-                  endingLineNumber = "153"
-                  offsetFromSymbolStart = "108">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
@@ -2912,43 +2864,28 @@
             filePath = "PDF Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "328"
-            endingLineNumber = "328"
+            startingLineNumber = "325"
+            endingLineNumber = "325"
             landmarkName = "templateButtonClicked(_:)"
             landmarkType = "7">
             <Locations>
                <Location
-                  uuid = "0FDE0D21-F47A-4380-A514-37E1BB2E1592 - a3a5da7bfbb40b17"
+                  uuid = "0FDE0D21-F47A-4380-A514-37E1BB2E1592 - 5c70bc103b79302c"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
-                  symbolName = "PDF_Reader_Pro.KMBackgroundPropertyController.chooseURLAction(__C.NSView) -&gt; ()"
-                  moduleName = "PDF Reader Pro"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "328"
-                  endingLineNumber = "328"
-                  offsetFromSymbolStart = "500">
-               </Location>
-               <Location
-                  uuid = "0FDE0D21-F47A-4380-A514-37E1BB2E1592 - 827e0cd9d8ecf5ad"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "closure #1 (__C.NSModalResponse) -&gt; () in PDF_Reader_Pro.KMBackgroundPropertyController.chooseURLAction(__C.NSView) -&gt; ()"
+                  symbolName = "PDF_Reader_Pro.KMBackgroundPropertyController.templateButtonClicked(KMComponentLibrary.ComponentButton) -&gt; ()"
                   moduleName = "PDF Reader Pro"
                   usesParentBreakpointCondition = "Yes"
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "328"
-                  endingLineNumber = "328"
-                  offsetFromSymbolStart = "596">
+                  startingLineNumber = "326"
+                  endingLineNumber = "326"
+                  offsetFromSymbolStart = "68">
                </Location>
                <Location
-                  uuid = "0FDE0D21-F47A-4380-A514-37E1BB2E1592 - 5c70bc103b793062"
+                  uuid = "0FDE0D21-F47A-4380-A514-37E1BB2E1592 - 5c70bc103b7930cd"
                   shouldBeEnabled = "Yes"
                   ignoreCount = "0"
                   continueAfterRunningActions = "No"
@@ -2958,8 +2895,8 @@
                   urlString = "file:///Users/kdanmobile/Documents/Git/PDF_Office/PDF%20Office/PDF%20Master/KMClass/KMPDFViewController/EditTool/Background/Background/Views/KMBackgroundPropertyController.swift"
                   startingColumnNumber = "9223372036854775807"
                   endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "328"
-                  endingLineNumber = "328"
+                  startingLineNumber = "325"
+                  endingLineNumber = "325"
                   offsetFromSymbolStart = "200">
                </Location>
             </Locations>