Parcourir la source

compdfkit(rn) - 版权时间修改,新增导入字体接口

liuxiaolong il y a 1 mois
Parent
commit
5355fb902e
46 fichiers modifiés avec 9324 ajouts et 370 suppressions
  1. 1 1
      LICENSE
  2. 6 6
      README.md
  3. 1 1
      android/build.gradle
  4. BIN
      android/libs/ComPDFKit-UI.aar
  5. BIN
      android/libs/ComPDFKit.aar
  6. BIN
      android/libs/ComPDFKit_Tools-release.aar
  7. 7 1
      android/src/main/java/com/compdfkitpdf/reactnative/CompdfkitPdfModule.java
  8. 1 1
      android/src/main/java/com/compdfkitpdf/reactnative/CompdfkitPdfPackage.java
  9. 1 1
      android/src/main/java/com/compdfkitpdf/reactnative/modules/CPDFViewModule.java
  10. 1 1
      android/src/main/java/com/compdfkitpdf/reactnative/view/CPDFView.java
  11. 1 1
      android/src/main/java/com/compdfkitpdf/reactnative/viewmanager/CPDFViewManager.java
  12. 67 12
      example/App.tsx
  13. BIN
      example/android/app/libs/ComPDFKit-UI.aar
  14. BIN
      example/android/app/libs/ComPDFKit_Tools-release.aar
  15. BIN
      example/android/app/src/main/assets/User guide.pdf
  16. BIN
      example/android/app/src/main/assets/extraFonts/Arial Bold.ttf
  17. BIN
      example/android/app/libs/ComPDFKit.aar
  18. BIN
      example/android/app/src/main/assets/extraFonts/Arial_Italic.ttf
  19. BIN
      example/android/app/src/main/assets/extraFonts/arial.ttf
  20. BIN
      example/android/app/src/main/assets/extraFonts/arialmt.ttf
  21. 2 0
      example/android/app/src/main/java/com/compdfkit/reactnative/example/MainApplication.kt
  22. 551 0
      example/android/app/src/main/res/values-fr/strings.xml
  23. 1 0
      example/android/app/src/main/res/values/styles.xml
  24. 16 6
      example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj
  25. 1 1
      example/ios/CompdfkitPdfExample/AppDelegate.h
  26. 1 1
      example/ios/CompdfkitPdfExample/AppDelegate.mm
  27. 1 1
      example/ios/CompdfkitPdfExample/main.m
  28. 8280 0
      example/package-lock.json
  29. 3 2
      example/package.json
  30. 48 52
      example/src/CPDFReaderViewControllerExample.tsx
  31. 2 2
      example/src/CPDFReaderViewExample.tsx
  32. 1 1
      example/src/examples.tsx
  33. 3 2
      example/src/screens/SettingScreen.tsx
  34. 8 1
      ios/ComPDFKitRN.mm
  35. 35 16
      ios/ComPDFKitRN.swift
  36. 1 1
      ios/CompdfkitPdf-Bridging-Header.h
  37. 75 75
      ios/RCTCPDFView.swift
  38. 1 1
      ios/RCTCPDFViewManager.m
  39. 44 44
      ios/RCTCPDFViewManager.swift
  40. 1 1
      ios/RCTDocumentManager.m
  41. 41 41
      ios/RCTDocumentManager.swift
  42. 1 1
      package.json
  43. 4 4
      src/configuration/CPDFConfiguration.ts
  44. 6 6
      src/configuration/CPDFOptions.ts
  45. 32 7
      src/index.tsx
  46. 79 79
      src/view/CPDFReaderView.tsx

+ 1 - 1
LICENSE

@@ -1,3 +1,3 @@
-Copyright (C) 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+Copyright (C) 2014-2025 PDF Technologies, Inc. All Rights Reserved.
 No part of this document can be reproduced, transferred, distributed or stored in any
 format without the prior written permission of PDF Technologies.

+ 6 - 6
README.md

@@ -115,8 +115,8 @@ open ios/Podfile
 ```diff
 target 'MyApp' do
     # ...
-+    pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.2.0.podspec'
-+  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.2.0.podspec'
++    pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.2.1.podspec'
++  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.2.1.podspec'
     # ...
 end
 ```
@@ -126,8 +126,8 @@ end
 ```diff
 target 'MyApp' do
     # ...
-+  pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.2.0'
-+  pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.2.0'
++  pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.2.1'
++  pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.2.1'
     # ...
 end
 ```
@@ -185,7 +185,7 @@ Here is the sample code for `App.tsx`:
 
 ```tsx
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -248,7 +248,7 @@ export default class App extends Component<Props> {
     samplePDF = Platform.OS === 'android'
         ? 'file:///android_asset/PDF_Document.pdf'
         : 'PDF_Document.pdf';
-  
+
     const onPageChanged = (pageIndex : number) =>{
         // console.log('ComPDFKitRN --- onPageChanged:', pageIndex);
     }

+ 1 - 1
android/build.gradle

@@ -86,7 +86,7 @@ dependencies {
   compileOnly fileTree(include: ['*.jar','*.aar'], dir: 'libs')
   implementation "com.facebook.react:react-native:+"
 
-//  api "com.compdf:compdfkit-ui:2.2.1-SNAPSHOT"
+  api "com.compdf:compdfkit-tools:2.2.1-SNAPSHOT"
   api 'com.github.bumptech.glide:glide:4.15.1'
   annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
   api 'androidx.documentfile:documentfile:1.0.1'

BIN
android/libs/ComPDFKit-UI.aar


BIN
android/libs/ComPDFKit.aar


BIN
android/libs/ComPDFKit_Tools-release.aar


+ 7 - 1
android/src/main/java/com/compdfkitpdf/reactnative/CompdfkitPdfModule.java

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 PDF Technologies, Inc. All Rights Reserved.
  * <p>
  * 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.
@@ -219,6 +219,12 @@ public class CompdfkitPdfModule extends ReactContextBaseJavaModule {
     }
   }
 
+  @ReactMethod
+  public void setImportFontDir(String dir, boolean addSysFont,Promise promise){
+    CPDFSdk.setImportFontDir(dir, addSysFont);
+    promise.resolve(true);
+  }
+
   @Override
   public void invalidate() {
     getReactApplicationContext().removeActivityEventListener(activityEventListener);

+ 1 - 1
android/src/main/java/com/compdfkitpdf/reactnative/CompdfkitPdfPackage.java

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.

+ 1 - 1
android/src/main/java/com/compdfkitpdf/reactnative/modules/CPDFViewModule.java

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.

+ 1 - 1
android/src/main/java/com/compdfkitpdf/reactnative/view/CPDFView.java

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 PDF Technologies, Inc. All Rights Reserved.
  * <p>
  * 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.

+ 1 - 1
android/src/main/java/com/compdfkitpdf/reactnative/viewmanager/CPDFViewManager.java

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 PDF Technologies, Inc. All Rights Reserved.
  * <p>
  * 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.

+ 67 - 12
example/App.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -12,6 +12,7 @@ import { Image, Platform, TouchableOpacity } from 'react-native';
 import { ComPDFKit } from '@compdfkit_pdf_sdk/react_native';
 import { NavigationContainer } from '@react-navigation/native';
 import { createNativeStackNavigator } from '@react-navigation/native-stack';
+import RNFS from 'react-native-fs';
 
 import HomeScreen from './src/screens/HomeScreen';
 import CPDFReaderViewExampleScreen from './src/CPDFReaderViewExample';
@@ -39,10 +40,13 @@ export default class App extends Component<Props> {
   }
 
   async initialize() {
+    const fontDir = await copyAssetsFolderToStorage('extraFonts');
+    console.log('ComPDFKitRN', "fontDir:", fontDir)
+    await ComPDFKit.setImportFontDir(fontDir, true);
     // Online certification, Fill in your online license
     // Returns true if initialization is successful, otherwise returns false.
 
-    //  var result = await ComPDFKit.initialize('NjYzODcyYTMxOWQzMA==', 'NjYzODcyYTgxM2YwNg==')
+    //  var result = await ComPDFKit.initialize('Njc4NzI1OGQ3ZGQyZQ==', 'Njc4NzI1OGQ3ZGQyZQ==')
     //  console.log("ComPDFKitRN", "initialize:", result)
 
     // Offline authentication, Fill in your offline license
@@ -51,6 +55,8 @@ export default class App extends Component<Props> {
 
   }
 
+  
+
   render() {
     return (
       <NavigationContainer>
@@ -79,23 +85,23 @@ export default class App extends Component<Props> {
               backgroundColor: '#FAFCFF',
             },
           }} />
-          <Stack.Screen 
-            name='CPDFReaderViewControllerExample' 
-            component={CPDFReaderViewControllerExampleScreen} 
+          <Stack.Screen
+            name='CPDFReaderViewControllerExample'
+            component={CPDFReaderViewControllerExampleScreen}
             options={() => ({
                   headerShown: false,
               })}
           />
-          <Stack.Screen 
-            name='CPDFAnnotationsExample' 
-            component={CPDFAnnotationsExampleScreen} 
+          <Stack.Screen
+            name='CPDFAnnotationsExample'
+            component={CPDFAnnotationsExampleScreen}
             options={() => ({
                   headerShown: false,
               })}
           />
-          <Stack.Screen 
-            name='CPDFSecurityExample' 
-            component={CPDFSecurityExampleScreen} 
+          <Stack.Screen
+            name='CPDFSecurityExample'
+            component={CPDFSecurityExampleScreen}
             options={() => ({
                   headerShown: false,
               })}
@@ -104,4 +110,53 @@ export default class App extends Component<Props> {
       </NavigationContainer>
     );
   }
-}
+}
+
+
+
+
+const copyAssetsFolderToStorage = async (folderName : string) => {
+  try {
+    // Define the target storage directory
+    const targetDir = `${RNFS.DocumentDirectoryPath}/${folderName}`;
+
+    // Ensure the target directory exists
+    const dirExists = await RNFS.exists(targetDir);
+    if (!dirExists) {
+      await RNFS.mkdir(targetDir);
+    }
+
+    if (Platform.OS === 'android') {
+      // Android: Read all files in the folder
+      const files = await RNFS.readDirAssets(folderName); // Returns an array of file objects
+      for (const file of files) {
+        if (file.isFile()) {
+          const fileContents = await RNFS.readFileAssets(`${folderName}/${file.name}`, 'base64'); // Read file from assets
+          const targetFilePath = `${targetDir}/${file.name}`;
+          await RNFS.writeFile(targetFilePath, fileContents, 'base64'); // Write to target
+        }
+      }
+    } else if (Platform.OS === 'ios') {
+      // iOS: Copy files directly
+      const files = await RNFS.readDir(`${RNFS.MainBundlePath}/${folderName}`);
+
+      for (const file of files) {
+        if (file.isFile()) {
+          const sourcePath = file.path;
+          const targetFilePath = `${targetDir}/${file.name}`;
+          if(await RNFS.exists(targetFilePath)){
+            continue;
+          }
+          await RNFS.copyFile(sourcePath, targetFilePath);
+        }
+      }
+    } else {
+      throw new Error('Unsupported platform');
+    }
+
+    return targetDir; // Return the target directory path
+  } catch (error) {
+    console.error('Error copying folder:', error);
+    throw new Error('Failed to copy folder to storage.');
+  }
+};

BIN
example/android/app/libs/ComPDFKit-UI.aar


BIN
example/android/app/libs/ComPDFKit_Tools-release.aar


BIN
example/android/app/src/main/assets/User guide.pdf


BIN
example/android/app/src/main/assets/extraFonts/Arial Bold.ttf


BIN
example/android/app/libs/ComPDFKit.aar


BIN
example/android/app/src/main/assets/extraFonts/Arial_Italic.ttf


BIN
example/android/app/src/main/assets/extraFonts/arial.ttf


BIN
example/android/app/src/main/assets/extraFonts/arialmt.ttf


+ 2 - 0
example/android/app/src/main/java/com/compdfkit/reactnative/example/MainApplication.kt

@@ -9,7 +9,9 @@ import com.facebook.react.ReactPackage
 import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
 import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
 import com.facebook.react.defaults.DefaultReactNativeHost
+import com.facebook.react.shell.MainReactPackage
 import com.facebook.soloader.SoLoader
+import com.rnfs.RNFSPackage
 
 class MainApplication : Application(), ReactApplication {
 

+ 551 - 0
example/android/app/src/main/res/values-fr/strings.xml

@@ -0,0 +1,551 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+  <string name="tools_document_info">Informations du document</string>
+  <string name="tools_view_setting">View Setting</string>
+  <string name="tools_share">Share</string>
+  <string name="tools_open_document">Open…</string>
+  <string name="tools_flattened">Save as Flattened PDF</string>
+
+  <string name="tools_display_mode">Display Mode</string>
+  <string name="tools_scroll">Scroll</string>
+  <string name="tools_vertical_scrolling">Vertical Scrolling</string>
+  <string name="tools_horizontal_scrolling">Horizontal Scrolling</string>
+  <string name="tools_single_page">Single Page</string>
+  <string name="tools_two_page">Two Page</string>
+  <string name="tools_book_mode">Cover Mode</string>
+  <string name="tools_continuous_scroll">Continuous Scrolling</string>
+  <string name="tools_crop">Crop</string>
+  <string name="tools_themes">Themes</string>
+  <string name="tools_light_mode">Light</string>
+  <string name="tools_dark_mode">Dark</string>
+  <string name="tools_sepia_mode">Sepia</string>
+  <string name="tools_reseda_mode">Reseda</string>
+
+  <string name="tools_reader_pdf_info_abstract">Abstract</string>
+  <string name="tools_reader_pdf_info_fileName">File Name:</string>
+  <string name="tools_reader_pdf_info_size">File Size:</string>
+  <string name="tools_reader_pdf_info_title">Title:</string>
+  <string name="tools_reader_pdf_info_author">Author:</string>
+  <string name="tools_reader_pdf_info_subject">Subject:</string>
+  <string name="tools_reader_pdf_info_keywords">Keywords:</string>
+  <string name="tools_reader_pdf_info_createInfo">Create Information</string>
+  <string name="tools_reader_pdf_info_version">Version:</string>
+  <string name="tools_reader_pdf_info_pages">Pages:</string>
+  <string name="tools_reader_pdf_info_creator">Creator:</string>
+  <string name="tools_reader_pdf_info_creationDate">Creation Date:</string>
+  <string name="tools_reader_pdf_info_modification">Modification Date:</string>
+  <string name="tools_reader_pdf_info_accessPer">Access Permissions</string>
+  <string name="tools_reader_pdf_info_allowPrint">Printing:</string>
+  <string name="tools_reader_pdf_info_allowCopy">Content Copying:</string>
+  <string name="tools_reader_pdf_info_allows_document_changes">Document Change:</string>
+  <string name="tools_reader_pdf_info_allows_document_assembly">Document Assembly:</string>
+  <string name="tools_reader_pdf_info_allows_document_commenting">Commenting:</string>
+  <string name="tools_reader_pdf_info_allows_document_form_field_entry">Filling of Form Field:</string>
+  <string name="tools_allowed">Allowed</string>
+  <string name="tools_not_allowed">Not Allowed</string>
+
+  <string name="tools_thumbnails">Thumbnails</string>
+  <string name="tools_outlines">Outlines</string>
+  <string name="tools_no_outlines">No Outlines</string>
+  <string name="tools_bookmarks">Bookmarks</string>
+  <string name="tools_edit_bookmark_title">Edit Bookmark</string>
+  <string name="tools_no_bookmarks">No Bookmarks</string>
+  <string name="tools_add_bookmarks">Add Bookmarks</string>
+  <string name="tools_has_bookmark">You\'ve bookmarked about this</string>
+  <string name="tools_bookmark_et_hint">Bookmark Title</string>
+  <string name="tools_page">Page</string>
+  <string name="tools_edit">Edit</string>
+  <string name="tools_delete">Delete</string>
+  <string name="tools_create">Create</string>
+
+  <string name="tools_enter_a_page_number">Enter a page number</string>
+  <string name="tools_okay">OK</string>
+  <string name="tools_cancel">Cancel</string>
+
+  <string name="tools_search_hint">Search</string>
+  <string name="tools_sorry_no_contents">No Results</string>
+  <string name="tools_result">Results</string>
+  <string name="tools_search_result_found">%d Results</string>
+
+  <string name="tools_please_enter_the_password_below">Please Enter the Password Below.</string>
+  <string name="tools_please_enter_the_password">Please Enter The Password</string>
+  <string name="tools_password">Password</string>
+  <string name="tools_invalid_password">Invalid Password</string>
+  <string name="tools_unlock">Unlock</string>
+
+  <string name="tools_pdf_mode_title">Tools</string>
+  <string name="tools_pdf_viewer_mode">Viewer</string>
+  <string name="tools_pdf_annotation_mode">Annotations</string>
+  <string name="tools_no_annotation">No Annotations</string>
+  <string name="tools_pdf_edit_mode">Content Editor</string>
+  <string name="tools_form_mode">Forms</string>
+  <string name="tools_page_edit_mode">Document Editor</string>
+
+  <string name="tools_save_title">Save</string>
+  <string name="tools_save_message">Do you want to save the modifications?</string>
+
+  <string name="tools_annotations">Annotations</string>
+
+  <string name="tools_copy">Copy</string>
+  <string name="tools_annot_highlight">Highlight</string>
+  <string name="tools_annot_underline">Underline</string>
+  <string name="tools_context_menu_strikethrough">Strikethrough</string>
+  <string name="tools_annot_squiggly">Squiggly</string>
+  <string name="tools_annot_strikeout">StrikeOut</string>
+  <string name="tools_paste">Paste</string>
+  <string name="tools_annot_note">Note</string>
+  <string name="tools_context_menu_text">Text Box</string>
+  <string name="tools_annot_stamp">Stamp</string>
+  <string name="tools_image">Image</string>
+  <string name="tools_context_menu_properties">Properties</string>
+  <string name="tools_context_menu_sign_here">Sign Here</string>
+  <string name="tools_record">Record</string>
+  <string name="tools_play">Play</string>
+
+  <string name="tools_colors">Colors</string>
+  <string name="tools_color">Color</string>
+  <string name="tools_opacity">Opacity</string>
+  <string name="tools_thickness">Line Width</string>
+  <string name="tools_annot_ink">Ink</string>
+  <string name="tools_save">Save</string>
+  <string name="tools_clean">Clear</string>
+
+  <string name="tools_annot_rectangle">Rectangle</string>
+  <string name="tools_annot_circle">Circle</string>
+  <string name="tools_annot_line">Line</string>
+  <string name="tools_annot_arrow">Arrow</string>
+  <string name="tools_line_color">Line Color</string>
+  <string name="tools_fill_color">Fill Color</string>
+  <string name="tools_text_color">Font Color</string>
+  <string name="tools_dashed_setting">Line and Border Style</string>
+  <string name="tools_dashed_spacing">Dash Spacing</string>
+
+  <string name="tools_annot_start_line_style">Start</string>
+  <string name="tools_annot_tail_line_style">End</string>
+
+  <string name="tools_annot_freetext">Text Box</string>
+  <string name="tools_annot_font">Font</string>
+  <string name="tools_annot_font_italic"><i>I</i></string>
+  <string name="tools_annot_font_bold"><b>B</b></string>
+  <string name="tools_annot_align_type">Alignment</string>
+  <string name="tools_annot_font_size">Font Size</string>
+
+  <string name="tools_annot_signature">Signature</string>
+  <string name="tools_annot_no_signature">No Signatures</string>
+  <string name="tools_enter_your_signature">Enter your signature</string>
+  <string name="tools_annot_new_signature">New Signature</string>
+  <string name="tools_warning">Warning</string>
+  <string name="tools_are_you_sure_to_delete">Are you sure to delete?</string>
+  <string name="tools_choose_from_album">Choose from Album</string>
+  <string name="tools_camera">Camera</string>
+
+  <string name="tools_standard_stamp">Standard</string>
+  <string name="tools_annot_add_stamp">Add Stamp</string>
+  <string name="tools_custom_stamp">Custom</string>
+  <string name="tools_text_stamp">Text Stamp</string>
+  <string name="tools_image_stamp">Image Stamp</string>
+  <string name="tools_style">Style:</string>
+  <string name="tools_custom_stamp_text">Text</string>
+  <string name="tools_date_format_sample">Date</string>
+  <string name="tools_time_format_sample">Time</string>
+
+  <string name="tools_link_to">Link to</string>
+  <string name="tools_annot_link">Link</string>
+
+  <string name="tools_url">URL</string>
+  <string name="tools_email">Email</string>
+  <string name="tools_compdf_website" translatable="false">https://www.compdf.com</string>
+  <string name="tools_compdf_email" translatable="false">support@compdf.com</string>
+
+  <string name="tools_annot_please_enter_text">Please enter text</string>
+  <string name="tools_tip">Tip:</string>
+  <string name="tools_please_enter_page">Please enter page number</string>
+  <string name="tools_use_sound_annot">If you need to use voice annotations, you need to grant recording permission</string>
+
+  <string name="tools_context_menu_edit">Edit</string>
+  <string name="tools_context_menu_cut">Cut</string>
+  <string name="tools_context_menu_transparancy">Opacity</string>
+  <string name="tools_context_menu_delete">Delete</string>
+
+  <string name="tools_edit_image_property_title">Image Properties</string>
+  <string name="tools_edit_image_property_rotate">Rotate</string>
+  <string name="tools_edit_image_property_rotate_left">Rotate Left</string>
+  <string name="tools_edit_image_property_rotate_right">Rotate Right</string>
+  <string name="tools_edit_image_property_transform">Flip</string>
+  <string name="tools_edit_image_property_transparency">Opacity</string>
+  <string name="tools_edit_image_property_replace">Replace</string>
+  <string name="tools_edit_image_property_export">Export</string>
+  <string name="tools_edit_image_property_crop">Crop</string>
+
+  <string-array name="tools_edit_image_trancparancy">
+    <item> 0</item>
+    <item> 0.25</item>
+    <item> 0.5</item>
+    <item> 0.75</item>
+    <item> 1</item>
+  </string-array>
+
+  <string-array name="tools_edit_image_trancparancy_value">
+    <item>0</item>
+    <item>0.25</item>
+    <item>0.5</item>
+    <item>0.75</item>
+    <item>1</item>
+  </string-array>
+  <string name="tools_blank_page">Insert a Blank Page</string>
+  <string name="tools_pdf_page">PDF Page</string>
+  <string name="tools_edit_text_property_title">Text Properties</string>
+  <string name="tools_context_menu_add_text">Add Text</string>
+  <string name="tools_context_menu_add_image">Add Images</string>
+  <string name="tools_context_menu_paste">Paste</string>
+  <string name="tools_page_edit_insert_page_blank">Insert blank page</string>
+
+  <string name="tools_context_menu_select">Select</string>
+  <string name="tools_context_menu_select_all">Select All</string>
+  <string name="tools_context_menu_select_paste">Keep Text Only</string>
+  <string name="tools_context_menu_select_paste_with_style">Keep Source Formating Paste</string>
+  <string name="tools_context_menu_image_horizental_mirror">Flip horizontal</string>
+  <string name="tools_context_menu_image_vertical_mirror">Flip vertical</string>
+  <string name="tools_context_menu_image_replace">Replace</string>
+  <string name="tools_context_menu_image_extract">Export</string>
+  <string name="tools_context_menu_image_transparancy">Opacity</string>
+  <string name="tools_context_menu_image_copy">Copy</string>
+  <string name="tools_context_menu_image_cut">Cut</string>
+
+  <string name="tools_context_menu_image_crop_done">Done</string>
+  <string name="tools_context_menu_image_crop_cancel">Cancel</string>
+
+  <string name="tools_context_menu_transparacy_0">0</string>
+  <string name="tools_context_menu_transparacy_25">25%</string>
+  <string name="tools_context_menu_transparacy_50">50%</string>
+  <string name="tools_context_menu_transparacy_75">75%</string>
+  <string name="tools_context_menu_transparacy_100">100%</string>
+
+  <string name="tools_edit_image_property_rotate_tools">Tools</string>
+  <string name="tools_share_to">Share to</string>
+  <string name="tools_sample">Sample</string>
+  <string name="tools_export_success">Export Successfully!</string>
+
+  <!-- Form Start-->
+  <string name="tools_text_field">Text Field</string>
+  <string name="tools_field_name">Name</string>
+  <string name="tools_background_color">Background Color</string>
+  <string name="tools_default_value">Default Value</string>
+  <string name="tools_hide_form">Hide the Field</string>
+  <string name="tools_multi_line">Multi-line</string>
+
+  <string name="tools_preset_to_selected">Button is checked by default</string>
+  <string name="tools_button_style">Button Style</string>
+  <string name="tools_check_box">Check Box</string>
+  <string name="tools_check_color">Checkmark Color</string>
+  <string name="tools_check_box_check">Check</string>
+  <string name="tools_check_box_circle">Circle</string>
+  <string name="tools_check_box_cross">Cross</string>
+  <string name="tools_check_box_diamond">Diamond</string>
+  <string name="tools_check_box_square">Square</string>
+  <string name="tools_check_box_start">Star</string>
+  <string name="tools_check_radio_button">Radio Button</string>
+  <string name="tools_check_list_box">List Box</string>
+  <string name="tools_edit_list_box">Edit List Box</string>
+  <string name="tools_add_items">Add Items</string>
+  <string name="tools_combo_button">Combo Button</string>
+  <string name="tools_edit_combo_box">Edit Combo Button</string>
+  <string name="tools_please_select_option">Please select your option</string>
+  <string name="tools_text_on_button">Item</string>
+  <string name="tools_push_button">Button</string>
+  <string name="tools_options">Options</string>
+  <!-- Form End!!!-->
+
+  <string name="tools_page_edit_toolbar_title">Document Editor</string>
+  <string name="tools_page_edit_toolbar_done">Done</string>
+  <string name="toolsf_page_edit_insert_page_blank">Insert blank page</string>
+  <string name="tools_page_edit_insert_page_pdf">Insert PDF page</string>
+  <string name="tools_page_edit_insert_page_pagesize">Page Size</string>
+  <string name="tools_page_edit_insert_page_pagedirection">Page Direction</string>
+  <string name="tools_page_edit_insert_page_insert_to">Insert To</string>
+  <string name="tools_page_edit_insert_page_home_page">First Page</string>
+  <string name="tools_page_edit_insert_page_last_page">Last Page</string>
+  <string name="tools_page_edit_insert_page_enterpage_tint">Please Enter a Page</string>
+  <string name="tools_page_edit_insert_page_filename">File Name</string>
+  <string name="tools_page_edit_insert_page_range">Page Range</string>
+  <string name="tools_page_edit_insert_page_allpage">All Pages</string>
+  <string name="tools_page_edit_insert_page_oddpage">Odd Pages Only</string>
+  <string name="tools_page_edit_insert_page_evenpage">Even Pages Only</string>
+  <string name="tools_page_edit_insert_page_specifypage">Custom Range</string>
+  <string name="tools_page_edit_insert_page_before">Insert Before Specified Page</string>
+  <string name="tools_page_edit_insert_page_after">Insert After Specified Page</string>
+  <string name="tools_e_g_page">e.g. 1,3-5,10</string>
+  <string-array name="tools_page_edit_pagesize_name">
+    <item>A3 (297 * 420mm)</item>
+    <item>A4 (210 * 297mm)</item>
+    <item>A5 (148 * 210mm)</item>
+  </string-array>
+  <string-array name="tools_page_edit_pagesize_value">
+    <item>842*1190</item>
+    <item>595*842</item>
+    <item>421*595</item>
+  </string-array>
+  <string name="tools_page_edit_select_file_tips">Must select a pdf file first.</string>
+  <string name="tools_page_edit_toolbar_insert">Insert</string>
+  <string name="tools_page_edit_toolbar_replace">Replace</string>
+  <string name="tools_page_edit_toolbar_extract">Extract</string>
+  <string name="tools_page_edit_toolbar_copy">Copy</string>
+  <string name="tools_page_edit_toolbar_rotate">Rotate</string>
+  <string name="tools_page_edit_toolbar_delete">Delete</string>
+  <string name="tools_page_edit_alert_title">Warning</string>
+  <string name="tools_page_edit_alert_content_allpage">Can not delete all pages. Please keep at least one page.</string>
+  <string name="tools_page_edit_alert_content_nopage">No page is selected.</string>
+  <string name="tools_page_edit_extract_fail">Extract Failed</string>
+  <string name="tools_page_edit_extract_ok">Extract Successfully</string>
+  <string name="tools_page_edit_insert_page">Page Error</string>
+  <string name="tools_select_a_file">Select a File</string>
+  <string name="tools_page_choose_skip_input_error">The page range is invalid or out of range. Please enter the valid page.</string>
+  <string name="tools_scan_pdf_annot_warning">The current page is scanned images that do not support adding highlights, underlines, strikeouts, and squiggly lines.</string>
+  <string name="tools_repair_pdf_file_mes">The file can\'t be modified because of an internal error. If you need to edit, please save a copy to other folder.</string>
+
+  <string name="tools_can_not_edit">You have no permission to edit this document.</string>
+  <string name="tools_reader_view_error_no_email">There is no email app found.</string>
+  <string name="tools_reader_view_error_no_browser">There is no browser app found.</string>
+  <string name="tools_reader_view_error_invalid_link">Invalid link address.</string>
+
+  <!--    V2.0.0 Digital Signature-->
+  <string name="tools_digital_signature">Digital Signature</string>
+  <string name="tools_add_a_signature_field">Add a Signature Field</string>
+  <string name="tools_verify_signatures">Verify the Signature</string>
+  <string name="tools_select_a_digital_id">Select a Digital ID</string>
+  <string name="tools_use_a_digital_id_from_a_file">Use A Digital ID from A File</string>
+  <string name="tools_create_a_new_digital_id">Create A New Digital ID</string>
+  <string name="tools_continue">Continue</string>
+  <string name="tools_certificate_file">Certificate File</string>
+  <string name="tools_enter_the_password_of_the_cert_file">Enter the password of the certificate file</string>
+  <string name="tools_customize_the_signature_appearance">Customize the Signature</string>
+  <string name="tools_text_properties">Text Properties</string>
+  <string name="tools_location">Location</string>
+  <string name="tools_reason">Reason</string>
+  <string name="tools_i_am_the_owner_of_the_document">I am the owner of the document</string>
+  <string name="tools_i_am_approving_the_document">I am approving the document</string>
+  <string name="tools_i_have_reviewed_this_document">I have reviewed this document</string>
+  <string name="tools_none">None</string>
+  <string name="tools_include_text">Include Text</string>
+  <string name="tools_distinguishable_name">Distinguishable name</string>
+  <string name="tools_dn">DN</string>
+  <string name="tools_date">Date</string>
+  <string name="tools_logo">Logo</string>
+  <string name="tools_compdfkit_versions">ComPDFKit Version</string>
+  <string name="tools_tab">Tab</string>
+  <string name="tools_create_a_self_signed_digital_id">Create A Self-Signed Digital ID</string>
+  <string name="tools_save_a_self_signed_digital_id">Save the Self-Signed Digital ID to A File</string>
+  <string name="tools_create_certificate_digital_id_desc">Digital IDs that are self-signed by individuals do not provide the assurance that the identifying information is valid. For this reason, they may not be accepted in some cases.</string>
+  <string name="tools_please_enter_your_name">Please enter your name</string>
+  <string name="tools_organization_unit">Organization Unit</string>
+  <string name="tools_enter_the_name_of_the_organization_unit">Enter the name of the organization unit</string>
+  <string name="tools_organization_name">Organization Name</string>
+  <string name="tools_enter_the_name_of_the_organization">Enter the name of the organization</string>
+  <string name="tools_email_address">Email Address</string>
+  <string name="tools_email_address_hint">Please enter your email address</string>
+  <string name="tools_country_region">Country Region</string>
+  <string name="tools_country_region_hint">Please select your country/region</string>
+  <string name="tools_save_to_file">Save to File</string>
+  <string name="tools_certificate_digital_id_save_info">After you create and save this Digital ID, it can be used again. </string>
+  <string name="tools_save_location">Save Location</string>
+  <string name="tools_set_a_password">Set A Password</string>
+  <string name="tools_please_enter_your_password">Please enter your password</string>
+  <string name="tools_confirm_password">Confirm the Password</string>
+  <string name="tools_enter_the_password_again">Enter the password again</string>
+  <string name="tools_confirm_password_error">Password and confirm password does not match</string>
+  <string name="tools_signer">Signer</string>
+  <string name="tools_signing_time">Signing Time</string>
+  <string name="tools_cert_auth_statement">Certification Authority Statement</string>
+  <string name="tools_signer_identity_is_valid">The signer\'s identity is valid.</string>
+  <string name="tools_signer_identity_is_invalid">The signer\'s identity is invalid.</string>
+  <string name="tools_signer_cert_has_expired">The file was signed with a certificate that has expired. If you acquired this file recently, it may not be authentic.</string>
+  <string name="tools_sign_the_sign_is_valid">The signature is valid.</string>
+  <string name="tools_sign_the_sign_is_in_valid">The signature is invalid.</string>
+  <string name="tools_sign_document_has_not_been_modified">The document has not been modified since this signature was applied.</string>
+  <string name="tools_sign_document_has_been_modified">The document has been altered or corrupted since it was signed by the current user.</string>
+
+  <string name="tools_sign_validity_is_unknown_trusted_desc">Signature validity is unknown because it has not been included in your list of trusted certificates and none of its parent certificates are trusted certificates.</string>
+
+
+  <string name="tools_sign_validity_is_unknown">Signature validity is unknown.</string>
+  <string name="tools_sign_at_least_one_signature_is_invalid">At least one signature is invalid.</string>
+
+  <string name="tools_view_all_signatures">View All Signatures</string>
+  <string name="tools_signature_list">Signature List</string>
+  <string name="tools_view_cert">View Certificate</string>
+  <string name="tools_import_digital_desc">Browse a digital ID file. Digital ID cards are password-protected. If you do not know the password, you cannot obtain a digital ID card.</string>
+  <string name="tools_close">Close</string>
+
+  <string name="tools_permission_tips_title">Permissions Required</string>
+  <string name="tools_permission_tips_msg">This app may not work correctly without the requested permissions. Open the app settings screen to modify app permissions</string>
+
+  <string name="tools_certificate_viewer">Certificate Viewer</string>
+  <string name="tools_summary">Summary</string>
+  <string name="tools_issued_to">Issued to</string>
+  <string name="tools_issuer">Issuer</string>
+  <string name="tools_valid_from">Valid from</string>
+  <string name="tools_valid_to">Valid to</string>
+  <string name="tools_intended_usage">Intended Usage</string>
+  <string name="tools_details">Details</string>
+  <string name="tools_version">Version</string>
+  <string name="tools_algorithm">Algorithm</string>
+  <string name="tools_purpose">Use Digital ID for</string>
+  <string name="tools_subject">Subject</string>
+  <string name="tools_serial_number">Serial Number</string>
+  <string name="tools_certificate_policy">Certificate Policy</string>
+  <string name="tools_crl_distribution_point">CRL Distribution Points</string>
+  <string name="tools_issuer_info_access">Issuer Information Access</string>
+  <string name="tools_issuing_auth_key_identifier">Issuer‘s Key Identifier</string>
+  <string name="tools_subject_key_identifier">Subject‘s Key Identifier</string>
+  <string name="tools_basic_constraints">Basic Constraints</string>
+  <string name="tools_key_usage">Key Usage</string>
+  <string name="tools_public_key">Public Key</string>
+  <string name="tools_x_509_data">X.509 data</string>
+  <string name="tools_sha1_digest">SHA1 Digest</string>
+  <string name="tools_md5_digest">MD5 Digest</string>
+  <string name="tools_cert_details">Certificate Details</string>
+  <string name="tools_signed_by">Signed by:</string>
+  <string name="tools_date_">Date:</string>
+  <string name="tools_status">Status:</string>
+  <string name="tools_digital_signature_detail">Digital Signature Details</string>
+  <string name="tools_digital_create_error">Failures</string>
+  <string name="tools_digital_sign_success">Signature successful</string>
+  <string name="tools_digital_sign_failures">Signature failed</string>
+  <string name="tools_cert_is_trusted_to">This Certificate Is Trusted to:</string>
+  <string name="tools_trusted_1">Sign document or data</string>
+  <string name="tools_trusted_2">Certify document</string>
+  <string name="tools_trust">Trust</string>
+  <string name="tools_add_to_trusted_cert">Add to Trusted Certificates</string>
+  <string name="tools_select_folder">Select folder</string>
+  <string name="tools_save_to_this_directory">Save to this directory</string>
+  <string name="tools_digital_signatures">Digital Signatures</string>
+  <string name="tools_data_encryption">Data Encryption</string>
+  <string name="tools_digital_signatures_and_data_encryption">Digital Signatures and Data Encryption</string>
+
+
+  <!--    Security Watermark Start! -->
+  <string name="tools_security">Security</string>
+  <string name="tools_watermark">Watermark</string>
+  <string name="tools_set_password_successfully">Set the Password for the File Successfully!</string>
+  <string name="tools_set_password_failures">Failed to Set Passwords for this Document.</string>
+  <string name="tools_password_remove_success">Password Removed Successfully!</string>
+  <string name="tools_password_remove_fail">Failed to Remove the Password.</string>
+
+  <string name="tools_watermark_removed_success">Watermarks Removed Successfully!</string>
+  <string name="tools_watermark_removed_failed">Failed to Remove the Watermarks.</string>
+  <string name="tools_watermark_add_success">Add Watermarks Successfully!</string>
+  <string name="tools_watermark_add_failed">Failed to Add the Watermarks.</string>
+
+  <string name="tools_type_your_watermark_text_here">Type your watermark text here.</string>
+  <string name="tools_default_watermark_text">Watermark</string>
+  <string name="tools_watermark_settings">Watermark Settings</string>
+  <string name="tools_layout_options">Layout Options</string>
+  <string name="tools_current_page">Current Page</string>
+  <string name="tools_all_page">All Pages</string>
+  <string name="tools_tile">Tile</string>
+  <string name="tools_choose_picture">Choose Picture</string>
+
+  <string name="tools_security_settings">Security Settings</string>
+  <string name="tools_set_password">Set Passwords</string>
+  <string name="tools_password_to_open_the_document">Password to Open the Document</string>
+  <string name="tools_enter_password">Enter the Password</string>
+  <string name="tools_owner_password">Owner Password</string>
+  <string name="tools_enter_password_can_not_be_empty">The password can\'t be empty.</string>
+  <string name="tools_please_enter_owner_password">Please enter the owner\'s password</string>
+  <string name="tools_restrict_document_printing">Restrict document printing</string>
+  <string name="tools_restrict_content_copying">Restrict content copying</string>
+  <string name="tools_encryption_level">Encryption Level</string>
+  <string name="tools_encryption_no_encryption">No Encryption</string>
+  <string name="tools_encryption_rc4" translatable="false">128-bit RC4</string>
+  <string name="tools_encryption_128_aes" translatable="false">128-bit AES</string>
+  <string name="tools_encryption_256_aes" translatable="false">256-bit AES</string>
+  <string name="tools_setting_permission_password">Setting Permission Password</string>
+  <string name="tools_saving_path">Saving Path</string>
+  <string name="tools_enter_owner_pwd_title">Enter Owner\'s Password to Change the Security</string>
+  <string name="tools_password_error">Password Error</string>
+  <string name="tools_text_watermark">Text Watermark</string>
+  <string name="tools_save_success">Saved successfully</string>
+  <string name="tools_password_must_be_different">Open password and permission password must be different</string>
+
+  <!--    Security Mode End-->
+  <string name="tools_signature_date_pattern">dd MMMM yyyy HH:mm:ss</string>
+  <string name="tools_select_sign_type">Select Signature Type</string>
+  <string name="tools_sign_with_electronic_signatures">Sign with Electronic Signatures</string>
+  <string name="tools_sign_with_digital_signatures">Sign with Digital Signatures</string>
+  <string name="tools_watermark_suffix">_Watermark.pdf</string>
+  <string name="tools_remove_watermark_suffix">_Watermark_Removed.pdf</string>
+  <string name="tools_document_encryption_suffix">_Encrypted.pdf</string>
+  <string name="tools_document_encryption_remove_suffix">_Password_Removed.pdf</string>
+  <string name="tools_signatures">Signatures</string>
+  <string name="tools_name">Name</string>
+  <string name="tools_enter_permission_password">Enter Permission Passwords</string>
+
+  <!--    v1.12.0 -->
+  <string name="tools_save_failed">Save failed</string>
+  <string name="tools_replace">Replace</string>
+  <string name="tools_find">Find</string>
+  <string name="tools_replace_with">Replace with</string>
+  <string name="tools_replace_all">Replace All</string>
+  <string name="tools_ignore_case">Ignore Case</string>
+  <string name="tools_whole_words_only">Whole Words only</string>
+  <string name="tools_setting">Setting</string>
+  <string name="tools_effective_immediately_after_setting">Effective immediately after setting</string>
+  <string name="tools_loading">Loading…</string>
+  <string name="tools_flattened_suffix">_Flattened.pdf</string>
+
+  <!--    v2.0.0 -->
+  <string name="tools_font_style_normal">Normal</string>
+  <string name="tools_font_style_bold">Bold</string>
+  <string name="tools_font_style_italic">Italic</string>
+  <string name="tools_font_style_bold_italic">Bold&amp;Italic</string>
+
+
+  <!--    v2.1.0-->
+  <string name="tools_import_annotations">Import Annotations</string>
+  <string name="tools_export_annotations">Export Annotations</string>
+  <string name="tools_delete_all_annotations">Delete all annotations</string>
+  <string name="tools_delete_all_replies">Delete all replies</string>
+  <string name="tools_import_success">Import successful</string>
+  <string name="tools_please_select_xfdf_format_file">Please select xfdf format file</string>
+
+  <string name="tools_marked">Marked</string>
+  <string name="tools_unmarked">UnMarked</string>
+  <string name="tools_accepted">Accepted</string>
+  <string name="tools_rejected">Rejected</string>
+  <string name="tools_cancelled">Cancelled</string>
+  <string name="tools_completed">Completed</string>
+
+  <string name="tools_add_a_new_reply">Add a new Reply</string>
+  <string name="tools_add_new_reply">Add New Reply</string>
+  <string name="tools_edit_reply">Edit Reply</string>
+  <string name="tools_view_replies">View replies</string>
+  <string name="tools_delete_annotation">Delete annotation</string>
+  <string name="tools_reply_or_add_thoughts">Reply or add thoughts</string>
+  <string name="tools_replies_of_annotation">Replies of Annotation</string>
+  <string name="tools_total">Total: %d</string>
+  <string name="tools_reply">Reply</string>
+  <string name="tools_view_reply">View Reply</string>
+
+
+  <string name="tools_snap">Snap</string>
+
+  <string name="tools_exit">Exit</string>
+
+  <!--    v2.2.0 -->
+  <string name="tools_style_title">Style</string>
+  <string name="tools_line_type">Line and Border Style</string>
+  <string name="tools_compress">Compress</string>
+  <string name="tools_selected_file">Selected File</string>
+  <string name="tools_compress_quality">Compress Quality</string>
+  <string name="tools_change">Change</string>
+  <string name="tools_low_quality">Low Quality</string>
+  <string name="tools_standard_quality">Standard Quality</string>
+  <string name="tools_high_quality">High Quality</string>
+  <string name="tools_custom_quality">Custom</string>
+  <string name="tools_please_enter_percentage">Please enter percentage</string>
+  <string name="tools_save_path">Saving Path</string>
+  <string name="tools_compressed_successfully">Compressed successfully!</string>
+  <string name="compressing_">Compressing&#8230;</string>
+
+
+</resources>

+ 1 - 0
example/android/app/src/main/res/values/styles.xml

@@ -8,6 +8,7 @@
       <item name="isLightTheme">true</item>
       <item name="android:isLightTheme" tools:targetApi="q">true</item>
       <item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
+
     </style>
 
 </resources>

+ 16 - 6
example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj

@@ -15,6 +15,7 @@
 		7699B88040F8A987B510C191 /* libPods-CompdfkitPdfExample-CompdfkitPdfExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-CompdfkitPdfExample-CompdfkitPdfExampleTests.a */; };
 		81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
 		C9FCF5E32C475A9100CEFDBB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C9FCF5E12C475A9100CEFDBB /* Localizable.strings */; };
+		EC4EF3572D36664A00EEA52B /* extraFonts in Resources */ = {isa = PBXBuildFile; fileRef = EC4EF3562D36664A00EEA52B /* extraFonts */; };
 		ECF47E9D2BDF6D3300E7456A /* PDF_Document.pdf in Resources */ = {isa = PBXBuildFile; fileRef = ECF47E9C2BDF6D3300E7456A /* PDF_Document.pdf */; };
 /* End PBXBuildFile section */
 
@@ -48,6 +49,7 @@
 		89C6BE57DB24E9ADA2F236DE /* Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests.release.xcconfig"; path = "Target Support Files/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests/Pods-CompdfkitPdfExample-CompdfkitPdfExampleTests.release.xcconfig"; sourceTree = "<group>"; };
 		C9FCF5E22C475A9100CEFDBB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
 		C9FCF5E42C475AB600CEFDBB /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
+		EC4EF3562D36664A00EEA52B /* extraFonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = extraFonts; path = ../android/app/src/main/assets/extraFonts; sourceTree = "<group>"; };
 		ECF47E9C2BDF6D3300E7456A /* PDF_Document.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = PDF_Document.pdf; sourceTree = "<group>"; };
 		ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
 /* End PBXFileReference section */
@@ -124,6 +126,7 @@
 		83CBB9F61A601CBA00E9B192 = {
 			isa = PBXGroup;
 			children = (
+				EC4EF3562D36664A00EEA52B /* extraFonts */,
 				ECF47E9C2BDF6D3300E7456A /* PDF_Document.pdf */,
 				13B07FAE1A68108700A75B9A /* CompdfkitPdfExample */,
 				832341AE1AAA6A7D00B99B32 /* Libraries */,
@@ -252,6 +255,7 @@
 			buildActionMask = 2147483647;
 			files = (
 				81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
+				EC4EF3572D36664A00EEA52B /* extraFonts in Resources */,
 				C9FCF5E32C475A9100CEFDBB /* Localizable.strings in Resources */,
 				13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
 				ECF47E9D2BDF6D3300E7456A /* PDF_Document.pdf in Resources */,
@@ -490,8 +494,10 @@
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
+				CODE_SIGN_IDENTITY = "Apple Development";
+				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = 59AC9PMNH2;
+				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				ENABLE_BITCODE = NO;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				INFOPLIST_FILE = CompdfkitPdfExample/Info.plist;
@@ -500,15 +506,16 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 2.2.0;
+				MARKETING_VERSION = 2.2.1;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
+				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.flutter.example;
 				PRODUCT_NAME = ComPDFKit_RN;
+				PROVISIONING_PROFILE_SPECIFIER = "";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
 				SUPPORTS_MACCATALYST = NO;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -525,8 +532,10 @@
 				ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
+				CODE_SIGN_IDENTITY = "Apple Development";
+				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = 59AC9PMNH2;
+				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				ENABLE_USER_SCRIPT_SANDBOXING = NO;
 				INFOPLIST_FILE = CompdfkitPdfExample/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 13.4;
@@ -534,15 +543,16 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 2.2.0;
+				MARKETING_VERSION = 2.2.1;
 				ONLY_ACTIVE_ARCH = YES;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
+				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.flutter.example;
 				PRODUCT_NAME = ComPDFKit_RN;
+				PROVISIONING_PROFILE_SPECIFIER = "";
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
 				SUPPORTS_MACCATALYST = NO;
 				SWIFT_VERSION = 5.0;

+ 1 - 1
example/ios/CompdfkitPdfExample/AppDelegate.h

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

+ 1 - 1
example/ios/CompdfkitPdfExample/AppDelegate.mm

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

+ 1 - 1
example/ios/CompdfkitPdfExample/main.m

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

Fichier diff supprimé car celui-ci est trop grand
+ 8280 - 0
example/package-lock.json


+ 3 - 2
example/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@compdfkit_pdf_sdk/react_native-example",
-  "version": "2.2.0",
-  "versionCode": "12",
+  "version": "2.2.1",
+  "versionCode": "13",
   "private": true,
   "scripts": {
     "android": "react-native run-android",
@@ -16,6 +16,7 @@
     "react": "18.2.0",
     "react-native": "0.74.0",
     "react-native-document-picker": "^9.1.0",
+    "react-native-fs": "^2.20.0",
     "react-native-popup-menu": "^0.16.1",
     "react-native-safe-area-context": "^4.10.7",
     "react-native-screens": "^3.32.0",

+ 48 - 52
example/src/CPDFReaderViewControllerExample.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -8,13 +8,12 @@
  */
 
 import React, { useState, useEffect, useRef } from 'react';
-import { Image, Platform, StyleSheet, Text, View, Modal, TouchableWithoutFeedback, ScrollView} from 'react-native';
-import PDFReaderContext, { CPDFReaderView, ComPDFKit, CPDFToolbarAction, CPDFThemes } from '@compdfkit_pdf_sdk/react_native';
+import { Image, Platform, StyleSheet, Text, View, ScrollView } from 'react-native';
+import PDFReaderContext, { CPDFReaderView, ComPDFKit, CPDFToolbarAction } from '@compdfkit_pdf_sdk/react_native';
 import { useNavigation, useRoute, RouteProp } from '@react-navigation/native';
 import { HeaderBackButton } from '@react-navigation/elements';
 import { MenuProvider, Menu, MenuTrigger, MenuOptions, MenuOption } from 'react-native-popup-menu';
 import { SafeAreaView } from 'react-native-safe-area-context';
-import CPDFReaderViewExampleScreen from './CPDFReaderViewExample';
 import { CPDFDisplaySettingsScreen } from './screens/CPDFDisplaySettingsScreen';
 import { CPDFPreviewModeListScreen } from './screens/CPDFPreviewModeListScreen';
 
@@ -98,10 +97,10 @@ const CPDFReaderViewControllerExampleScreen = () => {
     const handleMenuItemPress = async (action: string) => {
         switch (action) {
             case 'openDocument':
-                // const pdfFile = await ComPDFKit.pickFile();
-                // if(pdfFile){
-                    await pdfReaderRef.current?._pdfDocument.open('file:///android_asset/User guide.pdf');
-                // }
+                const pdfFile = await ComPDFKit.pickFile();
+                if (pdfFile) {
+                    await pdfReaderRef.current?._pdfDocument.open(pdfFile);
+                }
                 break;
             case 'save':
                 handleSave();
@@ -120,22 +119,22 @@ const CPDFReaderViewControllerExampleScreen = () => {
                 await pdfReaderRef.current?.showThumbnailView(false);
                 break;
             case 'showBotaView':
-                await pdfReaderRef.current?.showBotaView();    
+                await pdfReaderRef.current?.showBotaView();
                 break;
             case 'showAddWatermarkView':
-                await pdfReaderRef.current?.showAddWatermarkView();    
+                await pdfReaderRef.current?.showAddWatermarkView();
                 break;
             case 'showSecurityView':
-                await pdfReaderRef.current?.showSecurityView();    
-                break;    
+                await pdfReaderRef.current?.showSecurityView();
+                break;
             case 'showDisplaySettingView':
-                await pdfReaderRef.current?.showDisplaySettingView();    
+                await pdfReaderRef.current?.showDisplaySettingView();
                 break;
             case 'enterSnipMode':
-                await pdfReaderRef.current?.enterSnipMode();    
+                await pdfReaderRef.current?.enterSnipMode();
                 break;
             case 'exitSnipMode':
-                await pdfReaderRef.current?.exitSnipMode();    
+                await pdfReaderRef.current?.exitSnipMode();
                 break;
             case 'setDisplayPageIndex':
                 await pdfReaderRef.current?.setDisplayPageIndex(1);
@@ -154,7 +153,7 @@ const CPDFReaderViewControllerExampleScreen = () => {
                 await pdfReaderRef.current?.setScale(2.3);
                 var scale = await pdfReaderRef.current?.getScale();
                 console.log('ComPDFKitRN getScale:', scale);
-                break; 
+                break;
             case 'setPageSpacing':
                 await pdfReaderRef.current?.setPageSpacing(50);
                 break;
@@ -185,11 +184,11 @@ const CPDFReaderViewControllerExampleScreen = () => {
 
                     <MenuOptions customStyles={{ optionsWrapper: styles.menuOptionsWrapper }}>
                         <ScrollView>
-                        {menuOptions.map((option, index) => (
-                            <MenuOption key={index} onSelect={() => handleMenuItemPress(option)}>
-                                <Text style={styles.menuOption}>{option}</Text>
-                            </MenuOption>
-                        ))}
+                            {menuOptions.map((option, index) => (
+                                <MenuOption key={index} onSelect={() => handleMenuItemPress(option)}>
+                                    <Text style={styles.menuOption}>{option}</Text>
+                                </MenuOption>
+                            ))}
                         </ScrollView>
                     </MenuOptions>
                 </Menu>
@@ -207,36 +206,33 @@ const CPDFReaderViewControllerExampleScreen = () => {
 
     return (
         <PDFReaderContext.Provider value={pdfReaderRef.current}>
-        <MenuProvider>
-            <SafeAreaView style={{ flex: 1 }}>
-                <View style={{ flex: 1 }}>
-                    {renderToolbar()}
-                    <CPDFReaderView
-                        ref={pdfReaderRef}
-                        document={samplePDF}
-                        onPageChanged={onPageChanged}
-                        saveDocument={saveDocument}
-                        configuration={ComPDFKit.getDefaultConfig({
-                            toolbarConfig: {
-                                iosLeftBarAvailableActions: [
-                                    CPDFToolbarAction.THUMBNAIL
-                                ]
-                            },
-                            readerViewConfig:{
-                                formFieldHighlight:false
-                            }
-                        })} />
-                    <CPDFDisplaySettingsScreen
-                        visible={displaySettingModalVisible}
-                        onClose={() => setDisplaySettingModalVisible(false)}
-                    />
-                    <CPDFPreviewModeListScreen
-                        visible={previewModeModalVisible}
-                        onClose={() => setPreviewModeModalVisible(false)}
-                    />
-                </View>
-            </SafeAreaView>
-        </MenuProvider>
+            <MenuProvider>
+                <SafeAreaView style={{ flex: 1 }}>
+                    <View style={{ flex: 1 }}>
+                        {renderToolbar()}
+                        <CPDFReaderView
+                            ref={pdfReaderRef}
+                            document={samplePDF}
+                            onPageChanged={onPageChanged}
+                            saveDocument={saveDocument}
+                            configuration={ComPDFKit.getDefaultConfig({
+                                toolbarConfig: {
+                                    iosLeftBarAvailableActions: [
+                                        CPDFToolbarAction.THUMBNAIL
+                                    ]
+                                }
+                            })} />
+                        <CPDFDisplaySettingsScreen
+                            visible={displaySettingModalVisible}
+                            onClose={() => setDisplaySettingModalVisible(false)}
+                        />
+                        <CPDFPreviewModeListScreen
+                            visible={previewModeModalVisible}
+                            onClose={() => setPreviewModeModalVisible(false)}
+                        />
+                    </View>
+                </SafeAreaView>
+            </MenuProvider>
         </PDFReaderContext.Provider>
     );
 };
@@ -266,7 +262,7 @@ const styles = StyleSheet.create({
         color: 'black',
     },
     menuOptionsWrapper: {
-        maxHeight: 500, 
+        maxHeight: 500,
     },
 });
 

+ 2 - 2
example/src/CPDFReaderViewExample.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -13,7 +13,7 @@ import { CPDFReaderView, ComPDFKit, CPDFToolbarAction } from '@compdfkit_pdf_sdk
 import { useNavigation, useRoute, RouteProp } from '@react-navigation/native';
 
 type RootStackParamList = {
-    CPDFReaderViewExample: { document?: string }; 
+    CPDFReaderViewExample: { document?: string };
 };
 
 type CPDFReaderViewExampleScreenRouteProp = RouteProp<

+ 1 - 1
example/src/examples.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.

+ 3 - 2
example/src/screens/SettingScreen.tsx

@@ -55,7 +55,7 @@ class SettingScreen extends Component {
                     <View>{this.linkItem('support@compdf.com', 'mailto:support@compdf.com?subject=Technical Support')}</View>
                 </View>
                 <View style={styles.copyRightContainer}>
-                    <Text style={styles.copyRightText}>© 2014-2024 PDF Technologies, Inc. All Rights Reserved.</Text>
+                    <Text style={styles.copyRightText}>© 2014-2025 PDF Technologies, Inc. All Rights Reserved.</Text>
                     <View style={{ flexDirection: 'row' }}>
                         <TouchableOpacity onPress={() => {
                             Linking.openURL('https://www.compdf.com/privacy-policy')
@@ -128,7 +128,8 @@ const styles = StyleSheet.create({
     },
     copyRightText: {
         color: '#42464D',
-        fontSize: 11
+        fontSize: 11,
+        textAlign: 'center'
     },
     copyRightText_1: {
         fontSize: 11,

+ 8 - 1
ios/ComPDFKitRN.mm

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.
@@ -36,6 +36,13 @@ RCT_EXTERN_METHOD(removeSignFileList:(RCTPromiseResolveBlock)resolve
 RCT_EXTERN_METHOD(pickFile:(RCTPromiseResolveBlock)resolve
                   withRejecter:(RCTPromiseRejectBlock)reject)
 
+RCT_EXTERN_METHOD(setImportFontDir:(NSString *) fontDir
+                  addSysFont:(BOOL) addSysFont
+                  withResolver:(RCTPromiseResolveBlock)resolve
+                  withRejecter:(RCTPromiseRejectBlock)reject)
+
+
+
 + (BOOL)requiresMainQueueSetup
 {
   return NO;

+ 35 - 16
ios/ComPDFKitRN.swift

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.
@@ -17,9 +17,9 @@ import ComPDFKit_Tools
  */
 @objc(ComPDFKit)
 class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegate{
-    
+
     private var pdfViewController: CPDFViewController?
-    
+
     private var _resolve: RCTPromiseResolveBlock?
 
     /**
@@ -136,10 +136,10 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
         DispatchQueue.main.async {
             var documentPath = document.path
             var success = false
-            
+
             let homeDiectory = NSHomeDirectory()
             let bundlePath = Bundle.main.bundlePath
-                
+
             if (documentPath.hasPrefix(homeDiectory) || documentPath.hasPrefix(bundlePath)) {
                 let fileManager = FileManager.default
                 let samplesFilePath = NSHomeDirectory().appending("/Documents/Files")
@@ -151,12 +151,12 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
                 }
 
                 try? FileManager.default.copyItem(atPath: document.path, toPath: docsFilePath)
-                
+
                 documentPath = docsFilePath
             } else {
                 success = document.startAccessingSecurityScopedResource()
             }
-            
+
             let rootNav = ComPDFKit.presentedViewController()
 
             let jsonDataParse = CPDFJSONDataParse(String: configurationJson)
@@ -167,14 +167,14 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
             let nav = CNavigationController(rootViewController: self.pdfViewController!)
             nav.modalPresentationStyle = .fullScreen
             rootNav?.present(nav, animated: true)
-            
+
             if success {
                 document.stopAccessingSecurityScopedResource()
             }
         }
     }
-    
-    
+
+
     @objc(removeSignFileList:withRejecter:)
     func removeSignFileList(resolve: @escaping RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -182,7 +182,7 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
             resolve(true)
         }
     }
-    
+
     @objc(pickFile:withRejecter:)
     func pickFile(resolve: @escaping RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -193,7 +193,26 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
             self._resolve = resolve
         }
     }
-
+    
+    @objc(setImportFontDir:addSysFont:withResolver: withRejecter:)
+    func setImportFontDir(fontDir : String, addSysFont : Bool, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
+        let fileManager = FileManager.default
+        let documentDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first!
+        let destinationPath = documentDirectory.appendingPathComponent("Font")
+        
+        do {
+            if fileManager.fileExists(atPath: destinationPath.path) {
+                try fileManager.removeItem(at: destinationPath)
+            }
+            
+            try fileManager.copyItem(atPath: fontDir, toPath: destinationPath.path)
+            CPDFFont.setImportDir(destinationPath.path, isContainSysFont: addSysFont)
+        } catch {
+            print("Error copying Font directory: \(error)")
+        }
+        resolve(true)
+    }
+    
     //MARK: - ViewController Method
 
     /**
@@ -202,9 +221,9 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
     func PDFViewBaseControllerDissmiss(_ baseControllerDelete: CPDFViewBaseController) {
       baseControllerDelete.dismiss(animated: true)
     }
-    
+
     func PDFViewBaseController(_ baseController: CPDFViewBaseController, SaveState success: Bool) {
-        
+
     }
 
     /**
@@ -248,9 +267,9 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete, UIDocumentPickerDelegat
 
       return currentViewController
     }
-    
+
     //MARK: - UIDocumentPickerDelegate
-    
+
     func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
         let fileUrlAuthozied = urls.first?.startAccessingSecurityScopedResource() ?? false
         if fileUrlAuthozied {

+ 1 - 1
ios/CompdfkitPdf-Bridging-Header.h

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

+ 75 - 75
ios/RCTCPDFView.swift

@@ -2,7 +2,7 @@
 //  RCTCPDFView.swift
 //  react-native-compdfkit-pdf
 //
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.
@@ -21,73 +21,73 @@ protocol RCTCPDFViewDelegate: AnyObject {
 }
 
 class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
-    
+
     weak var delegate: RCTCPDFViewDelegate?
-    
+
     public var pdfViewController : CPDFViewController?
-    
+
     private var navigationController : CNavigationController?
-    
+
     init() {
         super.init(frame: CGRect(x: 0, y: 0, width: 500, height: 400))
     }
-    
+
     required init?(coder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
-    
+
     // MARK: - Private Methods
-    
+
     private func createCPDFView() {
         var documentPath = document.path
         var success = false
-        
+
         let homeDiectory = NSHomeDirectory()
         let bundlePath = Bundle.main.bundlePath
-        
+
         if (documentPath.hasPrefix(homeDiectory) || documentPath.hasPrefix(bundlePath)) {
             let fileManager = FileManager.default
             let samplesFilePath = NSHomeDirectory().appending("/Documents/Files")
             let fileName = document.lastPathComponent
             let docsFilePath = samplesFilePath + "/" + fileName
-            
+
             if !fileManager.fileExists(atPath: samplesFilePath) {
                 try? FileManager.default.createDirectory(atPath: samplesFilePath, withIntermediateDirectories: true, attributes: nil)
             }
-            
+
             try? FileManager.default.copyItem(atPath: document.path, toPath: docsFilePath)
-            
+
             documentPath = docsFilePath
         } else {
             success = document.startAccessingSecurityScopedResource()
         }
-        
+
         let jsonData = CPDFJSONDataParse(String: configuration)
         let configurations = jsonData.configuration ?? CPDFConfiguration()
-        
+
         pdfViewController = CPDFViewController(filePath: documentPath, password: password, configuration: configurations)
         pdfViewController?.delegate = self
         navigationController = CNavigationController(rootViewController: pdfViewController!)
         navigationController?.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
         navigationController?.view.frame = self.frame
-        
+
         navigationController?.setViewControllers([pdfViewController!], animated: true)
-        
+
         addSubview(navigationController?.view ?? UIView())
-        
+
         self.delegate?.cpdfViewAttached(self)
-        
+
         if success {
             document.stopAccessingSecurityScopedResource()
         }
     }
-    
+
     // MARK: - Public Methods
-    
+
     func saveDocument(completionHandler: @escaping (Bool) -> Void) {
         if (self.pdfViewController?.pdfListView?.isEditing() == true && self.pdfViewController?.pdfListView?.isEdited() == true) {
             self.pdfViewController?.pdfListView?.commitEditing()
-            
+
             if self.pdfViewController?.pdfListView?.document.isModified() == true {
                 let document = self.pdfViewController?.pdfListView?.document
                 let success = document?.write(to: document?.documentURL ?? URL(fileURLWithPath: ""), isSaveFontSubset: true) ?? false
@@ -95,7 +95,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             } else {
                 completionHandler(true)
             }
-            
+
         } else {
             if self.pdfViewController?.pdfListView?.document.isModified() == true {
                 let document = self.pdfViewController?.pdfListView?.document
@@ -106,14 +106,14 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             }
         }
     }
-    
+
     func setMargins(left : Int, top : Int, right : Int, bottom : Int) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.pageBreakMargins = .init(top: CGFloat(top), left: CGFloat(left), bottom: CGFloat(bottom), right: CGFloat(right))
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func removeAllAnnotations(completionHandler: @escaping (Bool) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let pageCount = pdfListView.document?.pageCount ?? 0
@@ -128,22 +128,22 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func importAnnotations(xfdfFile : URL, completionHandler: @escaping (Bool) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
-            
+
             let documentFolder = NSHomeDirectory().appending("/Documents/Files")
             if !FileManager.default.fileExists(atPath: documentFolder) {
                 try? FileManager.default.createDirectory(at: URL(fileURLWithPath: documentFolder), withIntermediateDirectories: true, attributes: nil)
             }
-            
+
             let documentPath = documentFolder + "/\(xfdfFile.lastPathComponent)"
             try? FileManager.default.copyItem(atPath: xfdfFile.path, toPath: documentPath)
-            
+
             if !FileManager.default.fileExists(atPath: documentPath) {
                 print("fail")
             }
-            
+
             let success = pdfListView.document?.importAnnotation(fromXFDFPath: documentPath) ?? false
             if success {
                 self.pdfViewController?.pdfListView?.setNeedsDisplayForVisiblePages()
@@ -153,14 +153,14 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func exportAnnotations(completionHandler: @escaping (String) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let fileNameWithExtension = pdfListView.document?.documentURL.lastPathComponent ?? ""
             let fileName = (fileNameWithExtension as NSString).deletingPathExtension
             let documentFolder = NSHomeDirectory().appending("/Documents/\(fileName)_xfdf.xfdf")
             let succes = pdfListView.document?.exportAnnotation(toXFDFPath: documentFolder) ?? false
-            
+
             if succes {
                 completionHandler(documentFolder)
             } else {
@@ -170,13 +170,13 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler("")
         }
     }
-    
+
     func setDisplayPageIndex(pageIndex : Int) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.go(toPageIndex: pageIndex, animated: false)
         }
     }
-    
+
     func getCurrentPageIndex(completionHandler: @escaping (Int) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.currentPageIndex)
@@ -184,7 +184,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(0)
         }
     }
-    
+
     func hasChange(completionHandler: @escaping (Bool) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let success = pdfListView.document?.isModified() ?? false
@@ -193,13 +193,13 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func setScale(scale : NSNumber){
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.setScaleFactor(CGFloat(truncating: scale), animated: true)
         }
     }
-    
+
     func getScale(completionHandler: @escaping (NSNumber) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(NSNumber(value: pdfListView.scaleFactor))
@@ -207,7 +207,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(1.0)
         }
     }
-    
+
     func setReadBackgroundColor(displayMode : NSString) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             switch displayMode {
@@ -225,7 +225,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func getReadbackgroundColor(completionHandler: @escaping (NSString) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let dispalyMode = pdfListView.displayMode
@@ -247,36 +247,36 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler("#FFFFFF")
         }
     }
-    
+
     func setFormFieldHighlight(formFieldHighlight : Bool){
         if let pdfListView = self.pdfViewController?.pdfListView {
             CPDFKitConfig.sharedInstance().setEnableFormFieldHighlight(formFieldHighlight)
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isFormFieldHighlight(completionHandler: @escaping (Bool) -> Void){
         completionHandler(CPDFKitConfig.sharedInstance().enableFormFieldHighlight())
     }
-    
+
     func setLinkHighlight(linkHighlight : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             CPDFKitConfig.sharedInstance().setEnableLinkFieldHighlight(linkHighlight)
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isLinkHighlight(completionHandler: @escaping (Bool) -> Void){
         completionHandler(CPDFKitConfig.sharedInstance().enableLinkFieldHighlight())
     }
-    
+
     func setVerticalMode(isVerticalMode : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.displayDirection = isVerticalMode ? .vertical : .horizontal
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isVerticalMode(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.displayDirection == .vertical)
@@ -284,14 +284,14 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(true)
         }
     }
-    
+
     func setContinueMode(isContinueMode : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.displaysPageBreaks = isContinueMode
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isContinueMode(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.displaysPageBreaks)
@@ -299,7 +299,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(true)
         }
     }
-    
+
     func setDoublePageMode(isDoublePageMode : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.displayTwoUp = isDoublePageMode
@@ -307,7 +307,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isDoublePageMode(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.displayTwoUp)
@@ -315,7 +315,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(true)
         }
     }
-    
+
     func setCoverPageMode(isCoverPageMode : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.displayTwoUp = isCoverPageMode
@@ -323,7 +323,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isCoverPageMode(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.displaysAsBook)
@@ -331,14 +331,14 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(true)
         }
     }
-    
+
     func setCropMode(isCropMode : Bool) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             pdfListView.displayCrop = isCropMode
             pdfListView.layoutDocumentView()
         }
     }
-    
+
     func isCropMode(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.displayCrop)
@@ -346,7 +346,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(true)
         }
     }
-    
+
     func getFileName(completionHandler: @escaping (String) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.documentURL.lastPathComponent)
@@ -354,7 +354,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler("")
         }
     }
-    
+
     func isEncrypted(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.isEncrypted)
@@ -362,7 +362,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func isImageDoc(completionHandler: @escaping (Bool) -> Void){
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.isImageDocument())
@@ -370,7 +370,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func getPermissions(completionHandler: @escaping (NSNumber) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let permissions = pdfListView.document?.permissionsStatus ?? .none
@@ -388,7 +388,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(0)
         }
     }
-    
+
     func getPageCount(completionHandler: @escaping (NSNumber) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.pageCount as NSNumber)
@@ -396,7 +396,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(0)
         }
     }
-    
+
     func checkOwnerUnlocked(completionHandler: @escaping (Bool) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.isCheckOwnerUnlocked())
@@ -404,7 +404,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func checkOwnerPassword(password : String, completionHandler: @escaping (Bool) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             completionHandler(pdfListView.document.checkOwnerPassword(password))
@@ -412,7 +412,7 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler(false)
         }
     }
-    
+
     func getEncryptAlgo(completionHandler: @escaping (String) -> Void) {
         if let pdfListView = self.pdfViewController?.pdfListView {
             let encryptAlgo = pdfListView.document.encryptionLevel
@@ -432,46 +432,46 @@ class RCTCPDFView: UIView, CPDFViewBaseControllerDelete {
             completionHandler("noEncryptAlgo")
         }
     }
-    
-    
-    
-    
-    
+
+
+
+
+
     // MARK: - CPDFViewBaseControllerDelete
-    
+
     func PDFViewBaseController(_ baseController: CPDFViewBaseController, SaveState success: Bool) {
         self.delegate?.saveDocumentChange(self)
     }
-    
+
     func PDFViewBaseController(_ baseController: CPDFViewBaseController, currentPageIndex index: Int) {
         self.delegate?.onPageChanged(self, pageIndex: index)
     }
-    
+
     // MARK: - RCT Methods
-    
+
     private var configuration: String = ""
     @objc func setConfiguration(_ newSection: String) {
         configuration = newSection
-        
+
         if (document.path.count > 1) && (configuration.count > 1) {
             createCPDFView()
         }
     }
-    
+
     private var document: URL = URL(fileURLWithPath: "")
     @objc func setDocument(_ newSection: URL) {
         document = newSection
-        
+
         if (document.path.count > 1) && (configuration.count > 1) {
             createCPDFView()
         }
     }
-    
+
     private var password: String = ""
     @objc func setPassword(_ newSection: String) {
         password = newSection
     }
-    
+
     public var onChange: RCTBubblingEventBlock?
     @objc func setOnChange(_ newSection: @escaping RCTBubblingEventBlock) {
         onChange = newSection

+ 1 - 1
ios/RCTCPDFViewManager.m

@@ -2,7 +2,7 @@
 //  RCTCPDFViewManager.m
 //  react-native-compdfkit-pdf
 //
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

+ 44 - 44
ios/RCTCPDFViewManager.swift

@@ -2,7 +2,7 @@
 //  RCTCPDFViewManager.swift
 //  react-native-compdfkit-pdf
 //
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.
@@ -15,24 +15,24 @@ import ComPDFKit
 
 @objc(RCTCPDFReaderView)
 class RCTCPDFReaderView: RCTViewManager, RCTCPDFViewDelegate {
-    
+
     @objc override static func requiresMainQueueSetup() -> Bool {
         return true
     }
-    
+
     var cpdfViews: Dictionary<Int, RCTCPDFView> = [:]
-    
+
     @objc override func view() -> UIView! {
         let rtcCPDFView = RCTCPDFView()
         rtcCPDFView.delegate = self
         return rtcCPDFView
     }
-    
+
     func saveDocument(forCPDFViewTag tag: Int, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.saveDocument(completionHandler: { success in
             completionHandler(success)
-            
+
             if (success) {
                 if let onChange = rtcCPDFView?.onChange {
                     onChange(["saveDocument": "saveDocument"])
@@ -40,214 +40,214 @@ class RCTCPDFReaderView: RCTViewManager, RCTCPDFViewDelegate {
             }
         })
     }
-    
+
     func setMargins(forCPDFViewTag tag: Int, left : Int, top : Int, right : Int, bottom : Int) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setMargins(left: left, top: top, right: right, bottom: bottom)
     }
-    
+
     func removeAllAnnotations(forCPDFViewTag tag: Int, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.removeAllAnnotations(completionHandler: { success in
             completionHandler(success)
         })
     }
-    
+
     func importAnnotations(forCPDFViewTag tag: Int, xfdfFile : URL, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.importAnnotations(xfdfFile: xfdfFile, completionHandler: { success in
             completionHandler(success)
         })
     }
-    
+
     func exportAnnotations(forCPDFViewTag tag: Int, completionHandler: @escaping (String) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.exportAnnotations(completionHandler: { success in
             completionHandler(success)
         })
     }
-    
+
     func setDisplayPageIndex(forCPDFViewTag tag : Int, pageIndex : Int) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setDisplayPageIndex(pageIndex: pageIndex)
     }
-    
+
     func getCurrentPageIndex(forCPDFViewTag tag: Int, completionHandler: @escaping (Int) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getCurrentPageIndex(completionHandler: { pageIndex in
             completionHandler(pageIndex)
         })
     }
-    
+
     func hasChange(forCPDFViewTag tag: Int, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.hasChange(completionHandler: { success in
             completionHandler(success)
         })
     }
-    
+
     func setScale(forCPDFViewTag tag : Int, scale : NSNumber) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setScale(scale: scale)
     }
-    
+
     func getScale(forCPDFViewTag tag : Int, completionHandler: @escaping (NSNumber) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getScale(completionHandler: { success in
             completionHandler(success)
         })
     }
-    
+
     func setReadBackgroundColor(forCPDFViewTag tag : Int, displayMode : NSString) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setReadBackgroundColor(displayMode: displayMode)
     }
-    
+
     func getReadBackgroundColor(forCPDFViewTag tag : Int, completionHandler: @escaping (NSString) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getReadbackgroundColor(completionHandler: {color in
             completionHandler(color)
         })
     }
-    
+
     func setFormFieldHighlight(forCPDFViewTag tag : Int, formFieldHighlight : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setFormFieldHighlight(formFieldHighlight: formFieldHighlight)
     }
-    
+
     func isFormFieldHighlight(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isFormFieldHighlight(completionHandler: {highlight in
             completionHandler(highlight)
         })
     }
-    
+
     func setLinkHighlight(forCPDFViewTag tag : Int, linkHighlight : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setLinkHighlight(linkHighlight: linkHighlight)
     }
-    
+
     func isLinkHighlight(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isLinkHighlight(completionHandler: {highlight in
             completionHandler(highlight)
         })
     }
-    
+
     func setVerticalMode(forCPDFViewTag tag : Int, isVerticalMode : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setVerticalMode(isVerticalMode: isVerticalMode)
     }
-    
+
     func isVerticalMode(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isVerticalMode(completionHandler: {isVertical in
             completionHandler(isVertical)
         })
     }
-    
+
     func setContinueMode(forCPDFViewTag tag : Int, isContinueMode : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setContinueMode(isContinueMode: isContinueMode)
     }
-    
+
     func isContinueMode(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isContinueMode(completionHandler: {isContinue in
             completionHandler(isContinue)
         })
     }
-    
+
     func setDoublePageMode(forCPDFViewTag tag : Int, isDoublePageMode : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setDoublePageMode(isDoublePageMode: isDoublePageMode)
     }
-    
+
     func isDoublePageMode(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isDoublePageMode(completionHandler: {isDoublePage in
             completionHandler(isDoublePage)
         })
     }
-    
+
     func setCoverPageMode(forCPDFViewTag tag : Int, isCoverPageMode : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setCoverPageMode(isCoverPageMode: isCoverPageMode)
     }
-    
+
     func isCoverPageMode(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isCoverPageMode(completionHandler: { isCoverPageMode in
             completionHandler(isCoverPageMode)
         })
     }
-    
+
     func setCropMode(forCPDFViewTag tag : Int, isCropMode : Bool) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.setCropMode(isCropMode: isCropMode)
     }
-    
+
     func isCropMode(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isCropMode(completionHandler: completionHandler)
     }
-    
+
     func getFileName(forCPDFViewTag tag : Int, completionHandler: @escaping (String) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getFileName(completionHandler: completionHandler)
     }
-    
+
     func isEncrypted(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isEncrypted(completionHandler: completionHandler)
     }
-    
+
     func isImageDoc(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void){
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.isImageDoc(completionHandler: completionHandler)
     }
-    
+
     func getPermissions(forCPDFViewTag tag : Int, completionHandler: @escaping (NSNumber) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getPermissions(completionHandler: completionHandler)
     }
-    
+
     func getPageCount(forCPDFViewTag tag : Int, completionHandler: @escaping (NSNumber) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getPageCount(completionHandler: completionHandler)
     }
-    
+
     func checkOwnerUnlocked(forCPDFViewTag tag : Int, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.checkOwnerUnlocked(completionHandler: completionHandler)
     }
-    
+
     func checkOwnerPassword(forCPDFViewTag tag : Int, password : String, completionHandler: @escaping (Bool) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.checkOwnerPassword(password: password, completionHandler: completionHandler)
     }
-    
+
     func getEncryptAlgo(forCPDFViewTag tag : Int, completionHandler: @escaping (String) -> Void) {
         let rtcCPDFView = cpdfViews[tag]
         rtcCPDFView?.getEncryptAlgo(completionHandler: completionHandler)
     }
-    
+
     // MARK: - RCTCPDFViewDelegate
-    
+
     func cpdfViewAttached(_ cpdfView: RCTCPDFView) {
         cpdfViews[cpdfView.reactTag.intValue] = cpdfView
     }
-    
+
     func saveDocumentChange(_ cpdfView: RCTCPDFView) {
         if let onChange = cpdfView.onChange {
             onChange(["saveDocument": "saveDocument"])
         }
     }
-    
+
     func onPageChanged(_ cpdfView: RCTCPDFView, pageIndex: Int) {
         if let onChange = cpdfView.onChange {
             onChange(["onPageChanged": pageIndex])
         }
     }
-    
+
 }

+ 1 - 1
ios/RCTDocumentManager.m

@@ -1,4 +1,4 @@
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.

+ 41 - 41
ios/RCTDocumentManager.swift

@@ -2,7 +2,7 @@
 //  RCTDocumentManager.swift
 //  react-native-compdfkit-pdf
 //
-//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//  Copyright © 2014-2025 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.
@@ -14,17 +14,17 @@ import UIKit
 import ComPDFKit
 
 @objc(CPDFViewManager)
-class RCTDocumentManager: NSObject, RCTBridgeModule {    
+class RCTDocumentManager: NSObject, RCTBridgeModule {
     static func moduleName() -> String! {
         return "RCTDocumentManager"
     }
-    
+
     internal var bridge: RCTBridge!
-    
+
     @objc func readerView() -> RCTCPDFReaderView {
         self.bridge.module(for: RCTCPDFReaderView.self) as! RCTCPDFReaderView
     }
-    
+
     @objc(save: withResolver: withRejecter:)
     func save(tag: Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -36,10 +36,10 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
                     reject("save_failed", "Failed to save document", nil);
                 }
             }
-            
+
         }
     }
-    
+
     @objc(setMargins: withEdges:)
     func setMargins(tag : Int, edges: [Int]) -> Void {
         DispatchQueue.main.async {
@@ -49,7 +49,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(removeAllAnnotations: withResolver: withRejecter:)
     func removeAllAnnotations(tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -63,7 +63,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(importAnnotations: withXfdfFile: withResolver: withRejecter:)
     func importAnnotations(tag : Int, xfdfFile : URL, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -77,17 +77,17 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(exportAnnotations: withResolver: withRejecter:)
     func exportAnnotations(tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
             let reader = self.readerView()
             reader.exportAnnotations(forCPDFViewTag: tag) { xfdfFilePath in
                 resolve(xfdfFilePath)
-            } 
+            }
         }
     }
-    
+
     @objc(setDisplayPageIndex: withPageIndex:)
     func setDisplayPageIndex(tag : Int, pageIndex : Int) -> Void {
         DispatchQueue.main.async {
@@ -95,7 +95,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setDisplayPageIndex(forCPDFViewTag: tag, pageIndex: pageIndex)
         }
     }
-    
+
     @objc(getCurrentPageIndex: withResolver: withRejecter:)
     func getCurrentPageIndex(tag : Int,resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -105,7 +105,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(hasChange: withResolver: withRejecter:)
     func hasChange(tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -115,7 +115,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(setScale: withScaleValue:)
     func setScale(tag : Int, scale : NSNumber) -> Void {
         DispatchQueue.main.async {
@@ -123,7 +123,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setScale(forCPDFViewTag: tag, scale: scale)
         }
     }
-    
+
     @objc(getScale: withResolver: withRejecter:)
     func getScale(tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -133,7 +133,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             }
         }
     }
-    
+
     @objc(setReadBackgroundColor: withThemes:)
     func setReadBackgroundColor(tag : Int, themes : NSDictionary) -> Void{
         DispatchQueue.main.async {
@@ -142,7 +142,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setReadBackgroundColor(forCPDFViewTag: tag, displayMode: displayMode)
         }
     }
-    
+
     @objc(getReadBackgroundColor: withResolver: withRejecter:)
     func getReadBackgroundColor(tag: Int,  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -152,7 +152,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setFormFieldHighlight: withFormFieldHighlight:)
     func setFormFieldHighlight(tag: Int, formFieldHighlight : Bool) {
         DispatchQueue.main.async {
@@ -160,7 +160,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setFormFieldHighlight(forCPDFViewTag: tag, formFieldHighlight: formFieldHighlight)
         }
     }
-    
+
     @objc(isFormFieldHighlight: withResolver: withRejecter:)
     func isFormFieldHighlight(tag: Int,  resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -170,7 +170,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setLinkHighlight: withLinkHighlight:)
     func setLinkHighlight(tag: Int, linkHighlight : Bool) {
         DispatchQueue.main.async {
@@ -178,7 +178,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setLinkHighlight(forCPDFViewTag: tag, linkHighlight: linkHighlight)
         }
     }
-    
+
     @objc(isLinkHighlight: withResolver: withRejecter:)
     func isLinkHighlight(tag: Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -188,7 +188,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setVerticalMode: withVerticalMode:)
     func setVerticalMode(tag : Int, isVerticalMode : Bool){
         DispatchQueue.main.async {
@@ -196,7 +196,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setVerticalMode(forCPDFViewTag: tag, isVerticalMode: isVerticalMode)
         }
     }
-    
+
     @objc(isVerticalMode: withResolver: withRejecter:)
     func isVerticalMode(tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {
@@ -206,7 +206,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setContinueMode: withContiueMode:)
     func setContinueMode(forCPDFViewTag tag : Int, isContinueMode : Bool) {
         DispatchQueue.main.async {
@@ -214,7 +214,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setContinueMode(forCPDFViewTag: tag, isContinueMode: isContinueMode)
         }
     }
-    
+
     @objc(isContinueMode: withResolver: withRejecter:)
     func isContinueMode(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -224,7 +224,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setDoublePageMode: withDoublePageMode:)
     func setDoublePageMode(forCPDFViewTag tag : Int, isDoublePageMode : Bool) {
         DispatchQueue.main.async {
@@ -232,7 +232,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setDoublePageMode(forCPDFViewTag: tag, isDoublePageMode: isDoublePageMode)
         }
     }
-    
+
     @objc(isDoublePageMode: withResolver: withRejecter:)
     func isDoublePageMode(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -242,7 +242,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setCoverPageMode: withCoverPageMode:)
     func setCoverPageMode(forCPDFViewTag tag : Int, isCoverPageMode : Bool) {
         DispatchQueue.main.async {
@@ -250,7 +250,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setCoverPageMode(forCPDFViewTag: tag, isCoverPageMode: isCoverPageMode)
         }
     }
-    
+
     @objc(isCoverPageMode: withResolver: withRejecter:)
     func isCoverPageMode(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -260,7 +260,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(setCropMode: withCropMode:)
     func setCropMode(forCPDFViewTag tag : Int, isCropMode : Bool) {
         DispatchQueue.main.async {
@@ -268,7 +268,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             reader.setCropMode(forCPDFViewTag: tag, isCropMode: isCropMode)
         }
     }
-    
+
     @objc(isCropMode: withResolver: withRejecter:)
     func isCropMode(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -278,7 +278,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(getFileName: withResolver: withRejecter:)
     func getFileName(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -288,7 +288,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(isEncrypted: withResolver: withRejecter:)
     func isEncrypted(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -298,7 +298,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(isImageDoc: withResolver: withRejecter:)
     func isImageDoc(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -308,7 +308,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(getPermissions: withResolver: withRejecter:)
     func getPermissions(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -318,7 +318,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(getPageCount: withResolver: withRejecter:)
     func getPageCount(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -328,7 +328,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(checkOwnerUnlocked: withResolver: withRejecter:)
     func checkOwnerUnlocked(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -338,8 +338,8 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
-    
+
+
     @objc(checkOwnerPassword: withPassword: withResolver: withRejecter:)
     func checkOwnerPassword(forCPDFViewTag tag : Int, password : String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
@@ -349,7 +349,7 @@ class RCTDocumentManager: NSObject, RCTBridgeModule {
             })
         }
     }
-    
+
     @objc(getEncryptAlgo: withResolver: withRejecter:)
     func getEncryptAlgo(forCPDFViewTag tag : Int, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
         DispatchQueue.main.async {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@compdfkit_pdf_sdk/react_native",
-  "version": "2.2.0",
+  "version": "2.2.1",
   "description": "ComPDFKit for React Native is a comprehensive SDK that allows you to quickly add PDF functionality to Android, iOS, and React Native applications.",
   "main": "./src/index.tsx",
   "source": "src/index",

+ 4 - 4
src/configuration/CPDFConfiguration.ts

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -54,7 +54,7 @@ export class CPDFConfiguration {
 
         /**
          * Set whether to display the top toolbar
-         * 
+         *
          * Default: true
          */
         mainToolbarVisible?: boolean,
@@ -413,14 +413,14 @@ export class CPDFConfiguration {
          * Spacing between each page of the PDF, default 10px.
          */
         pageSpacing?: number,
-        
+
         /**
          * Sets the outer margins for the PDF reading view.
          * - `index 0`: margin left
          * - `index 1`: margin top
          * - `index 2`: margin right
          * - `index 3`: margin bottom
-         * 
+         *
          * **Default:** `[0,0,0,0]`
          */
         margins?: number[],

+ 6 - 6
src/configuration/CPDFOptions.ts

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -303,24 +303,24 @@ export const CPDFThemes = {
      * Bright mode, readerview background is white
      */
     LIGHT: 'light',
-  
+
     /**
      * dark mode, readerview background is black
      */
     DARK: 'dark',
-  
+
     /**
      * brown paper color
      */
     SEPIA: 'sepia',
-  
+
     /**
      * Light green, eye protection mode
      */
     RESEDA: 'reseda'
-  
+
   }
-  
+
 export type CPDFThemes = ValueOf<typeof CPDFThemes>;
 
 /**

+ 32 - 7
src/index.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -11,7 +11,7 @@ import { NativeModules } from 'react-native';
 import { CPDFConfiguration } from './configuration/CPDFConfiguration';
 import { CPDFAlignment, CPDFAnnotationType, CPDFBorderStyle, CPDFCheckStyle, CPDFConfigTool, CPDFContentEditorType, CPDFDisplayMode, CPDFFormType, CPDFLineType,CPDFThemeMode, CPDFThemes, CPDFToolbarAction, CPDFToolbarMenuAction, CPDFTypeface, CPDFViewMode } from './configuration/CPDFOptions';
 import React from 'react';
-import { CPDFReaderView } from '../lib/typescript/src';
+import { CPDFReaderView } from './view/CPDFReaderView';
 
 declare module 'react-native' {
   interface NativeModulesStatic {
@@ -124,17 +124,41 @@ declare module 'react-native' {
 
       /**
        * Delete the saved signature file from the annotation signature list
-       * 
+       *
        * @example
        * ComPDFKit.removeSignFileList().then((result : boolean) => {
        *  console.log('ComPDFKit removeSignFileList:', result)
        * })
-       * 
-       * @returns 
+       *
+       * @returns
        */
       removeSignFileList : () => Promise<boolean>;
+      
+      /**
+       * Opens the system file picker to select a PDF document.
+       * @returns A promise that resolves to the file path of the selected PDF document.
+       **/
+      pickFile: () => Promise<string>;
 
-      pickFile : () => Promise<string>;
+      /**
+       * Imports font files to support displaying additional languages. 
+       * Imported fonts will appear in the font list for FreeText annotations and text editing.
+       * 
+       * **Note:** Fonts must be imported before initializing the SDK.
+       * 
+       * Steps to import fonts:
+       * 1. Copy the fonts you want to import into a custom folder.
+       * 2. Call `setImportFontDir` with the folder path as a parameter.
+       * 3. Initialize the SDK using `ComPDFKit.init_`.
+       * 
+       * @param {string} fontDir - The path to the folder containing font files to import.
+       * @param {boolean} addSysFont - Whether to include system fonts in the font list.
+       * 
+       * @example
+       * ComPDFKit.setImportFontDir('fontdir', true);
+       * @returns A promise that resolves when the fonts have been successfully imported.
+       */
+      setImportFontDir: (fontDir: string, addSysFont: boolean) => Promise<boolean>;
     };
   }
 }
@@ -148,6 +172,7 @@ interface ComPDFKit {
   openDocument(document: string, password: string, configurationJson: string): void;
   removeSignFileList() : Promise<boolean>;
   pickFile() : Promise<string>;
+  setImportFontDir: (fontDir: string, addSysFont: boolean) => Promise<boolean>;
 }
 
 const ComPDFKit = NativeModules.ComPDFKit
@@ -464,4 +489,4 @@ function mergeDeep(defaults: any, overrides: any): any {
 
 const PDFReaderContext = React.createContext<CPDFReaderView | null>(null);
 
-export default PDFReaderContext;
+export default PDFReaderContext;

+ 79 - 79
src/view/CPDFReaderView.tsx

@@ -1,5 +1,5 @@
 /**
- * Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+ * Copyright © 2014-2025 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.
@@ -71,7 +71,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
     super(props);
     this._pdfDocument = new CPDFDocument(this._viewerRef);
   }
-  
+
   _setNativeRef = (ref: any) => {
     this._viewerRef = ref;
     this._pdfDocument = new CPDFDocument(this._viewerRef);
@@ -126,10 +126,10 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   };
 
   /**
-   * 
-   * @deprecated This method is deprecated and will be removed in future versions. 
+   *
+   * @deprecated This method is deprecated and will be removed in future versions.
    * Use `_pdfDocument.removeAllAnnotations()` instead.
-   * 
+   *
    * Delete all comments in the current document
    * @example
    * const removeResult = await pdfReaderRef.current?.removeAllAnnotations();
@@ -145,10 +145,10 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   }
 
   /**
-   * 
-   * @deprecated This method is deprecated and will be removed in future versions. 
+   *
+   * @deprecated This method is deprecated and will be removed in future versions.
    * Use `_pdfDocument.importAnnotations()` instead.
-   * 
+   *
    * Imports annotations from the specified XFDF file into the current PDF document.
    * @example
    * // Android - assets file
@@ -179,10 +179,10 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   }
 
   /**
-   * 
-   * @deprecated This method is deprecated and will be removed in future versions. 
+   *
+   * @deprecated This method is deprecated and will be removed in future versions.
    * Use `_pdfDocument.exportAnnotations()` instead.
-   * 
+   *
    * Exports annotations from the current PDF document to an XFDF file.
    *
    * @example
@@ -228,9 +228,9 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   }
 
   /**
-   * @deprecated This method is deprecated and will be removed in future versions. 
+   * @deprecated This method is deprecated and will be removed in future versions.
    * Use `_pdfDocument.hasChange()` instead.
-   * 
+   *
    * Checks whether the document has been modified
    *
    * @example
@@ -248,11 +248,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   /**
    * Set the page scale
    * Value Range: 1.0~5.0
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.setScale(2.0);
-   * 
-   * @param scale 
+   *
+   * @param scale
    * @returns Returns a Promise.
    */
   setScale = (scale : number) : Promise<void> => {
@@ -265,10 +265,10 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Get the current page scale
-   * 
+   *
    * @example
    * const scale = await pdfReaderRef.current?.getScale();
-   * 
+   *
    * @returns Returns the zoom ratio of the current page.
    */
   getScale = () : Promise<number> => {
@@ -282,12 +282,12 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   /**
    * Whether allow to scale.
    * Default : true
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.setCanScale(false);
-   * 
-   * @param canScale 
-   * @returns 
+   *
+   * @param canScale
+   * @returns
    */
   setCanScale = (canScale : boolean) : Promise<void> =>{
     if(Platform.OS != 'android'){
@@ -305,9 +305,9 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * The color of each document space will be set to 75% of [color] transparency
    * @example
    * await pdfReaderRef.current?.setReadBackgroundColor(CPDFThemes.LIGHT);
-   * 
-   * @param theme 
-   * @returns 
+   *
+   * @param theme
+   * @returns
    */
   setReadBackgroundColor = (theme : CPDFThemes) : Promise<void> =>{
     const tag = findNodeHandle(this._viewerRef);
@@ -339,10 +339,10 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Get background color of reader.
-   * 
+   *
    * @example
    * CPDFThemes theme = await pdfReaderRef.current?.getReadBackgroundColor();
-   * @returns 
+   * @returns
    */
   getReadBackgroundColor = async () : Promise<CPDFThemes> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -376,7 +376,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setFormFieldHighlight(true);
    * @param isFormFieldHighlight true to display highlight Form Field.
-   * @returns 
+   * @returns
    */
   setFormFieldHighlight = (isFormFieldHighlight : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -385,12 +385,12 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
     }
     return Promise.resolve();
   }
-  
+
   /**
    * Whether to display highlight Form Field.
    * @example
    * const isFormFieldHighlight = await pdfReaderRef.current?.isFormFieldHighlight();
-   * @returns 
+   * @returns
    */
   isFormFieldHighlight = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -405,7 +405,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setLinkHighlight(true);
    * @param isLinkHighlight Whether to highlight Link.
-   * @returns 
+   * @returns
    */
   setLinkHighlight = (isLinkHighlight : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -419,7 +419,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Whether to display highlight Link.
    * @example
    * const isLinkHighlight = await pdfReaderRef.current?.isLinkHighlight();
-   * @returns 
+   * @returns
    */
   isLinkHighlight = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -434,7 +434,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setVerticalMode(true);
    * @param isVerticalMode Whether it is vertical scroll mode.
-   * @returns 
+   * @returns
    */
   setVerticalMode = (isVerticalMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -448,7 +448,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Whether it is vertical scroll mode.
    * @example
    * await pdfReaderRef.current?.isVerticalMode();
-   * @returns 
+   * @returns
    */
   isVerticalMode = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -465,7 +465,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setPageSpacing(10);
    * @param pageSpacing The space between pages, in pixels.
-   * @returns 
+   * @returns
    */
   setPageSpacing = (pageSpacing : number) : Promise<void> => {
     if(Platform.OS === 'ios'){
@@ -483,7 +483,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setContinueMode(true);
    * @param isContinueMode Whether it is continuous scroll mode.
-   * @returns 
+   * @returns
    */
   setContinueMode = (isContinueMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -497,7 +497,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Whether it is continuous scroll mode.
    * @example
    * await pdfReaderRef.current?.isContinueMode();
-   * @returns 
+   * @returns
    */
   isContinueMode = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -512,7 +512,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setDoublePageMode(true);
    * @param isDoublePageMode Whether it is double page mode.
-   * @returns 
+   * @returns
    */
   setDoublePageMode = (isDoublePageMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -521,12 +521,12 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
     }
     return Promise.resolve();
   }
-  
+
   /**
    * Whether it is double page mode.
    * @example
    * await pdfReaderRef.current?.isDoublePageMode();
-   * @returns 
+   * @returns
    */
   isDoublePageMode = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -540,8 +540,8 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Sets whether it is cover page mode.
    * @example
    * await pdfReaderRef.current?.setCoverPageMode(true);
-   * @param isCoverPageMode 
-   * @returns 
+   * @param isCoverPageMode
+   * @returns
    */
   setCoverPageMode = (isCoverPageMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -555,7 +555,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Whether it is cover page mode.
    * @example
    * await pdfReaderRef.current?.isCoverPageMode();
-   * @returns 
+   * @returns
    */
   isCoverPageMode = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -569,7 +569,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setCropMode(true);
    * @param isCropMode Whether it is crop mode.
-   * @returns 
+   * @returns
    */
   setCropMode = (isCropMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -582,7 +582,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Whether it is crop mode.
    * @example
    * await pdfReaderRef.current?.isCropMode();
-   * @returns 
+   * @returns
    */
   isCropMode = () : Promise<boolean> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -593,14 +593,14 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   }
 
   /**
-   * In the single page mode, set whether all pages keep the same width 
+   * In the single page mode, set whether all pages keep the same width
    * and the original page keeps the same width as readerView.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.setPageSameWidth(true);
-   * 
+   *
    * @param isPageSameWidth true: All pages keep the same width, the original state keeps the same width as readerView; false: Show in the actual width of page
-   * @returns 
+   * @returns
    */
   setPageSameWidth = (isPageSameWidth : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -614,8 +614,8 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Gets whether the specified [pageIndex] is displayed on the screen
    * @example
    * const isPageInScreen = await pdfReaderRef.current?.isPageInScreen(1);
-   * @param pageIndex 
-   * @returns 
+   * @param pageIndex
+   * @returns
    */
   isPageInScreen = (pageIndex : number) : Promise<boolean> => {
     if(Platform.OS === 'ios'){
@@ -633,7 +633,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * @example
    * await pdfReaderRef.current?.setFixedScroll(true);
    * @param isFixedScroll
-   * @returns 
+   * @returns
    */
   setFixedScroll = (isFixedScroll : boolean) : Promise<void> => {
     if(Platform.OS != 'android'){
@@ -649,11 +649,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   /**
    * Switch the mode displayed by the current CPDFReaderWidget.
    * Please see [CPDFViewMode] for available modes.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.setPreviewMode(CPDFViewMode.VIEWER);
-   * @param viewMode 
-   * @returns 
+   * @param viewMode
+   * @returns
    */
   setPreviewMode = (viewMode : CPDFViewMode) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -667,7 +667,7 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
    * Get the currently displayed mode
    * @example
    * const mode = await pdfReaderRef.current?.getPreviewMode();
-   * @returns 
+   * @returns
    */
   getPreviewMode = () : Promise<CPDFViewMode> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -683,14 +683,14 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
   }
 
   /**
-   * Displays the thumbnail view. When [editMode] is `true`, 
+   * Displays the thumbnail view. When [editMode] is `true`,
    * the page enters edit mode, allowing operations such as insert, delete, extract, etc.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.showThumbnailView(true);
-   * 
-   * @param editMode 
-   * @returns 
+   *
+   * @param editMode
+   * @returns
    */
   showThumbnailView = (editMode : boolean) : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -702,11 +702,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Displays the BOTA view, which includes the document outline, bookmarks, and annotation list.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.showBotaView();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   showBotaView = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -718,11 +718,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Displays the "Add Watermark" view, where users can add watermarks to the document.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.showAddWatermarkView();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   showAddWatermarkView = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -734,11 +734,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Displays the document security settings view, allowing users to configure document security options.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.showSecurityView();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   showSecurityView = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -750,11 +750,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Displays the display settings view, where users can configure options such as scroll direction, scroll mode, and themes.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.showDisplaySettingView();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   showDisplaySettingView = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -766,11 +766,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Enters snip mode, allowing users to capture screenshots.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.enterSnipMode();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   enterSnipMode = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);
@@ -782,11 +782,11 @@ export class CPDFReaderView extends PureComponent<CPDFReaderViewProps, any> {
 
   /**
    * Exits snip mode, stopping the screenshot capture.
-   * 
+   *
    * @example
    * await pdfReaderRef.current?.exitSnipMode();
-   * 
-   * @returns 
+   *
+   * @returns
    */
   exitSnipMode = () : Promise<void> => {
     const tag = findNodeHandle(this._viewerRef);