Browse Source

【综合】水印大小调整

tangchao 1 year ago
parent
commit
ab02c60606

+ 2 - 2
PDF Office/PDF Master/Class/Common/Tools/KMTools.swift

@@ -489,10 +489,10 @@ extension KMTools {
         watermark?.image = NSImage(named: "KMImageNameWatermark")
         watermark?.horizontalPosition = .left
         watermark?.verticalPosition = .top
-        watermark?.scale = 0.3
+        watermark?.scale = 0.5
         document.addWatermark(watermark)
         // 添加 link注释
-        var watermarkAnnoBounds = NSMakeRect(0, 0, 72, 20)
+        var watermarkAnnoBounds = NSMakeRect(0, 0, 120, 32)
         for i in 0 ..< document.pageCount {
             guard let page = document.page(at: i) else {
                 continue

+ 2 - 2
PDF Office/PDF Master/Class/Merge/OCPart/KMPDFEditAppendWindow.m

@@ -113,7 +113,7 @@
             CGImageSourceRef imageSource = CGImageSourceCreateWithData((CFDataRef)data, NULL);
             imageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL);
             
-            CGContextDrawImage(context, CGRectMake(0, pageSize.height-20, 72, 20), imageRef);
+            CGContextDrawImage(context, CGRectMake(0, pageSize.height-32, 120, 32), imageRef);
         }
         [page transformContext:context forBox:kPDFDisplayBoxCropBox];
     } else {
@@ -744,7 +744,7 @@ static KMPDFEditAppendWindow *windowController = nil;
 //                [self.PDFDocument insertPageObject:page atIndex:i];
                 
                 PDFAnnotationLink *linkA = [[PDFAnnotationLink alloc] init];
-                linkA.bounds = NSMakeRect(0, pageBounds.size.height-20, 72, 20);
+                linkA.bounds = NSMakeRect(0, pageBounds.size.height-32, 120, 32);
                 linkA.URL = [NSURL URLWithString:@"https://www.pdfreaderpro.com/store"];
                 [page addAnnotation:linkA];