Skip to content

PDFKit macOS xcode14.0 beta2

TJ Lambert edited this page Aug 4, 2022 · 3 revisions

#PDFKit.framework https://github.com/xamarin/xamarin-macios/pull/15628

diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h	2022-05-31 15:05:30.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFDocument.h	2022-06-17 15:27:46.000000000 -0400
@@ -95,6 +95,12 @@
                                                                                                                 // Users can have limited access to modify, print, or write the file.
 PDFKIT_EXTERN PDFDocumentWriteOption const PDFDocumentAccessPermissionsOption PDFKIT_AVAILABLE(12_0, 15_0);     // NSNumber containing a PDFAccessPermissions
 
+PDFKIT_EXTERN PDFDocumentWriteOption const PDFDocumentBurnInAnnotationsOption PDFKIT_AVAILABLE(13_0, 16_0);    // @YES to enable, disabled by default
+                                                                                                                // If enabled, annotations will be rendered into the content stream and NOT saved as annotations
+PDFKIT_EXTERN PDFDocumentWriteOption const PDFDocumentSaveTextFromOCROption PDFKIT_AVAILABLE(13_0, 16_0);      // @YES to enable, disabled by default
+                                                                                                                // If enabled, OCR will be performed on all pages on which it has not been done already and saved as invisible, but selectable. text
+
+
 // Some PDF access permissions are non-strict supersets of other permissions. Granting access to a superset
 // permission also grants access to permission(s) it is a superset of. These permissions are as follows:
 //
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.apinotes /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.apinotes
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.apinotes	2022-05-21 08:44:53.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.apinotes	2022-06-16 00:37:05.000000000 -0400
@@ -19,3 +19,9 @@
       SwiftName: PDFDocumentWriteOption.ownerPassword
     - Name: PDFDocumentUserPasswordOption
       SwiftName: PDFDocumentWriteOption.userPassword
+    - Name: PDFDocumentAccessPermissionsOption
+      SwiftName: PDFDocumentWriteOption.accessPermissions
+    - Name: PDFDocumentBurnInAnnotationsOption
+      SwiftName: PDFDocumentWriteOption.burnInAnnotations
+    - Name: PDFDocumentSaveTextFromOCROption
+      SwiftName: PDFDocumentWriteOption.saveTextFromOCR
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.h	2022-05-21 08:49:04.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFKit.h	2022-06-16 00:44:53.000000000 -0400
@@ -24,6 +24,7 @@
 #import <PDFKit/PDFSelection.h>
 #import <PDFKit/PDFThumbnailView.h>
 #import <PDFKit/PDFView.h>
+#import <PDFKit/PDFPageOverlayViewProvider.h>
 
 // Deprecated
 #import <PDFKit/PDFAnnotationButtonWidget.h>
diff -ruN /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPageOverlayViewProvider.h /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPageOverlayViewProvider.h
--- /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPageOverlayViewProvider.h	2022-05-21 08:49:04.000000000 -0400
+++ /Applications/Xcode_14.0.0-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/PDFKit.framework/Headers/PDFPageOverlayViewProvider.h	2022-06-17 11:26:59.000000000 -0400
@@ -11,26 +11,24 @@
 
 @class PDFPage, PDFView;
 
-/* PDFPageOverlayViewProvider allows a client to provide views that will be overlaid onto each PDFPage.
-*/
-
+API_AVAILABLE(macos(13.0), ios(16.0))
 @protocol PDFPageOverlayViewProvider <NSObject>
 
 @required
 
-// Return a "prepared" overlay view
-- (nullable PDFKitPlatformView*)overlayViewForPage:(PDFPage*)page;
-
-// Perform teardown of the overlay view
-- (void)relinquishOverlayViewForPage:(PDFPage*)page;
+// Asks the provider for a view to be displayed on top of the specified page.
+- (nullable PDFKitPlatformView*)pdfView:(PDFView*)view overlayViewForPage:(PDFPage*)page;
 
 @optional
 
-// Called when the overlay view has been added to its superview, and constraints have been applied
-- (void)overlayViewWasInstalledForPage:(PDFPage*)page;
-
-// Called before the overlay view is removed from its superview
-- (void)overlayViewWillBeUninstalledForPage:(PDFPage*)page;
+// Tells the provider that a view returned from `overlayViewForPage` has been added
+// to the view hierarchy and constraints have been set up. At this point, gesture failure
+// handlers may be set up with those of `pdfView`.
+- (void)pdfView:(PDFView*)pdfView willDisplayOverlayView:(PDFKitPlatformView*)overlayView forPage:(PDFPage*)page;
+
+// Tells the provider that a view returned from `overlayViewForPage` will be removed.
+// This can be used to restore whatever was done in `overlayView:wasAddedForPage`.
+- (void)pdfView:(PDFView*)pdfView willEndDisplayingOverlayView:(PDFKitPlatformView*)overlayView forPage:(PDFPage*)page;
 
 @end
 
Clone this wiki locally