@pdf-viewer/react 1.19.1 → 1.19.2
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 +21 -25
- package/dist/utils/hooks/useLicense.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Update your imports:
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
40
|
<div align="center">
|
|
41
|
-
<a href="https://www.react-pdf.dev/" target="_blank">
|
|
41
|
+
<a href="https://www.react-pdf-kit.dev/" target="_blank">
|
|
42
42
|
<picture>
|
|
43
43
|
<source srcset="https://raw.githubusercontent.com/pdf-viewer-react/react-pdf/2308e7d88cde64bf343f1509150ebf6c91a15664/assets/img/react-pdf_cover.webp" width="100%">
|
|
44
44
|
<img alt="React PDF" src="https://raw.githubusercontent.com/pdf-viewer-react/react-pdf/2308e7d88cde64bf343f1509150ebf6c91a15664/assets/img/react-pdf_cover.webp" width="100%">
|
|
@@ -56,7 +56,7 @@ Update your imports:
|
|
|
56
56
|
|
|
57
57
|
[React PDF Home][reactpdf] - [License](#page_facing_up-license) - [Documentation][reactpdf-docs]
|
|
58
58
|
|
|
59
|
-
[][npm]
|
|
60
60
|
[][twitter]
|
|
61
61
|
|
|
62
62
|
</div>
|
|
@@ -65,7 +65,7 @@ Update your imports:
|
|
|
65
65
|
|
|
66
66
|
- **Save Weeks of Development Time**: React PDF simplifies PDF integration with ready-to-use tools, minimizing the need for custom development and saving you valuable time.
|
|
67
67
|
- **Tailored for React.js**: React PDF is native to React.js, ensuring smooth integration into your projects.
|
|
68
|
-
- **Customizability at Its Core**: Built with flexibility in mind, allowing you to match your application
|
|
68
|
+
- **Customizability at Its Core**: Built with flexibility in mind, allowing you to match your application's unique style and functionality.
|
|
69
69
|
- **High-Performance & Rapid Rendering**: Optimized for rendering large PDFs efficiently, React PDF delivers lightning-fast load times with features like virtual scrolling.
|
|
70
70
|
- **Accessibility**: Designed with inclusivity in mind, React PDF supports ARIA attributes, catering to diverse user bases.
|
|
71
71
|
- **Modern Browser Compatibility**: Works seamlessly across modern browsers, eliminating compatibility headaches.
|
|
@@ -79,20 +79,20 @@ As developers ourselves, we faced many issues such as browser incompatibility an
|
|
|
79
79
|
|
|
80
80
|
- 🎯 **Interactive & Immersive Viewing Experience** with features like rotation, zoom, and keyboard navigation.
|
|
81
81
|
- 📱 **Responsive Across All Devices** for a consistent experience on desktops, tablets and mobile devices.
|
|
82
|
-
- 🎨 **Customizable UI and Styling** to tailor the viewer
|
|
82
|
+
- 🎨 **Customizable UI and Styling** to tailor the viewer's appearance to match your website's theme.
|
|
83
83
|
- 🧭 **Advanced Navigation Options** to browse documents easily with table of contents, hyperlinks, and a powerful search tool.
|
|
84
84
|
- ⚡ **High-Performance Rendering** to load large PDF documents quickly and handle complex elements like vector graphics with ease.
|
|
85
85
|
- 🔧 **Programmatic Control with Hooks and Props**, allowing you to interact with the viewer programmatically.
|
|
86
86
|
- 📂 **Document Management Tools**, including features like downloading and printing.
|
|
87
87
|
- 👁️ **Accessibility Support** to built-in support for ARIA attributes and tooltips, catering to diverse user bases.
|
|
88
88
|
|
|
89
|
-
For the full feature set, visit [React PDF Features](https://www.react-pdf.dev/features?utm_source=github).
|
|
89
|
+
For the full feature set, visit [React PDF Features](https://www.react-pdf-kit.dev/features?utm_source=github).
|
|
90
90
|
|
|
91
91
|
# :zap: Quick Start Guide
|
|
92
92
|
|
|
93
|
-
Here
|
|
93
|
+
Here's how to get started with React PDF in your React.js project:
|
|
94
94
|
|
|
95
|
-
## 1. Check
|
|
95
|
+
## 1. Check Prerequisites
|
|
96
96
|
|
|
97
97
|
Here are the basic system requirements to run the React PDF component:
|
|
98
98
|
|
|
@@ -119,7 +119,7 @@ There are a few ways you can install React PDF, namely `bun`, `npm`, `pnpm` or `
|
|
|
119
119
|
### Using bun:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
bun add @pdf-viewer
|
|
122
|
+
bun add @react-pdf-kit/viewer
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
##### Caching of previous Worker version with `bun`
|
|
@@ -134,22 +134,22 @@ rm -R node_modules
|
|
|
134
134
|
### Using npm:
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
npm install @pdf-viewer
|
|
137
|
+
npm install @react-pdf-kit/viewer
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
### Using yarn:
|
|
141
141
|
|
|
142
142
|
```bash
|
|
143
|
-
yarn add @pdf-viewer
|
|
143
|
+
yarn add @react-pdf-kit/viewer
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
### Using pnpm:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
pnpm add @pdf-viewer
|
|
149
|
+
pnpm add @react-pdf-kit/viewer
|
|
150
150
|
```
|
|
151
151
|
|
|
152
|
-
For more information on how to use different package managers, please visit our [installation guide](https://
|
|
152
|
+
For more information on how to use different package managers, please visit our [installation guide](https://www.react-pdf-kit.dev/docs/introduction/getting-started.html#installation?utm_source=github).
|
|
153
153
|
|
|
154
154
|
## 3. Import and Use the Component
|
|
155
155
|
|
|
@@ -157,16 +157,12 @@ The following structure demonstrates how to build a React PDF viewer by importin
|
|
|
157
157
|
|
|
158
158
|
```tsx
|
|
159
159
|
<RPConfig>
|
|
160
|
-
{' '}
|
|
161
160
|
{/* Configuration license and pdfjs-dist worker */}
|
|
162
161
|
<RPProvider>
|
|
163
|
-
{' '}
|
|
164
162
|
{/* Viewer context provider */}
|
|
165
163
|
<RPTheme>
|
|
166
|
-
{' '}
|
|
167
164
|
{/* Theme customization (optional) */}
|
|
168
165
|
<RPDefaultLayout>
|
|
169
|
-
{' '}
|
|
170
166
|
{/* Default layout container */}
|
|
171
167
|
<RPPages /> {/* PDF pages renderer */}
|
|
172
168
|
</RPDefaultLayout>
|
|
@@ -175,7 +171,7 @@ The following structure demonstrates how to build a React PDF viewer by importin
|
|
|
175
171
|
</RPConfig>
|
|
176
172
|
```
|
|
177
173
|
|
|
178
|
-
_Remark: For more information on each component, please refer to [Component](https://
|
|
174
|
+
_Remark: For more information on each component, please refer to [Component](https://www.react-pdf-kit.dev/docs/components/overview?utm_source=github)._
|
|
179
175
|
|
|
180
176
|
### Basic Usage
|
|
181
177
|
|
|
@@ -184,7 +180,7 @@ The most basic usage of React PDF viewer needs four components, namely: `RPConfi
|
|
|
184
180
|
Here's how to implement a basic PDF viewer in a React application:
|
|
185
181
|
|
|
186
182
|
```jsx
|
|
187
|
-
import { RPProvider, RPDefaultLayout, RPPages, RPConfig } from '@pdf-viewer
|
|
183
|
+
import { RPProvider, RPDefaultLayout, RPPages, RPConfig } from '@react-pdf-kit/viewer'
|
|
188
184
|
|
|
189
185
|
const App = () => {
|
|
190
186
|
return (
|
|
@@ -200,7 +196,7 @@ const App = () => {
|
|
|
200
196
|
export default App
|
|
201
197
|
```
|
|
202
198
|
|
|
203
|
-
The PDF viewer will automatically adjust to fit its container's dimensions. You can control the size by setting the `style` prop on `RPDefaultLayout`. For more information on using React PDF, visit our [basic usage guide](https://
|
|
199
|
+
The PDF viewer will automatically adjust to fit its container's dimensions. You can control the size by setting the `style` prop on `RPDefaultLayout`. For more information on using React PDF, visit our [basic usage guide](https://www.react-pdf-kit.dev/docs/introduction/basic-usage?utm_source=github)
|
|
204
200
|
|
|
205
201
|
You may also check out our [Starter Toolkit](#pushpin-starter-toolkit) for examples to get you started.
|
|
206
202
|
|
|
@@ -227,9 +223,9 @@ We are more than happy to help you. If you have any questions, run into any erro
|
|
|
227
223
|
|
|
228
224
|
# :page_facing_up: License
|
|
229
225
|
|
|
230
|
-
React PDF is distributed under our proprietary license. Please refer to our [License page](https://www.react-pdf.dev/license-agreement?utm_source=github) file for more details.
|
|
226
|
+
React PDF is distributed under our proprietary license. Please refer to our [License page](https://www.react-pdf-kit.dev/license-agreement?utm_source=github) file for more details.
|
|
231
227
|
|
|
232
|
-
If you would like to use React PDF commercially, please purchase a license from [our website][reactpdf] or reach out to us directly at [
|
|
228
|
+
If you would like to use React PDF commercially, please purchase a license from [our website][reactpdf] or reach out to us directly at [https://www.react-pdf-kit.dev/contact-us](https://www.react-pdf-kit.dev/contact-us).
|
|
233
229
|
|
|
234
230
|
# Acknowledgement
|
|
235
231
|
|
|
@@ -237,7 +233,7 @@ If you would like to use React PDF commercially, please purchase a license from
|
|
|
237
233
|
- [Img Shields](https://shields.io)
|
|
238
234
|
- [React.js](https://reactjs.org/)
|
|
239
235
|
|
|
240
|
-
[reactpdf]: https://www.react-pdf.dev
|
|
241
|
-
[reactpdf-docs]: https://
|
|
242
|
-
[npm]: https://www.npmjs.com/package/@pdf-viewer
|
|
243
|
-
[twitter]: https://www.x.com/ReactPDF
|
|
236
|
+
[reactpdf]: https://www.react-pdf-kit.dev
|
|
237
|
+
[reactpdf-docs]: https://www.react-pdf-kit.dev/docs
|
|
238
|
+
[npm]: https://www.npmjs.com/package/@react-pdf-kit/viewer
|
|
239
|
+
[twitter]: https://www.x.com/ReactPDF
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as E, useCallback as h, useEffect as A } from "react";
|
|
2
2
|
import { appConsole as l } from "../appConsole.js";
|
|
3
|
-
const b = /* @__PURE__ */ new Date("2026-06-
|
|
3
|
+
const b = /* @__PURE__ */ new Date("2026-06-05T06:33:04.861Z"), d = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
|
|
4
4
|
invalidLicense: `You are currently using without a valid license. ${d}`,
|
|
5
5
|
mismatchedDomain: `Your license key is not valid for the current domain / IP. ${d}`,
|
|
6
6
|
expired: `Your license key has expired. ${d}`,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pdf-viewer/react",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",
|
|
5
|
-
"version": "1.19.
|
|
5
|
+
"version": "1.19.2",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react-pdf",
|
|
8
8
|
"react-pdf-viewer",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"pdfjs",
|
|
13
13
|
"pdf-react"
|
|
14
14
|
],
|
|
15
|
-
"author": "React PDF
|
|
15
|
+
"author": "React PDF Kit <support@react-pdf-kit.dev>",
|
|
16
16
|
"license": "See license section",
|
|
17
|
-
"homepage": "https://www.react-pdf.dev",
|
|
18
|
-
"url": "https://github.com/pdf-
|
|
17
|
+
"homepage": "https://www.react-pdf-kit.dev",
|
|
18
|
+
"url": "https://github.com/react-pdf-kit/react-pdf-viewer",
|
|
19
19
|
"bugs": {
|
|
20
|
-
"url": "https://github.com/pdf-
|
|
20
|
+
"url": "https://github.com/react-pdf-kit/react-pdf-viewer/issues/new"
|
|
21
21
|
},
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "dist/main.js",
|