在 React 应用程序中显示 PDF 就像显示图像一样容易。-源码

上传者: 42131618 | 上传时间: 2021-06-09 13:03:53 | 文件大小: 3.01MB | 文件类型: ZIP
React-PDF 在你的 React 应用程序中显示 PDF 就像它们是图像一样容易。 丢失的? 此包用于显示现有的 PDF。 如果您希望使用 React 创建 PDF,您可能正在寻找 @react-pdf/renderer。 tl;dr 通过执行 npm install react-pdf 或 yarn add react-pdf 进行安装。 通过添加 import { Document } from 'react-pdf' 来导入。 通过添加使用 . 文件可以是 URL、base64 内容、Uint8Array 等。 放 里面的组件 渲染页面。 演示 在示例目录中可以找到一个最小的演示页面。 在线演示也可用! 在继续之前 React-PDF 正在不断开发中。 本文档是为 React-PDF 5.x 分支编写的。 如果您想查看其他版本的 React-PDF 的文档,请使用 GitHub 页面顶部的下拉菜单切换到适当的标签。 以下是每个分支最新文档的快速链接: v4.x v3.x v2.x v1.x 入门兼容性 React 要使用最新版本的 React-PDF,您的项目需要使用 Re

文件下载

资源详情

[{"title":"( 97 个子文件 3.01MB ) 在 React 应用程序中显示 PDF 就像显示图像一样容易。-源码","children":[{"title":"react-pdf-master","children":[{"title":".eslintrc.json <span style='color:#111;'> 365B </span>","children":null,"spread":false},{"title":".gitattributes <span style='color:#111;'> 73B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"FUNDING.yml <span style='color:#111;'> 55B </span>","children":null,"spread":false},{"title":"ISSUE_TEMPLATE","children":[{"title":"Feature_request.md <span style='color:#111;'> 721B </span>","children":null,"spread":false},{"title":"Support_question.md <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"Bug_report.md <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true},{"title":"workflows","children":[{"title":"ci.yml <span style='color:#111;'> 632B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"jest.setup.js <span style='color:#111;'> 134B </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 300.76KB </span>","children":null,"spread":false},{"title":"copy-styles.js <span style='color:#111;'> 522B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"Outline.spec.jsx <span style='color:#111;'> 4.28KB </span>","children":null,"spread":false},{"title":"Page.spec.jsx <span style='color:#111;'> 24.67KB </span>","children":null,"spread":false},{"title":"PasswordResponses.js <span style='color:#111;'> 204B </span>","children":null,"spread":false},{"title":"Message.jsx <span style='color:#111;'> 358B </span>","children":null,"spread":false},{"title":"entry.jest.js <span style='color:#111;'> 230B </span>","children":null,"spread":false},{"title":"DocumentContext.jsx <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"Document.jsx <span style='color:#111;'> 9.55KB </span>","children":null,"spread":false},{"title":"shared","children":[{"title":"utils.js <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false},{"title":"propTypes.js <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false}],"spread":false},{"title":"Document.spec.jsx <span style='color:#111;'> 16.10KB </span>","children":null,"spread":false},{"title":"OutlineContext.jsx <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"entry.parcel.js <span style='color:#111;'> 699B </span>","children":null,"spread":false},{"title":"entry.webpack.js <span style='color:#111;'> 665B </span>","children":null,"spread":false},{"title":"OutlineItem.spec.jsx <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"LinkService.js <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"OutlineItem.jsx <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false},{"title":"Ref.js <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"PageContext.jsx <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"Page.jsx <span style='color:#111;'> 9.32KB </span>","children":null,"spread":false},{"title":"pdf.worker.entry.js <span style='color:#111;'> 462B </span>","children":null,"spread":false},{"title":"entry.js.spec.js <span style='color:#111;'> 793B </span>","children":null,"spread":false},{"title":"entry.js <span style='color:#111;'> 574B </span>","children":null,"spread":false},{"title":"Page","children":[{"title":"PageSVG.spec.jsx <span style='color:#111;'> 783B </span>","children":null,"spread":false},{"title":"PageCanvas.jsx <span style='color:#111;'> 3.61KB </span>","children":null,"spread":false},{"title":"PageCanvas.spec.jsx <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"TextLayer.jsx <span style='color:#111;'> 3.18KB </span>","children":null,"spread":false},{"title":"TextLayerItem.jsx <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"AnnotationLayer.jsx <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"TextLayerItem.spec.jsx <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false},{"title":"AnnotationLayer.spec.jsx <span style='color:#111;'> 8.59KB </span>","children":null,"spread":false},{"title":"TextLayer.spec.jsx <span style='color:#111;'> 4.36KB </span>","children":null,"spread":false},{"title":"AnnotationLayer.css <span style='color:#111;'> 5.42KB </span>","children":null,"spread":false},{"title":"PageSVG.jsx <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false}],"spread":false},{"title":"Ref.spec.js <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"Outline.jsx <span style='color:#111;'> 3.66KB </span>","children":null,"spread":false}],"spread":false},{"title":".babelrc <span style='color:#111;'> 428B </span>","children":null,"spread":false},{"title":".yarnrc.yml <span style='color:#111;'> 66B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"test-utils.js <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"LoadingOptions.jsx <span style='color:#111;'> 2.39KB </span>","children":null,"spread":false},{"title":"test.pdf <span style='color:#111;'> 524.24KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 257B </span>","children":null,"spread":false},{"title":"shared","children":[{"title":"utils.js <span style='color:#111;'> 598B </span>","children":null,"spread":false},{"title":"propTypes.js <span style='color:#111;'> 566B </span>","children":null,"spread":false}],"spread":false},{"title":"yarn.lock <span style='color:#111;'> 375.62KB </span>","children":null,"spread":false},{"title":"Test.less <span style='color:#111;'> 2.92KB </span>","children":null,"spread":false},{"title":"webpack.config.js <span style='color:#111;'> 2.34KB </span>","children":null,"spread":false},{"title":".babelrc <span style='color:#111;'> 207B </span>","children":null,"spread":false},{"title":"ViewOptions.jsx <span style='color:#111;'> 6.03KB </span>","children":null,"spread":false},{"title":"PassingOptions.jsx <span style='color:#111;'> 2.31KB </span>","children":null,"spread":false},{"title":"AnnotationOptions.jsx <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"LayerOptions.jsx <span style='color:#111;'> 1.94KB </span>","children":null,"spread":false},{"title":"index.jsx <span style='color:#111;'> 156B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 18B </span>","children":null,"spread":false},{"title":"Test.jsx <span style='color:#111;'> 10.04KB </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false}],"spread":false},{"title":"__mocks__","children":[{"title":"_pdf2.pdf <span style='color:#111;'> 41.44KB </span>","children":null,"spread":false},{"title":"_silently_failing_pdf.js <span style='color:#111;'> 526B </span>","children":null,"spread":false},{"title":"_pdf.pdf <span style='color:#111;'> 524.24KB </span>","children":null,"spread":false},{"title":"_failing_page.js <span style='color:#111;'> 527B </span>","children":null,"spread":false},{"title":"_failing_pdf.js <span style='color:#111;'> 401B </span>","children":null,"spread":false},{"title":"styleMock.js <span style='color:#111;'> 21B </span>","children":null,"spread":false},{"title":"_pdf3.pdf <span style='color:#111;'> 17.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 20.49KB </span>","children":null,"spread":false},{"title":"sample","children":[{"title":"parcel","children":[{"title":"sample.pdf <span style='color:#111;'> 524.24KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 297B </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 255.36KB </span>","children":null,"spread":false},{"title":".babelrc <span style='color:#111;'> 101B </span>","children":null,"spread":false},{"title":"Sample.jsx <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"Sample.less <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"index.jsx <span style='color:#111;'> 154B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 18B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 689B </span>","children":null,"spread":false}],"spread":false},{"title":"webpack","children":[{"title":"sample.pdf <span style='color:#111;'> 524.24KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 259B </span>","children":null,"spread":false},{"title":"yarn.lock <span style='color:#111;'> 255.66KB </span>","children":null,"spread":false},{"title":"webpack.config.js <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false},{"title":".babelrc <span style='color:#111;'> 101B </span>","children":null,"spread":false},{"title":"Sample.jsx <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false},{"title":"Sample.less <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"index.jsx <span style='color:#111;'> 154B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 18B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 945B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 145B </span>","children":null,"spread":false},{"title":".yarn","children":[{"title":"releases","children":[{"title":"yarn-2.4.0.cjs <span style='color:#111;'> 1.56MB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":".eslintignore <span style='color:#111;'> 27B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 3.42KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明