Skip to content

Commit ff02b91

Browse files
author
PSPDFKit
committed
Release 2.0.3
1 parent 355f3a7 commit ff02b91

File tree

12 files changed

+2950
-2003
lines changed

12 files changed

+2950
-2003
lines changed

Diff for: CHANGELOG.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
## Newest Release
22

3-
### 2.0.2 - 22 Oct 2021
3+
### 2.0.3 - 02 Nov 2021
44

5-
- Update to PSPDFKit for Android 8.
6-
- PSPDFKit now requires React Native 0.66.0 or later. (#31348)
5+
- PSPDFKit now requires React Native 0.66.1 or later. (#31744)
6+
- Updates for PSPDFKit 8.0.1 for Android. (#31744)
7+
- Updates for PSPDFKit 11.1 for iOS. (#31654)
8+
- Improves the repository's README. (#31633)
79

810
## Previous Releases
911

12+
### 2.0.2 - 07 Oct 2021
13+
14+
- Update to PSPDFKit for Android 8.
15+
- PSPDFKit now requires React Native 0.66.0 or later. (#31348)
16+
1017
### 2.0.1 - 05 Oct 2021
1118

1219
- Re-add Java 8 language features. (#31288)

Diff for: README.md

+36-49
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## React Native Library for PSPDFKit for iOS, Android & Windows UWP. (PDF SDK for React Native)
1+
# React Native Library for PSPDFKit for iOS, Android & Windows UWP. (PDF SDK for React Native)
22

33
![PDF SDK for React Native](https://github.com/PSPDFKit/react-native/blob/master/article-header.png?raw=true)
44

@@ -8,7 +8,7 @@ PSPDFKit for React Native exposes the most often used APIs from PSPDFKit. Many o
88

99
Windows is not currently supported, please use the previous version [1.24.9](https://github.com/PSPDFKit/react-native/releases/tag/1.24.9) instead.
1010

11-
#### Announcements
11+
### Announcements
1212

1313
- [Announcement blog post](https://pspdfkit.com/blog/2016/react-native-module/)
1414
- [React Native UI Component for iOS](https://pspdfkit.com/blog/2018/react-native-ui-component-for-ios/) ([See iOS](https://github.com/PSPDFKit/react-native#ios))
@@ -22,13 +22,13 @@ Windows is not currently supported, please use the previous version [1.24.9](htt
2222
- [How to Bridge Native iOS Code to React Native](https://pspdfkit.com/blog/2020/how-to-bridge-native-ios-code-to-react-native/)
2323
- [How to Open a PDF in React Native Using the Document Picker](https://pspdfkit.com/blog/2021/how-to-open-a-pdf-in-react-native-using-the-document-browser/)
2424

25-
#### PSPDFKit
25+
### PSPDFKit
2626

2727
The [PSPDFKit SDK](https://pspdfkit.com/) is a framework that allows you to view, annotate, sign, and fill PDF forms on iOS, Android, Windows, macOS, and Web.
2828

2929
[PSPDFKit Instant](https://pspdfkit.com/instant) adds real-time collaboration features to seamlessly share, edit, and annotate PDF documents.
3030

31-
## Support, Issues and License Questions
31+
# Support, Issues and License Questions
3232

3333
PSPDFKit offers support for customers with an active SDK license via https://pspdfkit.com/support/request/
3434

@@ -49,15 +49,15 @@ To set the license key for the currently running platform, use:
4949
PSPDFKit.setLicenseKey("YOUR_REACT_NATIVE_LICENSE_KEY_GOES_HERE");
5050
```
5151

52-
### iOS
52+
## iOS
5353

54-
#### Requirements
54+
### Requirements
5555

5656
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI)
5757
- The [latest stable version of Xcode](https://apps.apple.com/us/app/xcode/id497799835?mt=12)
5858
- The [latest stable version of CocoaPods](https://github.com/CocoaPods/CocoaPods/releases). If you don’t already have CocoaPods installed, follow the [CocoaPods installation guide](https://guides.cocoapods.org/using/getting-started.html#installation) to install CocoaPods on your Mac.
5959

60-
#### Getting Started
60+
### Getting Started
6161

6262
Let's create a simple app that integrates PSPDFKit and uses the `react-native-pspdfkit` module.
6363

@@ -211,7 +211,7 @@ Let's create a simple app that integrates PSPDFKit and uses the `react-native-ps
211211
react-native run-ios
212212
```
213213

214-
### Usage
214+
## Usage
215215

216216
There are 2 different ways on how to use PSPDFKit for React Native on iOS.
217217

@@ -220,7 +220,7 @@ There are 2 different ways on how to use PSPDFKit for React Native on iOS.
220220

221221
Depending on your needs you might want to use one or the other.
222222

223-
### Native Module
223+
## Native Module
224224

225225
Using the Native Module `PSPDFKit.present()`, you can present a document with PSPDFKit modally in fullscreen.
226226
You can specify the path to the document you want to present, and [configuration options](#configuration).
@@ -250,7 +250,7 @@ export default class App extends Component<{}> {
250250
}
251251
```
252252

253-
### Native UI Component
253+
## Native UI Component
254254

255255
With `PSPDFKitView` you can use PSPDFKit like any other React component in your app.
256256
Using this approach, you have more flexibility over how a document is presented and displayed.
@@ -283,7 +283,7 @@ export default class App extends Component<{}> {
283283
}
284284
```
285285

286-
#### Configuration
286+
### Configuration
287287

288288
You can configure the presentation with a configuration dictionary which is a mirror of the [`PSPDFConfiguration`](https://pspdfkit.com/api/ios/Classes/PSPDFConfiguration.html) class.
289289

@@ -310,21 +310,21 @@ Example - Native UI Component:
310310
/>
311311
```
312312

313-
#### Running the Catalog Project
313+
### Running the Catalog Project
314314

315315
Take a look at the [instructions to get started here](/samples/Catalog/README.md#running-the-catalog-on-ios).
316316

317-
#### Running the Native Catalog
317+
### Running the Native Catalog
318318

319319
Take a look at the [instructions to get started here](/samples/NativeCatalog/README.md#running-this-sample-on-ios).
320320

321-
#### Running on Mac Catalyst
321+
### Running on Mac Catalyst
322322

323323
Using PSPDFKit for React Native on Mac Catalyst does not currently work due to a [Flipper and FlipperKit issue](https://github.com/facebook/react-native/issues/28810).
324324

325325
If you wish to run your project on Mac Catalyst, please try the [following workaround which removes everything related to Flipper and FlipperKit](https://github.com/facebook/react-native/issues/28810#issuecomment-623357732).
326326

327-
#### Configuration Mapping
327+
### Configuration Mapping
328328

329329
On iOS, PSPDFKit for React Native iOS maps most configuration options available in `PSPDFConfiguration` from JSON. Please refer to [`RCTConvert+PSPDFConfiguration.m`](./ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFConfiguration.m#L267) for the complete list and for the exact naming of enum values.
330330

@@ -334,7 +334,7 @@ Annotations are mapped based on their type name. This is case sensitive. For exa
334334
editableAnnotationTypes: ["Ink", "Highlight"];
335335
```
336336

337-
#### Menu Item Mapping
337+
### Menu Item Mapping
338338

339339
On iOS, PSPDFKit for React Native allows you to specify a custom grouping for the annotation creation toolbar. Please refer to [`RCTConvert+PSPDFAnnotationToolbarConfiguration.m`](./ios/RCTPSPDFKit/Converters/RCTConvert+PSPDFAnnotationToolbarConfiguration.m#L47) for the complete list of menu items. To set them just specify the `menuItemGrouping` prop on the `PSPDFKitView`. The format used is as follows:
340340

@@ -346,7 +346,7 @@ On iOS, PSPDFKit for React Native allows you to specify a custom grouping for th
346346
]
347347
```
348348

349-
#### Customize the Toolbar Buttons
349+
### Customize the Toolbar Buttons
350350

351351
You can customize the toolbar buttons on the Native UI View component by specifying the toolbar buttons using `setLeftBarButtonItems` and `setRightBarButtonItems`, like so:
352352

@@ -364,7 +364,7 @@ Also, please take a look at the [ToolbarCustomization example from our Catalog a
364364

365365
For a more detailed description of toolbar customizations, refer to our Customizing the Toolbar guide for [iOS](https://pspdfkit.com/guides/ios/current/customizing-the-interface/customizing-the-toolbar/) and [Android](https://pspdfkit.com/guides/android/current/customizing-the-interface/customizing-the-toolbar/).
366366

367-
#### Process Annotations
367+
### Process Annotations
368368

369369
PSPDFKit for React Native allows you to create a new document with processed (embedded, flattenned, removed, or printed) annotations on Android and iOS using the `PSPDFKit.processAnnotations(annotationChange, annotationType, sourceDocumentPath, processedDocumentPath)` function. In the snippet below, we add a button which flattens all the annotations of the document from the currently displayed `PSPDFKitView` in a newly processed PDF file:
370370

@@ -416,16 +416,16 @@ PSPDFKit for React Native allows you to create a new document with processed (em
416416

417417
For a runnable example, please take a look at the [AnnotationProcessing example from our Catalog app](./samples/Catalog/Catalog.ios.js#L1032).
418418

419-
### Android
419+
## Android
420420

421-
#### Requirements
421+
### Requirements
422422

423423
- A [development environment](https://reactnative.dev/docs/environment-setup) for running React Native projects using the React Native CLI (not the Expo CLI)
424424
- The [latest stable version of Android Studio](https://developer.android.com/studio)
425425
- The [Android NDK](https://developer.android.com/studio/projects/install-ndk)
426426
- An [Android Virtual Device](https://developer.android.com/studio/run/managing-avds.html) or a hardware device
427427

428-
#### Getting Started
428+
### Getting Started
429429

430430
Let's create a simple app that integrates PSPDFKit and uses the `react-native-pspdfkit` module.
431431

@@ -555,29 +555,29 @@ Let's create a simple app that integrates PSPDFKit and uses the `react-native-ps
555555
react-native run-android
556556
```
557557

558-
#### Running the Catalog Project
558+
### Running the Catalog Project
559559

560560
Take a look at the [instructions to get started here](/samples/Catalog/README.md#running-the-catalog-on-android).
561561

562-
#### Running the Native Catalog
562+
### Running the Native Catalog
563563

564564
Take a look at the [instructions to get started here](/samples/NativeCatalog/README.md#running-this-sample-on-android).
565565

566-
#### Configuration
566+
### Configuration
567567

568-
##### Upload PDF to device
568+
#### Upload PDF to device
569569

570570
To copy a pdf document to your local device storage:
571571

572572
```bash
573573
adb push "document.pdf" "/sdcard/document.pdf"
574574
```
575575

576-
##### Bundle PDF inside the APK's assets
576+
#### Bundle PDF inside the APK's assets
577577

578578
To bundle a pdf document in the Android app, simply copy it the Android `assets` folder, for the Catalog app is `samples/PDFs`.
579579

580-
##### Viewer options
580+
#### Viewer options
581581

582582
You can configure the builder with a dictionary representation of the PSPDFConfiguration object. Check [`ConfigurationAdapter.java`](https://github.com/PSPDFKit/react-native/blob/master/android/src/main/java/com/pspdfkit/react/ConfigurationAdapter.java) for all the parameters available.
583583

@@ -592,15 +592,15 @@ const CONFIGURATION = {
592592
};
593593
```
594594

595-
#### Native UI Component
595+
### Native UI Component
596596

597597
Just like on iOS we also support integrating PSPDFKit directly into the react-native view hierarchy. There are a few thing you need to consider when using this approach:
598598

599599
- Your activity hosting the react component needs to extend from `ReactFragmentActivity`.
600600
- Because of [issues](https://github.com/facebook/react-native/issues/17968) in react-native our `PdfView` needs to call `layout` and `dispatchOnGlobalLayout` on every frame, this might negatively affect your apps performance or even cause it to misbehave.
601601
- `PSPDFKitView` doesn't yet support all the features (outline, bookmarks, thubmnail grid, view settings) using `PSPDFKit.present` provides.
602602

603-
##### Menu Item Mapping
603+
#### Menu Item Mapping
604604

605605
On Android, PSPDFKit for React Native allows you to specify a custom grouping for the annotation creation toolbar. Please refer to [`ReactGroupingRule.java`](https://github.com/PSPDFKit/react-native/blob/master/android/src/main/java/com/pspdfkit/react/menu/ReactGroupingRule.java) for the complete list of menu items. To set them just specify the `menuItemGrouping` prop on the `PSPDFKitView`. The format used is as follows:
606606

@@ -612,12 +612,12 @@ On Android, PSPDFKit for React Native allows you to specify a custom grouping fo
612612
]
613613
```
614614

615-
#### Update
615+
### Update
616616

617617
Upgrading yarn's lock file is required in order to update react-native-pspdfkit module in a project that has been already setup following the steps in [Getting Started](#getting-started-1) section.
618618
From root project folder (e.g.`YourApp` for upgrading example project) launch `yarn upgrade`.
619619

620-
##### Migrate from PSPDFKit version 2.9.x to 3.0.0
620+
#### Migrate from PSPDFKit version 2.9.x to 3.0.0
621621

622622
After launching `yarn upgrade`, apply [step 7](#step-7), [step 10](#step-10) and [step 12](#step-12) from [Getting Started](#getting-started-1) section.
623623
Enable MultiDex in `YourApp/android/app/build.gradle` (note **one** place to edit):
@@ -651,7 +651,7 @@ In `YourApp/android/settings.gradle` remove the old reference to `pspdfkit-lib`
651651
-include ':pspdfkit-lib'
652652
```
653653

654-
##### Migrate from PSPDFKit version 3.3.3 to 4.0.x
654+
#### Migrate from PSPDFKit version 3.3.3 to 4.0.x
655655

656656
After launching `yarn upgrade`, apply [step 6](#step-6), [step 8](#step-8) and [step 10](#step-10) from [Getting Started](#getting-started-1) section.
657657
Enable MultiDex in `YourApp/android/app/build.gradle` (note **four** place to edit):
@@ -680,26 +680,13 @@ defaultConfig {
680680
...
681681
```
682682

683-
#### API
684-
685-
##### Constants
686-
687-
The following constants are available on the PSPDFKit export:
683+
## Windows UWP
688684

689-
- `versionString` (`String`) PSPDFKit version number.
690-
691-
##### `present(document : string, configuration : readable map) : void`
692-
693-
Shows the pdf `document` from the local device filesystem, or your app's assets.
694-
695-
- `file:///sdcard/document.pdf` will open the document from local device filesystem.
696-
- `file:///android_asset/document.pdf` will open the document from your app's assets.
697-
698-
`configuration` can be empty `{}`.
685+
Windows UWP is not currently supported on `master`, please follow the integration steps on the [`windows-support`](https://github.com/PSPDFKit/react-native/tree/windows-support#windows-uwp) branch.
699686

700-
### Windows UWP
687+
# Troubleshooting
701688

702-
Windows UWP is not currently supported on `master`, please follow the integration steps on the [`windows-support`](https://github.com/PSPDFKit/react-native/tree/windows-support#windows-uwp) branch.
689+
For Troubleshooting common issues you might encounter when setting up PSPDFKit for React Native, please refer to the [Troubleshooting](https://pspdfkit.com/guides/react-native/troubleshoot/) section.
703690

704691
## License
705692

Diff for: android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Contains gradle configuration constants
1616
*/
1717
ext {
18-
PSPDFKIT_VERSION = '8.0.0'
18+
PSPDFKIT_VERSION = '8.0.1'
1919
}
2020

2121
buildscript {

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-pspdfkit",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "React Native PDF Library by PSPDFKit",
55
"keywords": [
66
"react native",
@@ -23,7 +23,7 @@
2323
"peerDependencies": {
2424
"prop-types": "^15.7.2",
2525
"react": "^17.0.2",
26-
"react-native": "^0.66.0"
26+
"react-native": "^0.66.1"
2727
},
2828
"dependencies": {},
2929
"devDependencies": {

Diff for: samples/Catalog/ios/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ target 'Catalog' do
1616
inherit! :complete
1717
# Pods for testing
1818
end
19-
pod 'PSPDFKit', podspec: 'https://customers.pspdfkit.com/pspdfkit-ios/latest.podspec'
19+
pod 'PSPDFKit', '~> 11.1.0'
2020
# Enables Flipper.
2121
#
2222
# Note that if you have use_frameworks! enabled, Flipper will not work and

0 commit comments

Comments
 (0)