Skip to content

Commit

Permalink
Release 2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PSPDFKit committed Jun 19, 2023
1 parent 049ac9d commit ee492db
Show file tree
Hide file tree
Showing 21 changed files with 383 additions and 375 deletions.
6 changes: 3 additions & 3 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
"endOfLine": "auto",
"printWidth": 80,
"tabWidth": 2,
endOfLine: 'auto',
printWidth: 80,
tabWidth: 2,
};
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
## Newest Release

### 2.6.1 - 19 Jun 2023

- Updates for PSPDFKit 8.7.3 for Android. (#40880)
- Updates for PSPDFKit 12.3 for iOS. (##40880)
- Fixes issue when showThumbnailBar is set to pinned (#40807)

## Previous Releases

### 2.6.0 - 05 Jun 2023

- Adds measurement tools configurations (#40296)
- Updates for PSPDFKit 8.7.2 for Android. (#40697)
- Updates for PSPDFKit 12.2 for iOS. (#40697)
- Fixes annotation tools subgroups selection with menuItem grouping customization (#40593)

## Previous Releases

### 2.5.2 - 13 Apr 2023

- Fixes missing RXJava dependencies for Android. (#39813)

### 2.5.1 - 03 Apr 2023

- Updated NativeCatalog configuration and replaced deprecated AppDelegate.m
- Bumps PSPDFKit for Android version to 8.6.0

### 2.5.0 - 23 Mar 2023

- Added magic ink tool for Android annotation toolbar configuration. (#39174)
- Upgrades React Native dependencies and project configuration to 0.71.2
- Adds Instant JSON for React Native
Expand All @@ -24,20 +34,22 @@
- PSPDFKit now requires React Native 0.71.0 or later.

### 2.4.2 - 01 Feb 2023

- Fixes bug issue for deleting multiple annotations (#38518)
- Bump PSPDFKit for Android version to 8.5.0
- Bump PSPDFKit for iOS version to 12.0.3
- Bump minimum SDK version compileSdkVersion to API 33

### 2.4.1 - 22 Nov 2022

- Updates for PSPDFKit 12.0.1 for iOS.
- Fixes Catalog example toolbar menu items not rendering. (#37368)
- Fixes the Annotation Processing Catalog example. (#37534)

### 2.4.0 - 25 Oct 2022

- Adds PDF generation from HTML, images and template. (#36736)
- Updates for PSPDFKit 8.4.1 for Android
- Updates for PSPDFKit 8.4.1 for Android
- Updates for PSPDFKit 12.0 for iOS

### 2.3.1 - 22 Jul 2022
Expand Down
112 changes: 54 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,23 +180,23 @@ Let's create a simple app that integrates PSPDFKit and uses the `react-native-ps
1. Replace the entire contents of `App.js` with the following code snippet:

```js
import React, { Component } from "react";
import { Platform } from "react-native";
import PSPDFKitView from "react-native-pspdfkit";
import React, { Component } from 'react';
import { Platform } from 'react-native';
import PSPDFKitView from 'react-native-pspdfkit';

const DOCUMENT =
Platform.OS === "ios"
? "Document.pdf"
: "file:///android_asset/Document.pdf";
Platform.OS === 'ios'
? 'Document.pdf'
: 'file:///android_asset/Document.pdf';
export default class PSPDFKitDemo extends Component<{}> {
render() {
return (
<PSPDFKitView
document={DOCUMENT}
configuration={{
showThumbnailBar: "scrollable",
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
showThumbnailBar: 'scrollable',
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
}}
ref="pdfView"
fragmentTag="PDF1"
Expand Down Expand Up @@ -228,14 +228,14 @@ Using the Native Module `PSPDFKit.present()`, you can present a document with PS
You can specify the path to the document you want to present, and [configuration options](#configuration).

```javascript
import React, { Component } from "react";
import { NativeModules, Text, TouchableHighlight, View } from "react-native";
import React, { Component } from 'react';
import { NativeModules, Text, TouchableHighlight, View } from 'react-native';

export default class App extends Component<{}> {
_onPressButton() {
PSPDFKit.present("document.pdf", {
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
PSPDFKit.present('document.pdf', {
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
documentLabelEnabled: true,
});
}
Expand Down Expand Up @@ -264,21 +264,21 @@ For all the `props` that you can pass to `PSPDFKitView`, have a look at the [sou
This is how you would show a PDF as a React component:

```javascript
import React, { Component } from "react";
import { NativeModules } from "react-native";
import PSPDFKitView from "react-native-pspdfkit";
import React, { Component } from 'react';
import { NativeModules } from 'react-native';
import PSPDFKitView from 'react-native-pspdfkit';

export default class App extends Component<{}> {
render() {
return (
<PSPDFKitView
document={"document.pdf"}
document={'document.pdf'}
configuration={{
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
documentLabelEnabled: true,
}}
style={{ flex: 1, color: "#267AD4" }}
style={{ flex: 1, color: '#267AD4' }}
/>
);
}
Expand All @@ -292,22 +292,22 @@ You can configure the presentation with a configuration dictionary which is a mi
Example - Native Module:

```javascript
PSPDFKit.present("document.pdf", {
showThumbnailBar: "scrollable",
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
PSPDFKit.present('document.pdf', {
showThumbnailBar: 'scrollable',
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
});
```

Example - Native UI Component:

```javascript
<PSPDFKitView
document={"document.pdf"}
document={'document.pdf'}
configuration={{
showThumbnailBar: "scrollable",
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
showThumbnailBar: 'scrollable',
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
}}
/>
```
Expand All @@ -333,7 +333,7 @@ On iOS, PSPDFKit for React Native iOS maps most configuration options available
Annotations are mapped based on their type name. This is case sensitive. For example, to limit annotation types to ink and highlight, use this:

```javascript
editableAnnotationTypes: ["Ink", "Highlight"];
editableAnnotationTypes: ['Ink', 'Highlight'];
```

### Menu Item Mapping
Expand All @@ -354,9 +354,9 @@ You can customize the toolbar buttons on the Native UI View component by specify

```javascript
pdfView.setRightBarButtonItems(
["thumbnailsButtonItem", "searchButtonItem", "annotationButtonItem"],
"document",
false
['thumbnailsButtonItem', 'searchButtonItem', 'annotationButtonItem'],
'document',
false,
);
```

Expand All @@ -375,38 +375,38 @@ PSPDFKit for React Native allows you to create a new document with processed (em
<Button
onPress={async () => {
const processedDocumentPath =
RNFS.DocumentDirectoryPath + "/flattened.pdf";
RNFS.DocumentDirectoryPath + '/flattened.pdf';
// Delete the processed document if it already exists.
RNFS.exists(processedDocumentPath)
.then((exists) => {
.then(exists => {
if (exists) {
RNFS.unlink(processedDocumentPath);
}
})
.then(() => {
// First, save all annotations in the current document.
this.refs.pdfView.saveCurrentDocument().then((success) => {
this.refs.pdfView.saveCurrentDocument().then(success => {
if (success) {
// Then, flatten all the annotations
PSPDFKit.processAnnotations(
"flatten",
"all",
'flatten',
'all',
sourceDocumentPath,
processedDocumentPath
processedDocumentPath,
)
.then((success) => {
.then(success => {
if (success) {
// And finally, present the newly processed document with flattened annotations.
PSPDFKit.present(processedDocumentPath, {});
} else {
alert("Failed to embed annotations.");
alert('Failed to embed annotations.');
}
})
.catch((error) => {
.catch(error => {
alert(JSON.stringify(error));
});
} else {
alert("Failed to save current document.");
alert('Failed to save current document.');
}
});
});
Expand Down Expand Up @@ -524,23 +524,23 @@ Let's create a simple app that integrates PSPDFKit and uses the `react-native-ps
1. Replace the entire contents of `App.js` with the following code snippet:

```js
import React, { Component } from "react";
import { Platform } from "react-native";
import PSPDFKitView from "react-native-pspdfkit";
import React, { Component } from 'react';
import { Platform } from 'react-native';
import PSPDFKitView from 'react-native-pspdfkit';

const DOCUMENT =
Platform.OS === "ios"
? "Document.pdf"
: "file:///android_asset/Document.pdf";
Platform.OS === 'ios'
? 'Document.pdf'
: 'file:///android_asset/Document.pdf';
export default class PSPDFKitDemo extends Component<{}> {
render() {
return (
<PSPDFKitView
document={DOCUMENT}
configuration={{
showThumbnailBar: "scrollable",
pageTransition: "scrollContinuous",
scrollDirection: "vertical",
showThumbnailBar: 'scrollable',
pageTransition: 'scrollContinuous',
scrollDirection: 'vertical',
}}
ref="pdfView"
fragmentTag="PDF1"
Expand Down Expand Up @@ -585,11 +585,11 @@ You can configure the builder with a dictionary representation of the PSPDFConfi

```javascript
const CONFIGURATION = {
pageTransition: "scrollPerSpread",
pageTransition: 'scrollPerSpread',
showPageNumberOverlay: true,
grayScale: true,
showPageLabels: false,
scrollDirection: "vertical",
scrollDirection: 'vertical',
};
```

Expand Down Expand Up @@ -681,10 +681,6 @@ defaultConfig {
...
```

## Windows UWP

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.

# Troubleshooting

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.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Contains gradle configuration constants
*/
ext {
PSPDFKIT_VERSION = '8.7.2'
PSPDFKIT_VERSION = '8.7.3'
}

buildscript {
Expand Down
Loading

0 comments on commit ee492db

Please sign in to comment.