diff --git a/src/pdfkit.cs b/src/pdfkit.cs index 54781d25e06d..862311a5b4e2 100644 --- a/src/pdfkit.cs +++ b/src/pdfkit.cs @@ -317,6 +317,20 @@ enum PdfAnnotationHighlightingMode { Push, } + [Native] + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + public enum PdfAccessPermissions : ulong + { + LowQualityPrinting = (1uL << 0), + HighQualityPrinting = (1uL << 1), + DocumentChanges = (1uL << 2), + DocumentAssembly = (1uL << 3), + ContentCopying = (1uL << 4), + ContentAccessibility = (1uL << 5), + Commenting = (1uL << 6), + FormFieldEntry = (1uL << 7), + } + [Mac (10,13)] [iOS (11,0)] [Static] @@ -411,6 +425,10 @@ interface PdfDocumentWriteOptionKeys { [Field ("PDFDocumentUserPasswordOption", "+PDFKit")] NSString UserPasswordKey { get; } + + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + [Field ("PDFDocumentAccessPermissionsOption", "+PDFKit")] + NSString AccessPermissionsKey { get; } } [Mac (10,13)] @@ -420,6 +438,9 @@ interface PdfDocumentWriteOptions { string OwnerPassword { get; set; } string UserPassword { get; set; } + + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + string AccessPermissions { get; set; } } [Mac (10,13)] @@ -1157,6 +1178,14 @@ interface PdfDocument : NSCopying { [Notification] NSString DidEndPageWriteNotification { get; } + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + [Field ("PDFDocumentFoundSelectionKey")] + NSString FoundSelectionKey { get; } + + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + [Field ("PDFDocumentPageIndexKey")] + NSString PageIndexKey { get; } + // - (instancetype)init NS_DESIGNATED_INITIALIZER; [Export ("init")] [DesignatedInitializer] @@ -1183,6 +1212,10 @@ interface PdfDocument : NSCopying { [NullAllowed] NSDictionary DocumentAttributes { get; set; } + [iOS (15,0), Mac (12,0), MacCatalyst (15,0)] + [Export ("accessPermissions")] + PdfAccessPermissions AccessPermissions { get; } + [Wrap ("new PdfDocumentAttributes (DocumentAttributes)")] PdfDocumentAttributes GetDocumentAttributes (); diff --git a/tests/xtro-sharpie/MacCatalyst-PDFKit.todo b/tests/xtro-sharpie/MacCatalyst-PDFKit.todo deleted file mode 100644 index 41d9931bafd8..000000000000 --- a/tests/xtro-sharpie/MacCatalyst-PDFKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum! PDFAccessPermissions not bound -!missing-field! PDFDocumentAccessPermissionsOption not bound -!missing-field! PDFDocumentFoundSelectionKey not bound -!missing-field! PDFDocumentPageIndexKey not bound -!missing-selector! PDFDocument::accessPermissions not bound diff --git a/tests/xtro-sharpie/iOS-PDFKit.todo b/tests/xtro-sharpie/iOS-PDFKit.todo deleted file mode 100644 index 41d9931bafd8..000000000000 --- a/tests/xtro-sharpie/iOS-PDFKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum! PDFAccessPermissions not bound -!missing-field! PDFDocumentAccessPermissionsOption not bound -!missing-field! PDFDocumentFoundSelectionKey not bound -!missing-field! PDFDocumentPageIndexKey not bound -!missing-selector! PDFDocument::accessPermissions not bound diff --git a/tests/xtro-sharpie/macOS-PDFKit.todo b/tests/xtro-sharpie/macOS-PDFKit.todo deleted file mode 100644 index 41d9931bafd8..000000000000 --- a/tests/xtro-sharpie/macOS-PDFKit.todo +++ /dev/null @@ -1,5 +0,0 @@ -!missing-enum! PDFAccessPermissions not bound -!missing-field! PDFDocumentAccessPermissionsOption not bound -!missing-field! PDFDocumentFoundSelectionKey not bound -!missing-field! PDFDocumentPageIndexKey not bound -!missing-selector! PDFDocument::accessPermissions not bound