@ngx-smz/core 21.2.1 → 21.3.0

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 CHANGED
@@ -26,6 +26,33 @@ ng build ngx-smz-ui
26
26
 
27
27
  This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
28
 
29
+ ## PDF export setup
30
+
31
+ `SmzDocumentBuilder` and `smz-document-viewer` use **`html2pdf.js`** and **`jspdf`** as **peer dependencies**. Install them in the host application:
32
+
33
+ ```bash
34
+ npm install html2pdf.js@^0.14.0 jspdf@^4.2.0
35
+ ```
36
+
37
+ Do **not** add `html2pdf.bundle.js` to `angular.json` → `scripts`. The library imports `html2pdf.js` as an ES/CJS module; the Angular bundler resolves `html2canvas`, `jspdf`, and `dompurify` from `node_modules`.
38
+
39
+ If the build warns about CommonJS dependencies, add them to `allowedCommonJsDependencies` in `angular.json`:
40
+
41
+ ```json
42
+ [
43
+ "html2pdf.js",
44
+ "html2canvas",
45
+ "jspdf",
46
+ "dompurify",
47
+ "canvg",
48
+ "raf",
49
+ "core-js",
50
+ "rgbcolor"
51
+ ]
52
+ ```
53
+
54
+ See the **demos** app route `/document` for working examples of the `html2pdf` renderer.
55
+
29
56
  ### Publishing the Library
30
57
 
31
58
  Once the project is built, you can publish your library by following these steps: