@sandeepmvn/react-pdf-annotator-v2 1.0.2 → 1.1.4
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 +114 -7
- package/dist/components/AnnotationLayer.d.ts +1 -0
- package/dist/components/AnnotationLayer.d.ts.map +1 -1
- package/dist/components/PdfPage.d.ts +1 -0
- package/dist/components/PdfPage.d.ts.map +1 -1
- package/dist/components/PdfViewer.d.ts +8 -1
- package/dist/components/PdfViewer.d.ts.map +1 -1
- package/dist/components/Toolbar.d.ts +1 -0
- package/dist/components/Toolbar.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/react-pdf-annotator.es.js +3182 -3128
- package/dist/react-pdf-annotator.es.js.map +1 -1
- package/dist/react-pdf-annotator.umd.js +15 -15
- package/dist/react-pdf-annotator.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -54,20 +54,127 @@ function App() {
|
|
|
54
54
|
export default App;
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
### Read-only Mode
|
|
58
|
+
|
|
59
|
+
To display a PDF without annotation tools (view-only mode):
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
<PdfViewer
|
|
63
|
+
fileUrl="https://example.com/sample.pdf"
|
|
64
|
+
fileName="sample.pdf"
|
|
65
|
+
readonly={true}
|
|
66
|
+
/>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Tracking Annotation Changes
|
|
70
|
+
|
|
71
|
+
To receive real-time updates when annotations are added, modified, or deleted:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { Annotations } from 'react-pdf-annotator-v2';
|
|
75
|
+
|
|
76
|
+
function App() {
|
|
77
|
+
const handleAnnotationsChange = (annotations: Annotations) => {
|
|
78
|
+
console.log('Annotations updated:', annotations);
|
|
79
|
+
// Save to database, update state, etc.
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<PdfViewer
|
|
84
|
+
fileUrl="https://example.com/sample.pdf"
|
|
85
|
+
fileName="sample.pdf"
|
|
86
|
+
onAnnotationsChange={handleAnnotationsChange}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The `annotations` parameter is an object where keys are page numbers and values are arrays of annotations:
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
{
|
|
96
|
+
1: [{ id: '...', type: 'PEN', points: [...], color: '#000000', ... }],
|
|
97
|
+
2: [{ id: '...', type: 'TEXT', content: 'Hello', x: 100, y: 200, ... }],
|
|
98
|
+
// ...
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Getting Annotated Document
|
|
103
|
+
|
|
104
|
+
Use refs to programmatically get the current annotated PDF as a Blob or URL:
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
import { useRef } from 'react';
|
|
108
|
+
import { PdfViewer, PdfViewerRef } from 'react-pdf-annotator-v2';
|
|
109
|
+
|
|
110
|
+
function App() {
|
|
111
|
+
const pdfViewerRef = useRef<PdfViewerRef>(null);
|
|
112
|
+
|
|
113
|
+
const handleSave = async () => {
|
|
114
|
+
if (!pdfViewerRef.current) return;
|
|
115
|
+
|
|
116
|
+
// Get as Blob
|
|
117
|
+
const blob = await pdfViewerRef.current.getAnnotatedDocument();
|
|
118
|
+
if (blob) {
|
|
119
|
+
// Upload to server
|
|
120
|
+
const formData = new FormData();
|
|
121
|
+
formData.append('file', blob, 'annotated.pdf');
|
|
122
|
+
await fetch('/api/upload', { method: 'POST', body: formData });
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const handlePreview = async () => {
|
|
127
|
+
if (!pdfViewerRef.current) return;
|
|
128
|
+
|
|
129
|
+
// Get as URL for preview
|
|
130
|
+
const url = await pdfViewerRef.current.getAnnotatedDocumentUrl();
|
|
131
|
+
if (url) {
|
|
132
|
+
window.open(url, '_blank');
|
|
133
|
+
// Remember to revoke URL when done: URL.revokeObjectURL(url)
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
return (
|
|
138
|
+
<>
|
|
139
|
+
<button onClick={handleSave}>Save to Server</button>
|
|
140
|
+
<button onClick={handlePreview}>Preview</button>
|
|
141
|
+
<PdfViewer
|
|
142
|
+
ref={pdfViewerRef}
|
|
143
|
+
fileUrl="https://example.com/sample.pdf"
|
|
144
|
+
fileName="sample.pdf"
|
|
145
|
+
/>
|
|
146
|
+
</>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
57
151
|
## 📖 API Reference
|
|
58
152
|
|
|
59
153
|
### PdfViewer Props
|
|
60
154
|
|
|
61
|
-
| Prop | Type | Required | Description |
|
|
62
|
-
|
|
63
|
-
| `fileUrl` | `string` | Yes | URL of the PDF file to display |
|
|
64
|
-
| `fileName` | `string` | Yes | Name of the PDF file (used for downloads) |
|
|
155
|
+
| Prop | Type | Required | Default | Description |
|
|
156
|
+
|------|------|----------|---------|-------------|
|
|
157
|
+
| `fileUrl` | `string` | Yes | - | URL of the PDF file to display |
|
|
158
|
+
| `fileName` | `string` | Yes | - | Name of the PDF file (used for downloads) |
|
|
159
|
+
| `readonly` | `boolean` | No | `false` | Hide annotation tools and prevent editing |
|
|
160
|
+
| `onAnnotationsChange` | `(annotations: Annotations) => void` | No | - | Callback fired when annotations change (add/update/delete/undo/redo) |
|
|
161
|
+
| `ref` | `React.Ref<PdfViewerRef>` | No | - | Ref to access component methods |
|
|
162
|
+
|
|
163
|
+
### PdfViewerRef Methods
|
|
164
|
+
|
|
165
|
+
When using a ref, the following methods are available:
|
|
166
|
+
|
|
167
|
+
| Method | Return Type | Description |
|
|
168
|
+
|--------|-------------|-------------|
|
|
169
|
+
| `getAnnotatedDocument()` | `Promise<Blob \| null>` | Returns the current PDF with annotations as a Blob |
|
|
170
|
+
| `getAnnotatedDocumentUrl()` | `Promise<string \| null>` | Returns an object URL of the annotated PDF (remember to revoke when done) |
|
|
65
171
|
|
|
66
172
|
### Available Exports
|
|
67
173
|
|
|
68
174
|
```tsx
|
|
69
|
-
// Main Component
|
|
175
|
+
// Main Component and Types
|
|
70
176
|
import { PdfViewer } from 'react-pdf-annotator-v2';
|
|
177
|
+
import type { PdfViewerRef } from 'react-pdf-annotator-v2';
|
|
71
178
|
|
|
72
179
|
// Sub-components (for custom layouts)
|
|
73
180
|
import {
|
|
@@ -175,7 +282,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
175
282
|
|
|
176
283
|
## 📮 Issues
|
|
177
284
|
|
|
178
|
-
If you encounter any issues or have suggestions, please file an issue on the [GitHub repository](https://github.com/
|
|
285
|
+
If you encounter any issues or have suggestions, please file an issue on the [GitHub repository](https://github.com/sandeepmvn/react-pdf-annotator-v2-package/issues).
|
|
179
286
|
|
|
180
287
|
## 🙏 Acknowledgments
|
|
181
288
|
|
|
@@ -187,7 +294,7 @@ Built with:
|
|
|
187
294
|
|
|
188
295
|
## 📚 Documentation
|
|
189
296
|
|
|
190
|
-
For more detailed documentation and examples, visit the [documentation site](https://github.com/
|
|
297
|
+
For more detailed documentation and examples, visit the [documentation site](https://github.com/sandeepmvn/react-pdf-annotator-v2-package).
|
|
191
298
|
|
|
192
299
|
---
|
|
193
300
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationLayer.d.ts","sourceRoot":"","sources":["../../components/AnnotationLayer.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,cAAc,EAAS,MAAM,UAAU,CAAC;AAK7D,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,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Q,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4CnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { Annotation } from '../types';
|
|
3
|
+
export interface PdfViewerRef {
|
|
4
|
+
getAnnotatedDocument: () => Promise<Blob | null>;
|
|
5
|
+
getAnnotatedDocumentUrl: () => Promise<string | null>;
|
|
6
|
+
}
|
|
2
7
|
interface PdfViewerProps {
|
|
3
8
|
fileUrl: string;
|
|
4
9
|
fileName: string;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
onAnnotationsChange?: (annotations: Record<number, Annotation[]>) => void;
|
|
5
12
|
}
|
|
6
|
-
declare const PdfViewer: React.
|
|
13
|
+
declare const PdfViewer: React.ForwardRefExoticComponent<PdfViewerProps & React.RefAttributes<PdfViewerRef>>;
|
|
7
14
|
export default PdfViewer;
|
|
8
15
|
//# sourceMappingURL=PdfViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../components/PdfViewer.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"PdfViewer.d.ts","sourceRoot":"","sources":["../../components/PdfViewer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAMzG,OAAO,EAAkB,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtD,MAAM,WAAW,YAAY;IAC3B,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACjD,uBAAuB,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvD;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CA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,IAAI,CAAC;IACpC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAsBD,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAgHnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as PdfViewer } from '../components/PdfViewer';
|
|
2
|
+
export type { PdfViewerRef } from '../components/PdfViewer';
|
|
2
3
|
export { default as PdfPage } from '../components/PdfPage';
|
|
3
4
|
export { default as Toolbar } from '../components/Toolbar';
|
|
4
5
|
export { default as AnnotationLayer } from '../components/AnnotationLayer';
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAGhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,YAAY,EACV,cAAc,EACd,KAAK,EACL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACV,WAAW,GACZ,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,MAAM,EACN,UAAU,EACV,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,cAAc,qBAAqB,CAAC"}
|