Bladeren bron

compdfkit(rn) - v2.1.1

liuxiaolong 6 maanden geleden
bovenliggende
commit
4e90b82ac0

+ 11 - 1
CHANGELOG.md

@@ -1,5 +1,16 @@
 ## Newest Release
 
+### 2.1.1 - 12 Aug 2024
+
+* Added the features support for ComPDFKit PDF SDK for iOS V2.1.1.
+* Added the features support for ComPDFKit PDF SDK for Android V2.1.1.
+* Optimized the logic for selecting text by long press.
+* Fixed low text contrast issue in dark mode for some documents.
+* Fixed crash issues with some documents.
+
+
+## Previous Release
+
 ### 2.1.0 - 29 July 2024
 
 * Added the features support for ComPDFKit PDF SDK for iOS V2.1.0.
@@ -11,7 +22,6 @@
 * Android platform adaptation for **Laban Key Keyboard**.
 * Fixed an issue with the Ink annotation color display on Android.
 
-## Previous Release
 
 ### 2.0.1 - 13 May 2024
 

+ 23 - 23
README.md

@@ -81,7 +81,7 @@ You can integrate the SDK in two ways:
     package="com.compdfkit.flutter.example">
 
 +    <uses-permission android:name="android.permission.INTERNET"/>
-  
+
     <!-- Required to read and write documents from device storage -->
 +    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
 +    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@@ -117,8 +117,8 @@ open ios/Podfile
 ```diff
 target 'MyApp' do
     # ...
-+    pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.0.podspec'
-+  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.0.podspec'
++    pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.1.podspec'
++  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.1.podspec'
     # ...
 end
 ```
@@ -128,8 +128,8 @@ end
 ```diff
 target 'MyApp' do
     # ...
-+  pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.1.0'
-+  pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.1.0'
++  pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.1.1'
++  pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '2.1.1'
     # ...
 end
 ```
@@ -212,21 +212,21 @@ Here is the sample code for `App.tsx`:
  } from 'react-native';
  import { ComPDFKit } from '@compdfkit_pdf_sdk/react_native';
  import { Platform } from 'react-native';
- 
+
  type Props = {};
- 
+
  export default class App extends Component<Props> {
- 
+
    state = {
      versionCode: ''
    }
- 
+
    constructor(props: Props) {
      super(props)
      this.initialize()
      this.getVersionCode()
    }
- 
+
    async getVersionCode() {
      // Get the version code of ComPDFKit SDK
      var version = await ComPDFKit.getVersionCode()
@@ -234,13 +234,13 @@ Here is the sample code for `App.tsx`:
        versionCode: version
      })
    }
- 
+
    async initialize() {
      // Online certification, Fill in your online license
      // Returns true if initialization is successful, otherwise returns false.
      var result = await ComPDFKit.initialize('compdfkit android license', 'compdfkit ios license')
      console.log("ComPDFKitRN", "initialize:", result)
- 
+
      // Offline authentication, Fill in your offline license
      // var result;
      // if(Platform.OS == 'android') {
@@ -250,7 +250,7 @@ Here is the sample code for `App.tsx`:
      // }
      // console.log("ComPDFKitRN", "init_:", result)
    }
- 
+
    /**
     * Open the sample document embedded in Android or iOS project.
     */
@@ -258,16 +258,16 @@ Here is the sample code for `App.tsx`:
      var samplePDF: string = Platform.OS == 'android' ? 'file:///android_asset/PDF_Document.pdf' : 'PDF_Document.pdf'
      // We provide default UI and PDF property related configurations here, you can modify configuration options according to your needs.
      var config = ComPDFKit.getDefaultConfig({
- 
+
      })
      ComPDFKit.openDocument(samplePDF, '', config)
    }
- 
+
    /**
     * Pick a PDF file from the local storage of Android or iOS device, this example uses the `react-native-document-picker` package,
     * If you want to use this example, please add this package to your project first.
     * {@link https://www.npmjs.com/package/react-native-document-picker}
-    * 
+    *
     */
    pickPDFFile(){
      try {
@@ -280,7 +280,7 @@ Here is the sample code for `App.tsx`:
      } catch (err) {
      }
    }
- 
+
    render() {
      return (
        <SafeAreaView style={{ flex: 1 }}>
@@ -298,9 +298,9 @@ Here is the sample code for `App.tsx`:
                  <Text style={{ fontWeight: 'bold' }}>{'Open Sample'}</Text>
                </View>
              </TouchableOpacity>
- 
+
              <View style={styles.dividingLine} />
- 
+
              <TouchableOpacity onPress={() => {
                this.pickPDFFile()
              }}>
@@ -308,20 +308,20 @@ Here is the sample code for `App.tsx`:
                  <Text style={{ fontWeight: 'bold' }}>{'Pick Document'}</Text>
                </View>
                <View style={styles.dividingLine} />
- 
+
              </TouchableOpacity>
- 
+
              <View style={styles.buttom}>
                <Text style={styles.body2}>ComPDFKit for {Platform.OS == 'android' ? 'Android' : 'iOS'} {this.state.versionCode}</Text>
              </View>
            </View>
          </View>
        </SafeAreaView>
- 
+
      );
    }
  }
- 
+
  const styles = StyleSheet.create({
    appBar: {
      height: 56,

+ 3 - 3
android/build.gradle

@@ -80,8 +80,8 @@ repositories {
 dependencies {
 
   implementation "com.facebook.react:react-native:+"
-  api "com.compdf:compdfkit:2.1.0"
-  api "com.compdf:compdfkit-ui:2.1.0"
-  api "com.compdf:compdfkit-tools:2.1.0"
+  api "com.compdf:compdfkit:2.1.1"
+  api "com.compdf:compdfkit-ui:2.1.1"
+  api "com.compdf:compdfkit-tools:2.1.1"
 }
 

+ 2 - 2
example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj

@@ -498,7 +498,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 2.1.0;
+				MARKETING_VERSION = 2.1.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -529,7 +529,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 2.1.0;
+				MARKETING_VERSION = 2.1.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

+ 1 - 1
example/ios/CompdfkitPdfExample.xcodeproj/xcshareddata/xcschemes/CompdfkitPdfExample.xcscheme

@@ -62,7 +62,7 @@
       </BuildableProductRunnable>
    </LaunchAction>
    <ProfileAction
-      buildConfiguration = "Release"
+      buildConfiguration = "Debug"
       shouldUseLaunchSchemeArgsEnv = "YES"
       savedToolIdentifier = ""
       useCustomWorkingDirectory = "NO"

+ 2 - 2
example/ios/Podfile

@@ -16,8 +16,8 @@ end
 
 target 'CompdfkitPdfExample' do
   config = use_native_modules!
-  pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.0.podspec'
-  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.0.podspec'
+  pod "ComPDFKit", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.1.podspec'
+  pod "ComPDFKit_Tools", podspec:'https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.1.podspec'
 
 
   use_react_native!(

+ 11 - 11
example/ios/Podfile.lock

@@ -1,7 +1,7 @@
 PODS:
   - boost (1.83.0)
-  - ComPDFKit (2.1.0)
-  - ComPDFKit_Tools (2.1.0)
+  - ComPDFKit (2.1.1)
+  - ComPDFKit_Tools (2.1.1)
   - DoubleConversion (1.1.6)
   - FBLazyVector (0.74.0)
   - fmt (9.1.0)
@@ -937,7 +937,7 @@ PODS:
   - React-Mapbuffer (0.74.0):
     - glog
     - React-debug
-  - react-native-compdfkit-pdf (2.1.0):
+  - react-native-compdfkit-pdf (2.1.1):
     - ComPDFKit
     - ComPDFKit_Tools
     - DoubleConversion
@@ -1195,8 +1195,8 @@ PODS:
 
 DEPENDENCIES:
   - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
-  - ComPDFKit (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.0.podspec`)
-  - ComPDFKit_Tools (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.0.podspec`)
+  - ComPDFKit (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.1.podspec`)
+  - ComPDFKit_Tools (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.1.podspec`)
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
   - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
   - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
@@ -1263,9 +1263,9 @@ EXTERNAL SOURCES:
   boost:
     :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
   ComPDFKit:
-    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.0.podspec
+    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/2.1.1.podspec
   ComPDFKit_Tools:
-    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.0.podspec
+    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/2.1.1.podspec
   DoubleConversion:
     :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
   FBLazyVector:
@@ -1380,8 +1380,8 @@ EXTERNAL SOURCES:
 
 SPEC CHECKSUMS:
   boost: d3f49c53809116a5d38da093a8aa78bf551aed09
-  ComPDFKit: b7f157601f8210a4fd70ef795dde4d575c4d8816
-  ComPDFKit_Tools: f2f61c2667cf1a5e6975e17c69f6bd3b7fc1620a
+  ComPDFKit: 9a2cd472f860baeb8abd9fbe5e72248f26174326
+  ComPDFKit_Tools: 79e7e24dd8cfde7e674bb4652ea479019e4b2152
   DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
   FBLazyVector: 026c8f4ae67b06e088ae01baa2271ef8a26c0e8c
   fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
@@ -1411,7 +1411,7 @@ SPEC CHECKSUMS:
   React-jsitracing: 36a2bbc272300313653d980de5ab700ec86c534a
   React-logger: 03f2f7b955cfe24593a2b8c9705c23e142d1ad24
   React-Mapbuffer: 5e05d78fe6505f4a054b86f415733d4ad02dd314
-  react-native-compdfkit-pdf: d2236a5ff1525a060b7fc66d97dcbeb24e3a6de7
+  react-native-compdfkit-pdf: 619a3a75779511e476168fac3d3c6d93495b5cc4
   react-native-document-picker: 5b97e24a7f1a1e4a50a72c540a043f32d29a70a2
   React-nativeconfig: 951ec32f632e81cbd7d40aebb3211313251c092e
   React-NativeModulesApple: 0b3a42ca90069119ef79d8b2327d01441d71abd4
@@ -1439,6 +1439,6 @@ SPEC CHECKSUMS:
   SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
   Yoga: ff1d575b119f510a5de23c22a794872562078ccf
 
-PODFILE CHECKSUM: 2283198e82f639436b8094e3fb4ee1818b890696
+PODFILE CHECKSUM: e3e4c4b15a207a99f45a1660f89adf26240b1766
 
 COCOAPODS: 1.15.2

+ 2 - 2
example/package.json

@@ -1,7 +1,7 @@
 {
   "name": "@compdfkit_pdf_sdk/react_native-example",
-  "version": "2.1.0",
-  "versionCode": "7",
+  "version": "2.1.1",
+  "versionCode": "8",
   "private": true,
   "scripts": {
     "android": "react-native run-android",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@compdfkit_pdf_sdk/react_native",
-  "version": "2.1.0",
+  "version": "2.1.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",