├── .gitignore
├── README.md
├── node-server
├── README.md
├── app.js
├── package.json
├── stream_read_write.js
├── utils.js
└── yarn.lock
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
├── src
├── App.js
├── App.test.js
├── components
│ ├── PDF
│ │ ├── index.js
│ │ └── style.css
│ ├── PDFViewer
│ │ ├── images
│ │ │ └── shadow.png
│ │ ├── index.js
│ │ ├── style.css
│ │ └── utils.js
│ ├── Upload
│ │ ├── index.js
│ │ └── style.css
│ ├── VirtualizedPdf
│ │ ├── index.js
│ │ └── style.css
│ └── index.js
├── demo.pdf
├── index.css
├── index.js
├── logo.svg
├── pages
│ ├── other
│ │ └── index.js
│ └── uploadFile
│ │ ├── index.js
│ │ └── style.css
├── serviceWorker.js
└── setupTests.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | /node-server/node_modules/
8 |
9 | # testing
10 | /coverage
11 |
12 | # production
13 | /build
14 |
15 | # misc
16 | .DS_Store
17 | .env.local
18 | .env.development.local
19 | .env.test.local
20 | .env.production.local
21 |
22 | npm-debug.log*
23 | yarn-debug.log*
24 | yarn-error.log*
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > 使用 PDF.js 在 react页面渲染 pdf 文件,不使用官方提供的viewe.html 工具,实现简单的工具栏操作
2 |
3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4 |
5 | ## 文件说明
6 |
7 | > 本项目原来是为了PDF预览的几种方式创建,后来又添加了大文件分片上传的服务,让整个项目更加灵活
8 |
9 | - App.js
10 |
11 | ```react
12 | import React from 'react'
13 | // 通过修改引入pages的文件不同显示不同的界面
14 | // uploadFile 上传文件服务的客户端
15 | // other PDF 预览页面
16 | import Other from './pages/other'
17 |
18 | const Index = props => {
19 | return
32 |
Click or drag file to this area to upload
35 |36 | Support for a single or bulk upload. Strictly prohibit from uploading company data or other 37 | band files 38 |
39 |