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 +1 -1
- package/README.md +9 -3
- package/dist/PdfRendererView.js +4 -1
- package/ios/{ReactNativePdfRenderer.xcodeproj → RNPdfRendererView.xcodeproj}/xcuserdata/douglas.junior.xcuserdatad/xcschemes/xcschememanagement.plist +1 -1
- package/package.json +1 -1
- package/android/local.properties +0 -8
- /package/ios/{ReactNativePdfRenderer.xcodeproj → RNPdfRendererView.xcodeproj}/project.xcworkspace/xcuserdata/douglas.junior.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
*.pbxproj -text
|
|
2
|
-
Sample
|
|
2
|
+
Sample/** linguist-documentation
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# React-Native Pdf Renderer
|
|
2
2
|
|
|
3
3
|
[](https://github.com/douglasjunior/react-native-pdf-renderer/blob/master/LICENSE)
|
|
4
|
-
[](https://www.npmjs.com/package/react-native-pdf-renderer)
|
|
5
|
-
[](
|
|
4
|
+
[](https://www.npmjs.com/package/react-native-pdf-renderer?activeTab=versions)
|
|
5
|
+
[](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
|
-
##
|
|
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).
|
package/dist/PdfRendererView.js
CHANGED
|
@@ -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
|
|
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]);
|
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.
|
|
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",
|
package/android/local.properties
DELETED
|
@@ -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
|