react-native-pdf-renderer 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
1
  *.pbxproj -text
2
- Sample/**/*.* linguist-documentation
2
+ Sample/** linguist-documentation
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # React-Native Pdf Renderer
2
2
 
3
3
  [![Licence MIT](https://img.shields.io/badge/licence-MIT-blue.svg)](https://github.com/douglasjunior/react-native-pdf-renderer/blob/master/LICENSE)
4
- [![npm version](https://img.shields.io/npm/v/react-native-pdf-renderer.svg)](https://www.npmjs.com/package/react-native-pdf-renderer)
5
- [![npm downloads](https://img.shields.io/npm/dt/react-native-pdf-renderer.svg)](#install-with-react-native-link)
4
+ [![npm version](https://img.shields.io/npm/v/react-native-pdf-renderer.svg)](https://www.npmjs.com/package/react-native-pdf-renderer?activeTab=versions)
5
+ [![npm downloads](https://img.shields.io/npm/dt/react-native-pdf-renderer.svg)](https://www.npmjs.com/package/react-native-pdf-renderer)
6
6
 
7
7
  ⚛ A zoomable, blazing fast, zero dependencies, pure native, typed PDF Renderer for Android and iOS.
8
8
 
@@ -63,7 +63,7 @@ If the file is online, you can use some third part library like `expo-file-syste
63
63
 
64
64
  For more details, see the [Sample Project](https://github.com/douglasjunior/react-native-pdf-renderer/blob/master/Sample/App.tsx).
65
65
 
66
- ## Props
66
+ ## PdfRendererView props
67
67
 
68
68
  Inherits [View Props](https://reactnative.dev/docs/view#props).
69
69
 
@@ -75,6 +75,12 @@ Inherits [View Props](https://reactnative.dev/docs/view#props).
75
75
  |onPageChange|`(current: number, total: number) => void`||Invoked on pages scroll.|
76
76
  |singlePage|`boolean`|`false`|Renders only the first page without scroll. (useful for display thumbnail)|
77
77
 
78
+ ## Limitations
79
+
80
+ The `borderRadius` style is ignored by React Native custom view in Android and crash on iOS.
81
+
82
+ So, if you need the best option is to wrap the `PdfRendererView` in another `View`.
83
+
78
84
  ## Contribute
79
85
 
80
86
  New features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-pdf-renderer/issues).
@@ -51,7 +51,10 @@ const styles = react_native_1.StyleSheet.create({
51
51
  });
52
52
  const PdfRendererView = (props) => {
53
53
  const { onPageChange, style, source, singlePage, maxZoom, ...others } = props;
54
- const viewStyles = (0, react_1.useMemo)(() => [styles.default, style], [style]);
54
+ const viewStyles = (0, react_1.useMemo)(() => [styles.default, style, {
55
+ // See https://github.com/douglasjunior/react-native-pdf-renderer#limitations
56
+ borderRadius: null,
57
+ }], [style]);
55
58
  const handlePageChange = (0, react_1.useCallback)((event) => {
56
59
  onPageChange?.(event.nativeEvent.position, event.nativeEvent.total);
57
60
  }, [onPageChange]);
@@ -4,7 +4,7 @@
4
4
  <dict>
5
5
  <key>SchemeUserState</key>
6
6
  <dict>
7
- <key>ReactNativePdfRendererLibrary.xcscheme_^#shared#^_</key>
7
+ <key>RNPdfRendererView.xcscheme_^#shared#^_</key>
8
8
  <dict>
9
9
  <key>orderHint</key>
10
10
  <integer>0</integer>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-pdf-renderer",
3
3
  "displayName": "React-Native Pdf Renderer",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "⚛ A zoomable, blazing fast, zero dependencies, pure native, typed PDF Renderer for Android and iOS.",
6
6
  "main": "dist",
7
7
  "license": "MIT",
@@ -1,8 +0,0 @@
1
- ## This file must *NOT* be checked into Version Control Systems,
2
- # as it contains information specific to your local configuration.
3
- #
4
- # Location of the SDK. This is only used by Gradle.
5
- # For customization when using a Version Control System, please read the
6
- # header note.
7
- #Thu Mar 09 08:57:39 BRT 2023
8
- sdk.dir=/Users/douglas.junior/Library/Android/sdk