@shznet/pdf-sign-react 1.0.0 → 1.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 +2 -0
- package/dist/index.js +374 -298
- package/dist/lib/pdf-sign-react.d.ts +6 -0
- package/dist/lib/pdf-sign-react.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ export function App() {
|
|
|
57
57
|
| `onPageChange` | `(page: number, total: number) => void` | Callback when page changes (enables two-way binding). |
|
|
58
58
|
| `onScaleChange` | `(scale: number) => void` | Callback when zoom level changes. |
|
|
59
59
|
| `onFieldsChange` | `(fields: SignatureField[]) => void` | Callback when fields are modified. |
|
|
60
|
+
| `onSelectionChange` | `(data: { field: SignatureField | null }) => void` | Callback when field selection changes. |
|
|
60
61
|
| `onError` | `(error: Error) => void` | Callback on errors. |
|
|
61
62
|
|
|
62
63
|
## Two-Way Binding Example
|
|
@@ -141,6 +142,7 @@ await pdfRef.current?.addField({
|
|
|
141
142
|
pdfRef.current?.removeField('sig1');
|
|
142
143
|
pdfRef.current?.updateField('sig1', { rect: { x: 150, y: 150, width: 200, height: 80 } });
|
|
143
144
|
const fields = pdfRef.current?.getFields();
|
|
145
|
+
pdfRef.current?.clearFields();
|
|
144
146
|
|
|
145
147
|
// Printing
|
|
146
148
|
await pdfRef.current?.print({ withSignatures: false });
|