react-vector-pdf 0.3.3 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -61,6 +61,31 @@ const MyPdf = () => {
61
61
  };
62
62
  ```
63
63
 
64
+ 63:
65
+ 64: ## Previewing
66
+ 65:
67
+ 66: You can embed a live preview of the PDF using the `PdfPreview` component. This component renders an `iframe` containing the generated PDF blob.
68
+ 67:
69
+ 68: `tsx
70
+ 69: import { PdfPreview, PdfText } from "react-vector-pdf";
71
+ 70:
72
+ 71: <PdfPreview width="100%" height={600} options={{ ... }}>
73
+ 72: <PdfText>I am visible in the preview!</PdfText>
74
+ 73: </PdfPreview>
75
+ 74: `
76
+ 75:
77
+ 76: **Props:**
78
+ 77:
79
+ 78: - All `PdfDocument` props (`options`, `metadata`, `pageNumbers`, `centerLabel`, etc.) are supported and passed through.
80
+ 79: - `width` (string | number): Width of the container (default "100%").
81
+ 80: - `height` (string | number): Height of the container (default "100%").
82
+ 81: - `className` / `style`: Styling for the wrapper div.
83
+ 82: - `iframeClassName` / `iframeStyle`: Styling for the internal iframe.
84
+ 83:
85
+ 84: **Note:** Changing props (like options, colors, fonts) will automatically regenerate and update the preview.
86
+ 85:
87
+ 86: ## Components
88
+
64
89
  ## Components
65
90
 
66
91
  ### 1. `PdfText`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-vector-pdf",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "private": false,
5
5
  "description": "Vector (text-selectable) PDF engine with React UI to configure page numbers, formats, scopes, and center labels. Powered by jsPDF.",
6
6
  "repository": {