问题描述
Expo 是否有办法查看 PDF 并跳转到所述 PDF 中的特定页面.我查看了 https://www.npmjs.com/package/react-native-pdf 但我发现它与 expo 不兼容,因为它使用本机 React-Native 库.我也试过 https://github.com/xcarpentier/rn-pdf-reader-js,但它似乎存在一些问题,并且看起来创建者不再更新它.
Does Expo have a way to view a PDF and jump to a specific page in said PDF. I've looked into https://www.npmjs.com/package/react-native-pdf but i found it to be incompatible with expo given its use of native React-Native libraries. I've also tried https://github.com/xcarpentier/rn-pdf-reader-js, but there appears to be a couple of issues with it and it doesn't look like the creator updates it anymore.
推荐答案
rn-pdf-reader-js 似乎不适用于 38 岁以上的世博会.你可以试试这个 fork:
rn-pdf-reader-js seems to be not working for the expo 38+. You can try this fork instead:
https://github.com/stratoss/rn-pdf-reader-js
只需将其作为 import PDFReader from '@bildau/rn-pdf-reader' 导入即可.
Just import it as import PDFReader from '@bildau/rn-pdf-reader' and you are good to go.
这篇关于带有 React Native 的 Expo PDF 查看器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!