@@ -41,10 +41,10 @@ pdfeasy.add([
41
41
pdfeasy .run ({
42
42
type: ' client' ,
43
43
clientEmit: ' blob'
44
- }).then (( blob : string ) => {
45
- const iframe = document .querySelector (' #pdf' ) as HTMLIFrameElement
44
+ }).then (blobUrl ) => {
45
+ const iframe = document .querySelector (' #pdf' )
46
46
47
- iframe .src = blob
47
+ iframe .src = blobUrl
48
48
}).catch ((err ) => {
49
49
// ...
50
50
})
@@ -70,6 +70,7 @@ import { usePDF } from 'vue-pdfeasy';
70
70
71
71
const pdf = usePDF ()
72
72
73
+ pdf .new ()
73
74
// ...
74
75
< / script >
75
76
```
@@ -92,6 +93,8 @@ modules: [
92
93
import { useNuxtApp } from ' #app' ;
93
94
94
95
const { $pdf } = useNuxtApp ()
96
+
97
+ $pdf .new ()
95
98
// ...
96
99
< / script >
97
100
```
@@ -136,9 +139,6 @@ pdfeasy.add([
136
139
pdfeasy .new ({
137
140
plugins: [{
138
141
cover: ' https://i.imgur.com/path.png' , // cover image (it's ignore default explicit margins insert)
139
- background : (page ) => { // render custom background in pages
140
- return ' https://i.imgur.com/path.png'
141
- },
142
142
onBefore : () => {
143
143
// before contents transform
144
144
},
@@ -179,6 +179,7 @@ pdfeasy.new({
179
179
``` ts
180
180
pdfeasy .run ({
181
181
type: ' client' ,
182
+ // 'blob' | 'save' | 'open-link' | 'none'
182
183
clientEmit: ' save' ,
183
184
}).then (() => {}).catch ((err ) => {
184
185
console .error (err )
@@ -201,7 +202,7 @@ pdfeasy.run({
201
202
It is possible to define the color scheme used automatically:
202
203
203
204
``` ts
204
- // converts all hex color to cmyk
205
+ // converts all hex color to CMYK
205
206
pdfeasy .run ({ colorSchema: ' CMYK' })
206
207
207
208
// preserve hex colors (it's default)
0 commit comments