Skip to content

Commit 38597fe

Browse files
committed
chore: readme
1 parent db73e60 commit 38597fe

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ pdfeasy.add([
4141
pdfeasy.run({
4242
type: 'client',
4343
clientEmit: 'blob'
44-
}).then((blob: string) => {
45-
const iframe = document.querySelector('#pdf') as HTMLIFrameElement
44+
}).then(blobUrl) => {
45+
const iframe = document.querySelector('#pdf')
4646

47-
iframe.src = blob
47+
iframe.src = blobUrl
4848
}).catch((err) => {
4949
// ...
5050
})
@@ -70,6 +70,7 @@ import { usePDF } from 'vue-pdfeasy';
7070

7171
const pdf = usePDF()
7272

73+
pdf.new()
7374
// ...
7475
</script>
7576
```
@@ -92,6 +93,8 @@ modules: [
9293
import { useNuxtApp } from '#app';
9394

9495
const { $pdf } = useNuxtApp()
96+
97+
$pdf.new()
9598
// ...
9699
</script>
97100
```
@@ -136,9 +139,6 @@ pdfeasy.add([
136139
pdfeasy.new({
137140
plugins: [{
138141
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-
},
142142
onBefore: () => {
143143
// before contents transform
144144
},
@@ -179,6 +179,7 @@ pdfeasy.new({
179179
```ts
180180
pdfeasy.run({
181181
type: 'client',
182+
// 'blob' | 'save' | 'open-link' | 'none'
182183
clientEmit: 'save',
183184
}).then(() => {}).catch((err) => {
184185
console.error(err)
@@ -201,7 +202,7 @@ pdfeasy.run({
201202
It is possible to define the color scheme used automatically:
202203

203204
```ts
204-
// converts all hex color to cmyk
205+
// converts all hex color to CMYK
205206
pdfeasy.run({ colorSchema: 'CMYK' })
206207

207208
// preserve hex colors (it's default)

0 commit comments

Comments
 (0)