edit-pdf 0.0.0 → 0.0.1
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 +35 -60
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# edit-pdf
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A powerful and flexible React PDF editor component.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install edit-pdf
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Usage
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
```tsx
|
|
14
|
+
import { PdfEditor } from 'edit-pdf';
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
function App() {
|
|
17
|
+
return (
|
|
18
|
+
<div style={{ height: '100vh' }}>
|
|
19
|
+
<PdfEditor fileUrl="/path/to/document.pdf" />
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
15
23
|
|
|
16
|
-
|
|
24
|
+
export default App;
|
|
25
|
+
```
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
export default defineConfig([
|
|
20
|
-
globalIgnores(['dist']),
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.{ts,tsx}'],
|
|
23
|
-
extends: [
|
|
24
|
-
// Other configs...
|
|
27
|
+
## Features
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
- **View PDF**: Render PDF documents with high fidelity.
|
|
30
|
+
- **Annotations**:
|
|
31
|
+
- **Highlight**: Highlight text with customizable colors.
|
|
32
|
+
- **Pen**: Freehand drawing tool.
|
|
33
|
+
- **Text**: Insert text annotations.
|
|
34
|
+
- **Shapes**: Add rectangles, circles, arrows, and lines.
|
|
35
|
+
- **Images**: Insert images into the PDF.
|
|
36
|
+
- **Signatures**: Create and manage signatures.
|
|
37
|
+
- **Eraser**: Remove annotations.
|
|
38
|
+
- **Search**: Find text within the document.
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
],
|
|
35
|
-
languageOptions: {
|
|
36
|
-
parserOptions: {
|
|
37
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
38
|
-
tsconfigRootDir: import.meta.dirname,
|
|
39
|
-
},
|
|
40
|
-
// other options...
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
])
|
|
44
|
-
```
|
|
40
|
+
## Props
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
| Prop | Type | Description |
|
|
43
|
+
|------|------|-------------|
|
|
44
|
+
| `fileUrl` | `string` | The URL of the PDF file to load. |
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
// eslint.config.js
|
|
50
|
-
import reactX from 'eslint-plugin-react-x'
|
|
51
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
46
|
+
## License
|
|
52
47
|
|
|
53
|
-
|
|
54
|
-
globalIgnores(['dist']),
|
|
55
|
-
{
|
|
56
|
-
files: ['**/*.{ts,tsx}'],
|
|
57
|
-
extends: [
|
|
58
|
-
// Other configs...
|
|
59
|
-
// Enable lint rules for React
|
|
60
|
-
reactX.configs['recommended-typescript'],
|
|
61
|
-
// Enable lint rules for React DOM
|
|
62
|
-
reactDom.configs.recommended,
|
|
63
|
-
],
|
|
64
|
-
languageOptions: {
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
67
|
-
tsconfigRootDir: import.meta.dirname,
|
|
68
|
-
},
|
|
69
|
-
// other options...
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
])
|
|
73
|
-
```
|
|
48
|
+
MIT
|