react-native-pdf-renderer 1.6.0 → 2.0.1
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/README.md +4 -4
- package/ReactNativePdfRenderer.podspec +9 -2
- package/android/build.gradle +111 -66
- package/android/gradle/wrapper/gradle-wrapper.properties +3 -1
- package/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/PdfRendererPackage.java +32 -9
- package/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/PdfRendererViewManagerImpl.java +94 -0
- package/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererRecyclerView.java +26 -32
- package/android/src/newarch/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.java +102 -0
- package/android/src/oldarch/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.java +92 -0
- package/dist/PdfRendererView.d.ts +4 -4
- package/dist/PdfRendererView.js +3 -3
- package/dist/PdfRendererView.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mock.js +17 -0
- package/dist/mock.js.map +1 -1
- package/dist/specs/RNPdfRendererViewNativeComponent.d.ts +19 -0
- package/dist/specs/RNPdfRendererViewNativeComponent.js +4 -0
- package/dist/specs/RNPdfRendererViewNativeComponent.js.map +1 -0
- package/ios/ReactNativePdfRenderer.xcodeproj/project.pbxproj +10 -4
- package/ios/ReactNativePdfRendererLibrary/RNPDFView.h +9 -3
- package/ios/ReactNativePdfRendererLibrary/{RNPDFView.m → RNPDFView.mm} +9 -10
- package/ios/ReactNativePdfRendererLibrary/RNPdfRendererComponentView.h +44 -0
- package/ios/ReactNativePdfRendererLibrary/RNPdfRendererComponentView.mm +134 -0
- package/ios/ReactNativePdfRendererLibrary/RNPdfRendererModule.h +7 -0
- package/ios/ReactNativePdfRendererLibrary/RNPdfRendererModule.m +13 -0
- package/package.json +36 -16
- package/src/PdfRendererView.tsx +147 -0
- package/src/index.ts +24 -0
- package/src/mock.tsx +32 -0
- package/src/specs/RNPdfRendererViewNativeComponent.ts +51 -0
- package/android/src/main/java/com/github/douglasjunior/reactNativePdfRenderer/modules/PdfRendererViewManager.java +0 -118
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// MIT License
|
|
2
|
+
|
|
3
|
+
// Copyright (c) 2023 Douglas Nassif Roma Junior
|
|
4
|
+
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
// copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
// SOFTWARE.
|
|
22
|
+
|
|
23
|
+
import React, { useCallback, useMemo } from 'react';
|
|
24
|
+
import {
|
|
25
|
+
NativeSyntheticEvent,
|
|
26
|
+
StyleProp,
|
|
27
|
+
StyleSheet,
|
|
28
|
+
ViewStyle,
|
|
29
|
+
} from 'react-native';
|
|
30
|
+
|
|
31
|
+
import PdfRendererNative, { NativeParams } from './specs/RNPdfRendererViewNativeComponent';
|
|
32
|
+
|
|
33
|
+
export type PdfRendererViewPropsType = {
|
|
34
|
+
testID?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Styles to be applied to the View.
|
|
37
|
+
*
|
|
38
|
+
* Note: Border radius is not supported.
|
|
39
|
+
*/
|
|
40
|
+
style?: StyleProp<ViewStyle>;
|
|
41
|
+
/**
|
|
42
|
+
* Path to a file stored on device.
|
|
43
|
+
*
|
|
44
|
+
* Ex.: `file:///path/to/file.pdf`
|
|
45
|
+
*/
|
|
46
|
+
source?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Distance in `DPI` between pages.
|
|
49
|
+
*
|
|
50
|
+
* Default: 16
|
|
51
|
+
*/
|
|
52
|
+
distanceBetweenPages?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Max zoom scale.
|
|
55
|
+
*
|
|
56
|
+
* Default: 5
|
|
57
|
+
*/
|
|
58
|
+
maxZoom?: number;
|
|
59
|
+
/**
|
|
60
|
+
* (Android only)
|
|
61
|
+
*
|
|
62
|
+
* Max page resolution (width/height) in pixels when zooming.
|
|
63
|
+
*
|
|
64
|
+
* Defined to prevent Android crash when zooming too much: https://github.com/douglasjunior/react-native-pdf-renderer/issues/26
|
|
65
|
+
*
|
|
66
|
+
* Default: 2048
|
|
67
|
+
*/
|
|
68
|
+
maxPageResolution?: number;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* Renders only the first page without scroll. (useful for display thumbnail).
|
|
72
|
+
*
|
|
73
|
+
* Default: false
|
|
74
|
+
*/
|
|
75
|
+
singlePage?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Invoked on pages scroll.
|
|
78
|
+
*
|
|
79
|
+
* @param page current page number
|
|
80
|
+
* @param totalPages total pages number
|
|
81
|
+
*/
|
|
82
|
+
onPageChange?: (page: number, totalPages: number) => void;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
type OnPageChangeEventType = {
|
|
86
|
+
position: number;
|
|
87
|
+
total: number;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
default: {
|
|
92
|
+
backgroundColor: 'gray',
|
|
93
|
+
flex: 1,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const PdfRendererView = ({
|
|
98
|
+
testID = undefined,
|
|
99
|
+
onPageChange,
|
|
100
|
+
style,
|
|
101
|
+
source,
|
|
102
|
+
singlePage = false,
|
|
103
|
+
distanceBetweenPages = 16,
|
|
104
|
+
maxZoom = 5,
|
|
105
|
+
maxPageResolution = 2048,
|
|
106
|
+
}: PdfRendererViewPropsType): React.JSX.Element => {
|
|
107
|
+
const viewStyles: StyleProp<ViewStyle> = useMemo(
|
|
108
|
+
() => [
|
|
109
|
+
styles.default,
|
|
110
|
+
style,
|
|
111
|
+
{
|
|
112
|
+
// See https://github.com/douglasjunior/react-native-pdf-renderer#limitations
|
|
113
|
+
borderRadius: undefined,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
[style],
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const handlePageChange = useCallback(
|
|
120
|
+
(event: NativeSyntheticEvent<OnPageChangeEventType>) => {
|
|
121
|
+
onPageChange?.(event.nativeEvent.position, event.nativeEvent.total);
|
|
122
|
+
},
|
|
123
|
+
[onPageChange],
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
const params: NativeParams = useMemo(
|
|
127
|
+
() => ({
|
|
128
|
+
source,
|
|
129
|
+
singlePage,
|
|
130
|
+
maxZoom,
|
|
131
|
+
}),
|
|
132
|
+
[source, singlePage, maxZoom],
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
return (
|
|
136
|
+
<PdfRendererNative
|
|
137
|
+
testID={testID}
|
|
138
|
+
maxPageResolution={maxPageResolution}
|
|
139
|
+
distanceBetweenPages={distanceBetweenPages}
|
|
140
|
+
style={viewStyles}
|
|
141
|
+
params={params}
|
|
142
|
+
onPageChange={handlePageChange}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
export default PdfRendererView;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// MIT License
|
|
2
|
+
|
|
3
|
+
// Copyright (c) 2023 Douglas Nassif Roma Junior
|
|
4
|
+
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
// copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
// SOFTWARE.
|
|
22
|
+
|
|
23
|
+
export { default } from './PdfRendererView';
|
|
24
|
+
export type { PdfRendererViewPropsType } from './PdfRendererView';
|
package/src/mock.tsx
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// MIT License
|
|
2
|
+
|
|
3
|
+
// Copyright (c) 2024 Douglas Nassif Roma Junior
|
|
4
|
+
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
// copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
// SOFTWARE.
|
|
22
|
+
|
|
23
|
+
import React from 'react';
|
|
24
|
+
|
|
25
|
+
import { View } from 'react-native';
|
|
26
|
+
import { PdfRendererViewPropsType } from './PdfRendererView';
|
|
27
|
+
|
|
28
|
+
const PdfRendererViewMock = (props: PdfRendererViewPropsType) => {
|
|
29
|
+
return <View testID={props.testID} style={props.style} />;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default PdfRendererViewMock;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// MIT License
|
|
2
|
+
|
|
3
|
+
// Copyright (c) 2025 Douglas Nassif Roma Junior
|
|
4
|
+
|
|
5
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
// in the Software without restriction, including without limitation the rights
|
|
8
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
// furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
// copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
// SOFTWARE.
|
|
22
|
+
|
|
23
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
24
|
+
import {
|
|
25
|
+
BubblingEventHandler,
|
|
26
|
+
Float,
|
|
27
|
+
Int32,
|
|
28
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
29
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
30
|
+
|
|
31
|
+
export type NativeParams = {
|
|
32
|
+
source?: string;
|
|
33
|
+
singlePage: boolean;
|
|
34
|
+
maxZoom: Float;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type PageChangeEventPayload = {
|
|
38
|
+
position: Int32;
|
|
39
|
+
total: Int32;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface NativeProps extends ViewProps {
|
|
43
|
+
maxPageResolution: Float;
|
|
44
|
+
distanceBetweenPages: Float;
|
|
45
|
+
params: NativeParams;
|
|
46
|
+
onPageChange: BubblingEventHandler<PageChangeEventPayload>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default codegenNativeComponent<NativeProps>(
|
|
50
|
+
'RNPdfRendererView',
|
|
51
|
+
) as HostComponent<NativeProps>;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
// MIT License
|
|
2
|
-
|
|
3
|
-
// Copyright (c) 2023 Douglas Nassif Roma Junior
|
|
4
|
-
|
|
5
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
// of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
// in the Software without restriction, including without limitation the rights
|
|
8
|
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
// copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
// furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
// copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
// SOFTWARE.
|
|
22
|
-
|
|
23
|
-
package com.github.douglasjunior.reactNativePdfRenderer.modules;
|
|
24
|
-
|
|
25
|
-
import android.view.View;
|
|
26
|
-
import android.view.ViewGroup;
|
|
27
|
-
import android.widget.LinearLayout;
|
|
28
|
-
|
|
29
|
-
import androidx.annotation.NonNull;
|
|
30
|
-
import androidx.annotation.Nullable;
|
|
31
|
-
|
|
32
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
33
|
-
import com.facebook.react.bridge.ReadableMap;
|
|
34
|
-
import com.facebook.react.common.MapBuilder;
|
|
35
|
-
import com.facebook.react.uimanager.SimpleViewManager;
|
|
36
|
-
import com.facebook.react.uimanager.ThemedReactContext;
|
|
37
|
-
import com.facebook.react.uimanager.annotations.ReactProp;
|
|
38
|
-
|
|
39
|
-
import java.io.IOException;
|
|
40
|
-
import java.util.Map;
|
|
41
|
-
|
|
42
|
-
public class PdfRendererViewManager extends SimpleViewManager<ViewGroup> {
|
|
43
|
-
private final ReactApplicationContext mReactApplicationContext;
|
|
44
|
-
|
|
45
|
-
public PdfRendererViewManager(ReactApplicationContext reactApplicationContext) {
|
|
46
|
-
this.mReactApplicationContext = reactApplicationContext;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@NonNull
|
|
50
|
-
@Override
|
|
51
|
-
public String getName() {
|
|
52
|
-
return "RNPdfRendererView";
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@NonNull
|
|
56
|
-
@Override
|
|
57
|
-
protected ViewGroup createViewInstance(@NonNull ThemedReactContext themedReactContext) {
|
|
58
|
-
var layout = new LinearLayout(themedReactContext);
|
|
59
|
-
layout.setOrientation(LinearLayout.VERTICAL);
|
|
60
|
-
|
|
61
|
-
var params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
|
62
|
-
|
|
63
|
-
var recyclerView = new PdfRendererRecyclerView(mReactApplicationContext, layout);
|
|
64
|
-
recyclerView.setLayoutParams(params);
|
|
65
|
-
|
|
66
|
-
layout.addView(recyclerView);
|
|
67
|
-
layout.setClipToOutline(true);
|
|
68
|
-
|
|
69
|
-
return layout;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@Nullable
|
|
73
|
-
@Override
|
|
74
|
-
public Map<String, Object> getExportedCustomBubblingEventTypeConstants() {
|
|
75
|
-
var map = super.getExportedCustomBubblingEventTypeConstants();
|
|
76
|
-
if (map == null) map = MapBuilder.of();
|
|
77
|
-
map.put("pageChange", MapBuilder.of(
|
|
78
|
-
"phasedRegistrationNames",
|
|
79
|
-
MapBuilder.of("bubbled", "onPageChange")
|
|
80
|
-
));
|
|
81
|
-
return map;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@ReactProp(name = "params")
|
|
85
|
-
public void setParams(ViewGroup layout, @Nullable ReadableMap params) throws IOException {
|
|
86
|
-
if (params == null) return;
|
|
87
|
-
|
|
88
|
-
var recyclerView = (PdfRendererRecyclerView) layout.getChildAt(0);
|
|
89
|
-
|
|
90
|
-
var source = params.getString("source");
|
|
91
|
-
var singlePage = params.hasKey("singlePage") && params.getBoolean("singlePage");
|
|
92
|
-
var maxZoom = params.hasKey("maxZoom") ? Double.valueOf(params.getDouble("maxZoom")).floatValue() : 5;
|
|
93
|
-
|
|
94
|
-
if (source != null) {
|
|
95
|
-
recyclerView.updateSource(source);
|
|
96
|
-
} else {
|
|
97
|
-
recyclerView.closeAdapter();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
recyclerView.setSinglePage(singlePage);
|
|
101
|
-
recyclerView.setMaxZoom(maxZoom);
|
|
102
|
-
recyclerView.setOverScrollMode(singlePage ? View.OVER_SCROLL_NEVER : View.OVER_SCROLL_IF_CONTENT_SCROLLS);
|
|
103
|
-
|
|
104
|
-
recyclerView.forceRequestLayout();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@ReactProp(name = "distanceBetweenPages")
|
|
108
|
-
public void setDistanceBetweenPages(ViewGroup layout, @Nullable float distanceBetweenPages) {
|
|
109
|
-
var recyclerView = (PdfRendererRecyclerView) layout.getChildAt(0);
|
|
110
|
-
recyclerView.setDistanceBetweenPages(distanceBetweenPages);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@ReactProp(name = "maxPageResolution")
|
|
114
|
-
public void setMaxPageResolution(ViewGroup layout, @Nullable float maxPageResolution) {
|
|
115
|
-
var recyclerView = (PdfRendererRecyclerView) layout.getChildAt(0);
|
|
116
|
-
recyclerView.setMaxPageResolution(maxPageResolution);
|
|
117
|
-
}
|
|
118
|
-
}
|