当我使用在应用程序中显示 pdf时,我在React Native中遇到了问题react-native-pdf
控制台中显示的日志:
错误:ReactNativeBlobUtil 请求错误:java.lang.IllegalStateException:使用自己的信任管理器,但未定义java.lang.IllegalStateException:使用自己的信任管理器,但未定义]
我将 react-native-pdf 安装到我的项目中,当我使用“npx react-native run-android”运行时发生失败并显示如下错误
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> More than one file was found with OS independent path 'lib/x86/libc++_shared.so'
Run Code Online (Sandbox Code Playgroud)
任何人都可以帮助我可以使用包 react-native-pdf
我使用的react-native-view-pdf
,React Native版本是0.59.5
https://github.com/rumax/react-native-PDFView
我只是按照教程进行操作,但显示黑屏。我想不通。我不知道为什么他们显示空屏幕。
步骤1:
npm install react-native-view-pdf --save
Run Code Online (Sandbox Code Playgroud)
第2步:
react-native link react-native-view-pdf
Run Code Online (Sandbox Code Playgroud)
使用代码并输入react-native run-ios
应用程序.js:
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import PDFView from 'react-native-view-pdf/lib/index';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
const resources = {
file: Platform.OS === 'ios' ? 'downloadedDocument.pdf' …
Run Code Online (Sandbox Code Playgroud) 我\xe2\x80\x99m 尝试为react-native应用程序实现pdf数字签名组件。
\n\n我用于react-native-pdf
在屏幕上渲染 pdf 并将react-native-draggable
签名拖动到 pdf 视图顶部。
我react-native-draggable
可以得到签名在屏幕上的位置,但与pdf文档上的位置无关。
有没有办法获取/计算 pdf 上的垂直位置?
\n\n我必须考虑不同的屏幕尺寸、不同的 pdf 尺寸以及不同且可变的边距。它看起来或多或少像这样 请参阅此图片
\n\n您可以指出任何公式/算法作为帮助,我们将不胜感激。
\n尝试在 iOS 和 Android 中创建构建。应用程序正在使用react-native-pdf库。出现构建错误
错误:无法从/Users/runner/work/1/s/node_modules/react-native-pdf/index.js解析模块react-native-blob-util:在以下位置中找不到react-native-blob-util项目或这些目录中:node_modules ../../node_modules
我们尝试将react-native-blob-util添加到package.json中。但现在由于react-native-blob-util,在 iOS 中出现重复符号构建错误
“react-native-blob-util”:“^0.13.16”,“react-native-pdf”:“^6.4.0”