Skip to content

Commit e4129c5

Browse files
author
PSPDFKit
committed
Release 4.0.0
1 parent 6e9787c commit e4129c5

File tree

97 files changed

+12929
-982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+12929
-982
lines changed

ACKNOWLEDGEMENTS.md

+90
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,36 @@ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
461461
OTHER DEALINGS IN THE FONT SOFTWARE.
462462

463463

464+
--------------------------------------------------------------------------------
465+
// Copyright 2015 The Chromium Authors
466+
//
467+
// Redistribution and use in source and binary forms, with or without
468+
// modification, are permitted provided that the following conditions are
469+
// met:
470+
//
471+
// * Redistributions of source code must retain the above copyright
472+
// notice, this list of conditions and the following disclaimer.
473+
// * Redistributions in binary form must reproduce the above
474+
// copyright notice, this list of conditions and the following disclaimer
475+
// in the documentation and/or other materials provided with the
476+
// distribution.
477+
// * Neither the name of Google LLC nor the names of its
478+
// contributors may be used to endorse or promote products derived from
479+
// this software without specific prior written permission.
480+
//
481+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
482+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
483+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
484+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
485+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
486+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
487+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
488+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
489+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
490+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
491+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
492+
493+
464494
--------------------------------------------------------------------------------
465495
## clipper2 (http://www.angusj.com/delphi/clipper.php)
466496

@@ -1786,6 +1816,36 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
17861816
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17871817

17881818

1819+
--------------------------------------------------------------------------------
1820+
Copyright 2006 Google Inc. All Rights Reserved.
1821+
Author: [email protected] (Adam Langley)
1822+
1823+
Copyright (C) 2006 Google Inc.
1824+
1825+
Licensed under the Apache License, Version 2.0 (the "License");
1826+
you may not use this file except in compliance with the License.
1827+
You may obtain a copy of the License at
1828+
1829+
http://www.apache.org/licenses/LICENSE-2.0
1830+
1831+
Unless required by applicable law or agreed to in writing, software
1832+
distributed under the License is distributed on an "AS IS" BASIS,
1833+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1834+
See the License for the specific language governing permissions and
1835+
limitations under the License.
1836+
1837+
This software is a description of processes which may be patented.
1838+
1839+
Use of this software may require patent licenses in some countries.
1840+
You are directed to annex I of the JBIG2 specification for information.
1841+
1842+
Some information could be found at:
1843+
http://www.jpeg.org/jbig/index.html
1844+
http://www.cl.cam.ac.uk/~mgk25/jbigkit/patents/
1845+
http://www.jpeg.org/public/fcd14492.pdf
1846+
http://itscj.ipsj.or.jp/sc29/open/29view/29n55161.doc
1847+
1848+
17891849
--------------------------------------------------------------------------------
17901850
## koin (https://github.com/InsertKoinIO/koin)
17911851

@@ -3068,6 +3128,36 @@ I, Matt McCutchen, the sole author of the original Big Integer Library, waive my
30683128
copyright to it, placing it in the public domain. The library comes with
30693129
absolutely no warranty.
30703130

3131+
--------------------------------------------------------------------------------
3132+
MIT License
3133+
3134+
Copyright (c) 2021 The fast_float authors
3135+
3136+
Permission is hereby granted, free of charge, to any
3137+
person obtaining a copy of this software and associated
3138+
documentation files (the "Software"), to deal in the
3139+
Software without restriction, including without
3140+
limitation the rights to use, copy, modify, merge,
3141+
publish, distribute, sublicense, and/or sell copies of
3142+
the Software, and to permit persons to whom the Software
3143+
is furnished to do so, subject to the following
3144+
conditions:
3145+
3146+
The above copyright notice and this permission notice
3147+
shall be included in all copies or substantial portions
3148+
of the Software.
3149+
3150+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
3151+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
3152+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
3153+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
3154+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3155+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3156+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
3157+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3158+
DEALINGS IN THE SOFTWARE.
3159+
3160+
30713161
--------------------------------------------------------------------------------
30723162
## FreeType (www.freetype.org)
30733163

CHANGELOG.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
## Newest Release
22

3+
### 4.0.0 - 01 Nov 2024
4+
5+
- Adds Pigeon for communication between Flutter and native iOS and Android platforms. (J#HYB-455)
6+
- Fixes issue where annotation preset configurations are not applied to some annotation tools. (J#HYB-185)
7+
- Fixes inconsistency in the `applyInstantJson` method parameter type. It now accepts a string on both iOS and Android. (#45541)
8+
- Updates for Nutrient Android SDK 2024.6.1. (#45458)
9+
- Updates for Nutrient iOS SDK 14.1.1. (#45458)
10+
- Updates for Nutrient Web SDK 2024.7.0. (#45458)
11+
12+
## Previous Releases
13+
14+
### 3.12.0 - 30 Jul 2024
15+
316
### 3.12.1 - 11 Sep 2024
417

518
- Updates for PSPDFKit 2024.5.1 for Android. (J#HYB-506)
@@ -8,8 +21,6 @@
821
- Fixes an issue where some annotation toolbar items are not displayed when custom grouping is used. (J#HYB-440)
922
- Fixes an issue where `onDocumentLoaded` is triggered multiple times. (J#HYB-494)
1023

11-
## Previous Releases
12-
1324
### 3.12.0 - 30 Jul 2024
1425

1526
- Adds `zoomToRect` and `getVisibleRect` APIs to `PspdfkitWidgetController`. (J#HYB-429)

README.md

+52-52
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# Flutter PDF Library by PSPDFKit
1+
# Flutter PDF Library by Nutrient
22

3-
![Flutter Intro](screenshots/flutter-intro.png)
3+
![Flutter Intro](screenshots/flutter.png)
44

5-
PSPDFKit for Flutter is an SDK for viewing, annotating, and editing PDFs. It offers developers the ability to quickly add PDF functionality to any Flutter application. It is available at [pub.dev](https://pub.dev/packages/pspdfkit_flutter) and [GitHub](https://github.com/PSPDFKit/pspdfkit-flutter).
5+
Nutrient Flutter SDK is for viewing, annotating, and editing PDFs. It offers developers the ability to quickly add PDF functionality to any Flutter application. It is available at [pub.dev][pub_dev] and [GitHub][github].
66

77
If you are new to Flutter, make sure to check our Flutter blog posts:
88

9-
- [How I Got Started With Flutter](https://pspdfkit.com/blog/2018/starting-with-flutter/).
10-
- [Getting Started with Flutter PDF Library by PSPDFKit](https://pspdfkit.com/blog/2019/getting-started-with-pspdfkit-flutter/).
11-
- [Opening a PDF in Flutter](https://pspdfkit.com/blog/2019/opening-a-pdf-in-flutter/).
12-
- [How to Bridge Native iOS Code to Flutter](https://pspdfkit.com/blog/2021/how-to-bridge-native-ios-code-to-flutter/).
13-
- [How to Customize Our Flutter PDF SDK for Android](https://pspdfkit.com/blog/2021/how-to-customize-our-flutter-pdf-sdk/).
14-
- [Advances in Hybrid Technologies](https://pspdfkit.com/blog/2019/advances-in-hybrid-technologies/).
15-
- [How We Maintain Our Public Flutter Project Using a Private Monorepo](https://pspdfkit.com/blog/2021/maintaining-open-source-repo-from-monorepo/).
16-
- [How to Download and Display a PDF Document in Flutter with PSPDFKit](https://pspdfkit.com/blog/2022/download-and-display-pdf-in-flutter-with-pspdfkit/).
9+
- [Getting Started with Flutter PDF Library by Nutrient][blog_getting_started_with_pspdfkit_flutter].
10+
- [Opening a PDF in Flutter][blog_opening_a_pdf_in_flutter].
11+
- [How to Customize Our Flutter PDF SDK][blog_customize_flutter_pdf_sdk_android].
12+
- [Advances in Hybrid Technologies][blog_advances_in_hybrid_technologies].
13+
- [How We Maintain Our Public Flutter Project Using a Private Monorepo][blog_maintaining_open_source_repo_from_monorepo].
14+
- [How to Download and Display a PDF Document in Flutter with Nutrient][blog_download_display_pdf_in_flutter_with_pspdfkit].
1715

18-
For our quick-start guides, [check out our website](https://pspdfkit.com/getting-started/mobile/?frontend=flutter).
16+
For our quick-start guides, [check out our website][quick_start_guides].
17+
18+
Platform specific README exists for [Android][android_readme] and [iOS][ios_readme].
1919

20-
Platform specific README exists for [Android](android/) and [iOS](ios/).
2120

2221
# Setup
2322

@@ -153,7 +152,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
153152
- jvmTarget = '1.8'
154153
+ jvmTarget = '17'
155154
}
156-
...
155+
...
157156
}
158157
```
159158
6. Add the AppCompat AndroidX library to your `android/app/build.gradle` file:
@@ -184,14 +183,14 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
184183
Alternatively you can update the `AndroidManifest.xml` file to use `FlutterAppCompatActivity` as the launcher activity:
185184
186185
```diff
187-
<activity
188-
- android:name=".MainActivity"
189-
+ android:name="io.flutter.embedding.android.FlutterAppCompatActivity"
190-
android:launchMode="singleTop"
191-
android:theme="@style/LaunchTheme"
192-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
193-
android:hardwareAccelerated="true"
194-
android:windowSoftInputMode="adjustResize"
186+
<activity
187+
- android:name=".MainActivity"
188+
+ android:name="io.flutter.embedding.android.FlutterAppCompatActivity"
189+
android:launchMode="singleTop"
190+
android:theme="@style/LaunchTheme"
191+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
192+
android:hardwareAccelerated="true"
193+
android:windowSoftInputMode="adjustResize"
195194
android:exported="true">
196195
```
197196
**NOTE:** <code>FlutterAppCompatActivity</code> isn’t an official part of the Flutter SDK. It’s a custom <code>Activity</code> that extends <code>AppCompatActivity</code> from the AndroidX AppCompat library, and it’s necessary to use PSPDFKit for Android with Flutter. You can read more about this in the [AppCompatActivity Migration][] guide.
@@ -287,7 +286,7 @@ Platform specific README exists for [Android](android/) and [iOS](ios/).
287286
288287
PSPDFKit for Web library files are distributed as an archive that can be extracted manually.
289288
290-
1. <a href="https://my.pspdfkit.com/download/web/latest" target="_blank" rel="noreferrer">Download the framework here</a>. The download will start immediately and will save a `.tar.gz` archive like `PSPDFKit-Web-binary-<%= latest_version(:web) %>.tar.gz` to your computer.
289+
1. <a href="https://my.nutrient.io/download/web/latest" target="_blank" rel="noreferrer">Download the framework here</a>. The download will start immediately and will save a `.tar.gz` archive like `PSPDFKit-Web-binary-<%= latest_version(:web) %>.tar.gz` to your computer.
291290
292291
2. Once the download is complete, extract the archive and copy the **entire** contents of its `dist` folder to your project’s `web/assets` folder or any other folder of your choice inside the web subfolder.
293292
@@ -312,49 +311,50 @@ To see PSPDFKit for Flutter in action check out our [Flutter example app](exampl
312311
313312
Showing a PDF document inside your Flutter app is as simple as this:
314313
315-
```dart
314+
```dart
316315
PspdfkitWidget(documentPath: 'file:///path/to/Documentpdf')
317-
```
316+
```
318317
319-
# Upgrading to a Full PSPDFKit License Key
318+
# Upgrading to a Full Nutrient License Key
320319
321-
PSPDFKit is a commercial product and requires the purchase of a license key when used in production. By default, this library will
322-
initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
320+
Nutrient is a commercial product and requires the purchase of a license key when used in production. By default, this library will initialize in demo mode, placing a watermark on each PDF and limiting usage to 60 minutes.
323321
324-
To purchase a license for production use, please reach out to us via https://pspdfkit.com/sales/form/.
322+
To purchase a license for production use, please reach out to us via [contact_sales].
325323
326-
To initialize PSPDFKit using a license key, call either of the following before using any other PSPDFKit APIs or features:
324+
To initialize Nutrient using a license key, call either of the following before using any other Nutrient APIs or features:
327325
328326
To set the license key for both Android and iOS, use:
329-
```
330-
await Pspdfkit.setLicenseKeys("YOUR_FLUTTER_ANDROID_LICENSE_KEY_GOES_HERE", "YOUR_FLUTTER_IOS_LICENSE_KEY_GOES_HERE");
331-
```
332-
333-
To set the license key for the currently running platform, use:
334-
```
335-
await Pspdfkit.setLicenseKey("YOUR_FLUTTER_LICENSE_KEY_GOES_HERE");
327+
```dart
328+
await Pspdfkit.initialize(
329+
androidLicenseKey:"YOUR_FLUTTER_ANDROID_LICENSE_KEY_GOES_HERE",
330+
iosLicenseKey:"YOUR_FLUTTER_IOS_LICENSE_KEY_GOES_HERE",
331+
webLicenseKey: "YOUR_FLUTTER_WEB_LICENSE_KEY_GOES_HERE"
332+
);
336333
```
337334
338335
# Migrating from Previous Version
339336
340-
To upgrade PSPDFKit for Flutter in your app, please refer to the [Upgrade and Migration Guides][flutter upgrade] section.
337+
To upgrade Nutrient for Flutter in your app, please refer to the [Upgrade and Migration Guides][flutter_upgrade] section.
341338
342339
# Troubleshooting
343340
344-
For Troubleshooting common issues you might encounter when setting up PSPDFKit for Flutter, please refer to the [Troubleshooting][] section.
345-
341+
For Troubleshooting common issues you might encounter when setting up Nutrient for Flutter, please refer to the [Troubleshooting][troubleshooting] section.
346342
347343
<!-- References -->
348344
349-
[install-flutter]: https://flutter.dev/docs/get-started/install
350-
[android studio]: https://developer.android.com/studio
351-
[install ndk]: https://developer.android.com/studio/projects/install-ndk
352-
[managing avds]: https://developer.android.com/studio/run/managing-avds.html
353-
[xcode]: https://apps.apple.com/us/app/xcode/id497799835?mt=12
354-
[cocoapods releases]: https://github.com/CocoaPods/CocoaPods/releases
355-
[start-the-emulator]: https://developer.android.com/studio/run/emulator#runningemulator
356-
[flutter upgrade]: https://pspdfkit.com/guides/flutter/upgrade/
357-
[troubleshooting]: https://pspdfkit.com/guides/flutter/troubleshoot/
358-
[appcompatactivity migration]: https://pspdfkit.com/guides/flutter/troubleshooting/pspdfkit-widget-appcompat-activity-issue/
359-
[appearance styling]: /guides/android/customizing-the-interface/appearance-styling
360-
[chrome]: https://www.google.com/chrome/
345+
[pub_dev]: https://pub.dev/packages/pspdfkit_flutter
346+
[github]: https://github.com/PSPDFKit/pspdfkit-flutter
347+
[blog_starting_with_flutter]: https://nutrient.io/blog/2018/starting-with-flutter/
348+
[blog_getting_started_with_pspdfkit_flutter]: https://nutrient.io/blog/getting-started-with-pspdfkit-flutter/
349+
[blog_opening_a_pdf_in_flutter]: https://nutrient.io/blog/opening-a-pdf-in-flutter/
350+
[blog_customize_flutter_pdf_sdk_android]: https://www.nutrient.io/guides/flutter/customize/?
351+
[blog_advances_in_hybrid_technologies]: https://nutrient.io/blog/advances-in-hybrid-technologies/
352+
[blog_maintaining_open_source_repo_from_monorepo]: https://nutrient.io/blog/maintaining-open-source-repo-from-monorepo/
353+
[blog_download_display_pdf_in_flutter_with_pspdfkit]: https://nutrient.io/blog/download-and-display-pdf-in-flutter-with-pspdfkit/
354+
[quick_start_guides]: https://nutrient.io/getting-started/mobile/?frontend=flutter
355+
[android_readme]: android/
356+
[ios_readme]: ios/
357+
[contact_sales]: https://nutrient.io/sdk/contact-sales
358+
[flutter_upgrade]: https://nutrient.io/guides/flutter/upgrade/
359+
[troubleshooting]: https://nutrient.io/guides/flutter/troubleshoot/
360+
[appcompatactivity_migration]: https://nutrient.io/guides/flutter/troubleshooting/pspdfkit-widget-appcompat-activity-issue/

android/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ android {
5656
}
5757

5858
dependencies {
59-
implementation 'androidx.appcompat:appcompat:1.6.1'
59+
implementation 'androidx.appcompat:appcompat:1.7.0'
6060
implementation "com.pspdfkit:$pspdfkitMavenModuleName:$pspdfkitVersion"
6161
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
6262
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
63-
implementation "androidx.compose.material:material:1.6.5"
64-
implementation "androidx.compose.material:material:1.6.3"
65-
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
66-
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
67-
implementation "androidx.compose.foundation:foundation:1.6.3"
68-
implementation "androidx.compose.ui:ui:1.6.3"
63+
implementation "androidx.compose.material:material:1.7.5"
64+
implementation "androidx.compose.material:material:1.7.5"
65+
implementation "androidx.constraintlayout:constraintlayout:2.2.0"
66+
implementation "androidx.constraintlayout:constraintlayout-compose:1.1.0"
67+
implementation "androidx.compose.foundation:foundation:1.7.5"
68+
implementation "androidx.compose.ui:ui:1.7.5"
6969
}

android/config.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {
3838

3939
ext.pspdfkitVersion = localProperties.getProperty('pspdfkit.version')
4040
if (pspdfkitVersion == null || pspdfkitVersion == '') {
41-
ext.pspdfkitVersion = '2024.5.1'
41+
ext.pspdfkitVersion = '2024.6.1'
4242
}
4343

4444
ext.pspdfkitMavenModuleName = 'pspdfkit'

0 commit comments

Comments
 (0)